at.lcm.x2c.core
Class X2cBlock

java.lang.Object
  extended by at.lcm.x2c.core.X2cBlock

public class X2cBlock
extends java.lang.Object

This class shall encapsulate the Block and shall not have any dependency to Scilab.

Author:
Martin Hochwallner, Markus Aigner

Constructor Summary
X2cBlock(at.lcm.x2c.core.structure.Block block)
           
 
Method Summary
 void clearStaticParamId()
           
 void convertParameters()
           
 void evaluateParameters()
           
 at.lcm.x2c.core.structure.Block getBlock()
          Returns Block.
 java.lang.String getBlockLibType()
          Return the library name and the block type in the "library.type" notation
 X2cBlockParameterSimple getBlockParameter(java.lang.String parameterName)
          shall be build in main class
 java.lang.String getComponentName()
           
 java.lang.String getComponentPrompt()
           
 java.lang.String getDescription()
           
 java.lang.String[] getExistingImplementationNames()
           
 java.lang.String getImplementation()
          Returns Block Implementation name.
 java.lang.String getLabel()
          Returns Block label (Mask name).
 java.lang.String getLibraryName()
           
 at.lcm.x2c.core.structure.Mask getMask()
          Returns Block Mask.
 java.lang.String getMaskName()
          Deprecated. 
 java.lang.String getModelIdentification()
           
 int getParameterId()
           
 at.lcm.x2c.core.structure.ImplementationParameter getUsedControllerParameter(java.lang.String strCtrlParameter)
           
 java.lang.String[] getUsedControllerParameterNames()
           
 int getUsedImplementationIndex()
          Get the index of the used implementation in the array of getExistingImplementationNames()
 java.lang.String getUsedImplementationName()
           
 java.lang.String identifyBlock()
           
 boolean isCoT()
           
 boolean isCurrentModel(java.lang.String modelIdentification)
           
 boolean isPartOfModel()
           
 boolean isStaticParameterId()
           
 boolean isTimeDependent()
           
 void setBlockParameter(X2cBlockParameterSimple param)
          shall be build in main class
 void setCoT(boolean cotEnabled)
           
 void setLabel(java.lang.String label)
          Sets Block label (Mask name).
 void setModel(at.lcm.x2c.core.structure.Model model)
           
 void setModelIdentification(java.lang.String modelIdentification)
           
 void setPartOfModel(boolean isPartOfModel)
           
 void setSampleTimeFactor(java.lang.Integer sampleTimeFactor)
           
 void setStaticParamId(int id)
           
 void setUsedImplementation(java.lang.String impl)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

X2cBlock

public X2cBlock(at.lcm.x2c.core.structure.Block block)
         throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getLabel

public java.lang.String getLabel()
Returns Block label (Mask name).

Returns:
Block label
See Also:
Block.getMaskName()

setLabel

public void setLabel(java.lang.String label)
              throws java.lang.Exception
Sets Block label (Mask name).

Parameters:
label - Block label
Throws:
java.lang.Exception
See Also:
Block.setMaskName(String)

getBlockLibType

public java.lang.String getBlockLibType()
Return the library name and the block type in the "library.type" notation

Returns:
the library name and the block type in the "library.type" notation

getLibraryName

public java.lang.String getLibraryName()

getComponentName

public java.lang.String getComponentName()

getComponentPrompt

public java.lang.String getComponentPrompt()

getDescription

public java.lang.String getDescription()

getImplementation

public java.lang.String getImplementation()
                                   throws java.lang.Exception
Returns Block Implementation name.

Returns:
Used Implementation name in case of Control Block
Data type name in case of IO Block
Throws:
java.lang.Exception

getMask

public at.lcm.x2c.core.structure.Mask getMask()
Returns Block Mask.

Returns:
Block Mask
See Also:
Block.getMask()

setStaticParamId

public void setStaticParamId(int id)
                      throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
Block.setStaticParamId(int)

clearStaticParamId

public void clearStaticParamId()
See Also:
Block.clearStaticParamId()

isStaticParameterId

public boolean isStaticParameterId()
See Also:
Block.isStaticParameterId()

getParameterId

public int getParameterId()
See Also:
Block.getParameterId()

setCoT

public void setCoT(boolean cotEnabled)
See Also:
ControlBlock.setCoT(boolean)

isCoT

public boolean isCoT()
See Also:
ControlBlock.isCoT()

getExistingImplementationNames

public java.lang.String[] getExistingImplementationNames()

getUsedImplementationName

public java.lang.String getUsedImplementationName()

getUsedImplementationIndex

public int getUsedImplementationIndex()
                               throws java.lang.Exception
Get the index of the used implementation in the array of getExistingImplementationNames()

Returns:
index of the used implementation in the array of getExistingImplementationNames()
Throws:
java.lang.Exception

setUsedImplementation

public void setUsedImplementation(java.lang.String impl)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getUsedControllerParameterNames

public java.lang.String[] getUsedControllerParameterNames()
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

getUsedControllerParameter

public at.lcm.x2c.core.structure.ImplementationParameter getUsedControllerParameter(java.lang.String strCtrlParameter)
                                                                             throws java.lang.Exception
Throws:
java.lang.Exception

getMaskName

@Deprecated
public java.lang.String getMaskName()
Deprecated. 


getBlock

public at.lcm.x2c.core.structure.Block getBlock()
Returns Block.

Returns:
Block

getModelIdentification

public java.lang.String getModelIdentification()

setModelIdentification

public void setModelIdentification(java.lang.String modelIdentification)

isCurrentModel

public boolean isCurrentModel(java.lang.String modelIdentification)

convertParameters

public void convertParameters()
                       throws java.lang.Exception
Throws:
java.lang.Exception

isPartOfModel

public boolean isPartOfModel()
Returns:
the isPartOfModel

setPartOfModel

public void setPartOfModel(boolean isPartOfModel)
Parameters:
isPartOfModel - the isPartOfModel to set

setModel

public void setModel(at.lcm.x2c.core.structure.Model model)

setBlockParameter

public void setBlockParameter(X2cBlockParameterSimple param)
shall be build in main class

Parameters:
param -

getBlockParameter

public X2cBlockParameterSimple getBlockParameter(java.lang.String parameterName)
                                          throws java.lang.Exception
shall be build in main class

Parameters:
parameterName -
Throws:
java.lang.Exception

evaluateParameters

public void evaluateParameters()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

identifyBlock

public java.lang.String identifyBlock()

isTimeDependent

public boolean isTimeDependent()

setSampleTimeFactor

public void setSampleTimeFactor(java.lang.Integer sampleTimeFactor)
                         throws java.lang.Exception
Throws:
java.lang.Exception


Copyright 2019 LCM. All rights reserved.