public class FBlock_JgenMdl extends FBlock_FBcl
Module_JgenMdl
slxBlock), not relevant for code generation, but maybe relevant for report.
sFunction and maybe addtional operators FBlock_FBcl.sOperators
StatementData_JgenMdl filled with Java code generation process
Block_Mdl Block_Mdl
|--outConnections---*>OutConnection InConnection<*----inConnections--|
| -ixPort -ixPort |
| -nameConnection -nameConnection |
| | | |
|<1------itsBlock-----<*>|------connectToBlock--------*>|<*>--itsBlock-------------1>|
| |
|<1-------connectFromBlock-----|
The connection between the modules is done via instances of ConnOut_FBcl, output of the module,
and ConnIn_FBcl, input of the other module.
Block_Mdl (a module block)
|
|--module-->Module_Mdl--blocks---*>Block_Mdl
| (all blocks of the module)
|
InConnection<*----------------inConnections--|--outConnections-----------------*>OutConnection
-ixPort | -ixPort
-nameConnection | -nameConnectio
| | |
|<*>--itsBlock-------------------------1>|<1----------------itsBlock---------------<*>|
| |
| |
|-inportInModule-->| |<--outportInModule-|
| Block_Mdl (an Inport) (an Outport) Block_Mdl
-ixPort -ixPort
-nameConnection -nameConnection
| |
| OutConnection |
|--outConnections--*>| |
| |
|--connectToBlock---*> |
(to Blocks in the Module) |
|
|
InConnection |
|<1--inConnections--|
<1---connectFromBlock---|
(from Blocks in the Module
The module Block_Mdl refers a Module_JgenMdl which contains the Block_Mdl of the sub module.
#conin and #conout. The special case is: The
ConnIn_FBcl#inportInModule and the ConnOut_FBcl#inportInModule are used.
They refer to the Block_Mdl which are the Inport and the Outport of the sub module.
An Inport has any number of #conout (maybe 0, more as 1) to the blocks inside the module,
the Outport has exact 1 #conin from a Block inside the module. That is the submodule's blocks.| Modifier and Type | Class and Description |
|---|---|
static class |
FBlock_JgenMdl.ClusterInfo |
static class |
FBlock_JgenMdl.MaskParam_Mdl |
(package private) static interface |
FBlock_JgenMdl.XXXInitBlock |
FBlock_FBcl.Blocktype, FBlock_FBcl.WriteFB| Modifier and Type | Field and Description |
|---|---|
(package private) Module_FBlock_JgenMdl |
_moduleBlock
The superior block only used for
Callmodule_FBlock_JgenMdl or Module_FBlock_JgenMdl. |
private FBlock_FBcl |
_templateFb
The block which this block is copied from.
|
(package private) boolean |
bAddForTypePropagation |
(package private) boolean |
bAddInCluster |
FBlock_JgenMdl.ClusterInfo |
clusterInfo |
(package private) int |
conSliced
The number of slicing instances due to connections.
|
(package private) DataTypePropagation_JgenMdl.State |
dataTypesPropagated
0 not propagated. 3 full propagated.
|
(package private) int |
dbgOrder
It is only for debug.
|
(package private) java.lang.String |
dbgStringType |
FBlock_JgenMdl |
dstFbExcl
The only one destination FBlock. null if the block has more as one destination @since 2019-04-30
|
java.util.List<FBlock_JgenMdl> |
dstFbMultiple
All destination FBlock if more as one.
|
EvOutput_FBcl |
eventOut
The associated event for calculation order.
|
private EvOperation_FBcl |
evOperation |
private java.util.List<EvOperation_FBcl> |
evOperations |
(package private) java.util.Map<java.lang.String,FBlock_JgenMdl.MaskParam_Mdl> |
maskParam
True if code was generated.
|
(package private) Operation_FBlock_JgenMdl |
opClusterBlock
The Block is member of a cluster inside the module.
|
(package private) java.lang.String |
sClassName
Name of the class where this operation is part of.
|
java.lang.String |
sFunction
The operation routine, function which is executed with this block.
|
(package private) java.lang.String |
sImport
package of the class where this FBlock's class is member of.
|
(package private) java.lang.String |
sInstanceName
If not null, then usage of this FBlock forces an composite instance in the module.
|
SlxData.Block_SlxData |
slxBlock
Reference to the simulink block.
|
static java.lang.String[] |
sOperators3Arg |
FBlock_JgenMdl |
srcFbExcl
Sources which refers this in dstExcl.
|
java.util.List<FBlock_JgenMdl> |
srcFbMultiple
Sources which refers this in dstMultiple.
|
StatementData_JgenMdl |
stm
If not null then this block is a end block in a generated statement.
|
_itsModule, din, dout, evin, evout, name, sOperators, typeFB| Constructor and Description |
|---|
FBlock_JgenMdl(FBlock_FBcl.Blocktype type,
Module_FBlock_JgenMdl inModule)
Constructs the block from Simulink blocks.
|
FBlock_JgenMdl(FBlock_FBcl.Blocktype etype,
java.lang.String name,
java.lang.String sImport,
java.lang.String sOperation,
java.lang.String sInOutDesign)
Creates a template block from a given String designation
|
FBlock_JgenMdl(FBlock_JgenMdl tplFb,
FBlock_FBcl.Blocktype type,
Module_FBlock_JgenMdl inModule)
Constructs the block from Simulink blocks.
|
FBlock_JgenMdl(FBlock_JgenMdl src,
Module_FBlock_JgenMdl inModule)
Creates a FBlock from a given template block.
|
| Modifier and Type | Method and Description |
|---|---|
int |
calcSliced() |
(package private) void |
cleanupAfterJavaCode() |
(package private) void |
cleanupAfterTypePropagation() |
protected void |
copyBlockPropertiesFrom(FBlock_JgenMdl src,
Module_FBlock_JgenMdl inModule) |
FBlock_JgenMdl |
createBlockInstance(Module_FBlock_JgenMdl inModule)
Creates a FBlock_Mdl from this template or type Block.
|
void |
determine_zVectorStm()
Sets the
StatementData_JgenMdl.ixOutconRet with the first #conout which is a scalar. |
java.lang.Iterable<EvOperation_FBcl> |
evOperations()
Returns an iterator over more as one Event operation or null if the Inpin is used for only one operation.
|
void |
fillMaskParam(java.util.List<SlxData.MaskParam_Slx> srcMask)
Transfer mask parameter from input data.
|
void |
findOutconRet()
Sets the
StatementData_JgenMdl.ixOutconRet with the first #conout which is a scalar. |
(package private) FBlock_JgenMdl.MaskParam_Mdl |
getMaskParam(java.lang.String name) |
ConnOut_FBcl |
getOut(int ixPort) |
java.lang.String |
globalName()
Returns the global name in the top model starting with "%."
|
void |
globalName(java.lang.StringBuilder sb)
Returns the global name in the top model starting with "%."
|
boolean |
isTypesAllEqual()
Return true for block types which has the same type on all incon and outcon.
|
(package private) java.lang.String |
nameCon()
Returns the name of the first relevant connection.
|
EvOperation_FBcl |
oneEvOper()
Returns the only one Event operation or null if the Inpin is used for more as one operations.
|
ConnOut_FBcl |
outconFirst()
Return the first outConnection of this.
|
void |
prepare()
Prepare the block after fill the input.
|
(package private) void |
registerSrcExcl(FBlock_JgenMdl src) |
(package private) void |
registerSrcMultiple(FBlock_JgenMdl src) |
java.lang.String |
sClassName() |
void |
setName(java.lang.String name) |
private DataType_FBcl |
setPortType(DataType_FBcl dtypePrev,
int zVectorDimPrev,
Connection_FBcl con,
StringPartScan sp,
boolean bIncon,
java.util.Map<java.lang.String,DataType_FBcl> mapdtypes) |
java.lang.String |
sImport() |
FBlock_FBcl |
templateFb() |
void |
templateFb(FBlock_FBcl src) |
void |
terminateOpenIncons() |
java.lang.String |
toString() |
(package private) void |
writeDbginfo(StringFormatter sf) |
din, dinForeach, dout, doutForeach, dtypes, evin, evin, evout, evout, getNrofConnin, getNrofConnout, getNrofDin, getNrofDout, getNrofEvin, getNrofEvout, getOut1Properties, getPinEvInByName, getPinEvOutByName, getPinInByName, getPinOutByName, getSteptime, getSteptimeStr, getTypeFB, kind, name, typeName, XXXgetConnin, XXXgetConnoutpublic final FBlock_JgenMdl.ClusterInfo clusterInfo
public FBlock_JgenMdl srcFbExcl
public java.util.List<FBlock_JgenMdl> srcFbMultiple
public FBlock_JgenMdl dstFbExcl
public java.util.List<FBlock_JgenMdl> dstFbMultiple
public EvOutput_FBcl eventOut
private EvOperation_FBcl evOperation
private java.util.List<EvOperation_FBcl> evOperations
public static java.lang.String[] sOperators3Arg
int dbgOrder
GenJava_Class_JgenMdl#blocksInOrder.java.lang.String dbgStringType
public SlxData.Block_SlxData slxBlock
Module_FBlock_JgenMdl _moduleBlock
Callmodule_FBlock_JgenMdl or Module_FBlock_JgenMdl.Operation_FBlock_JgenMdl opClusterBlock
int conSliced
StatementData_JgenMdl.zVectorStm.
It is the static situation of the module.
0 means: no slicing. >0: The number of slices is defined at model level in the module. -1 means: The number of slices depends on the inputs.
The number of slices is set via calcSliced()public StatementData_JgenMdl stm
public java.lang.String sFunction
java.lang.String sInstanceName
java.lang.String sClassName
java.lang.String sImport
DataTypePropagation_JgenMdl.State dataTypesPropagated
boolean bAddForTypePropagation
boolean bAddInCluster
java.util.Map<java.lang.String,FBlock_JgenMdl.MaskParam_Mdl> maskParam
private FBlock_FBcl _templateFb
#conin and #conout
without wiring.FBlock_JgenMdl(FBlock_FBcl.Blocktype type, Module_FBlock_JgenMdl inModule)
SlxData in a new class.
The constructor should be independent from simulink things. To support other graphical programming tools too.slxBlock - public FBlock_JgenMdl(FBlock_JgenMdl tplFb, FBlock_FBcl.Blocktype type, Module_FBlock_JgenMdl inModule)
SlxData in a new class.
The constructor should be independent from simulink things. To support other graphical programming tools too.slxBlock - public FBlock_JgenMdl(FBlock_JgenMdl src, Module_FBlock_JgenMdl inModule)
Operation_FBlock_JgenMdl from a library module
or a block inside the PredefFBlocks_old_JgenMdl, especially all standard FBlock.src - the templateinModule - the superior module where the block is used.public FBlock_JgenMdl(FBlock_FBcl.Blocktype etype, java.lang.String name, java.lang.String sImport, java.lang.String sOperation, java.lang.String sInOutDesign)
name - sImport - sOperation - sInOutDesign - description of input and output types:
0before the character type: unspecified vector or scalar.
$before the character: a scalar, but a vector operation possible.
,
public java.lang.String sClassName()
public java.lang.String sImport()
private DataType_FBcl setPortType(DataType_FBcl dtypePrev, int zVectorDimPrev, Connection_FBcl con, StringPartScan sp, boolean bIncon, java.util.Map<java.lang.String,DataType_FBcl> mapdtypes) throws java.text.ParseException
java.text.ParseExceptionvoid registerSrcExcl(FBlock_JgenMdl src)
void registerSrcMultiple(FBlock_JgenMdl src)
public EvOperation_FBcl oneEvOper()
public java.lang.Iterable<EvOperation_FBcl> evOperations()
protected void copyBlockPropertiesFrom(FBlock_JgenMdl src, Module_FBlock_JgenMdl inModule)
public FBlock_JgenMdl createBlockInstance(Module_FBlock_JgenMdl inModule)
inModule - The module for aggregation _moduleBlock of the new Block.public void setName(java.lang.String name)
public java.lang.String globalName()
public void globalName(java.lang.StringBuilder sb)
public void findOutconRet()
StatementData_JgenMdl.ixOutconRet with the first #conout which is a scalar.
This routine is called only in GenJava_Class_JgenMdl.findOutconRet() before the translation starts.
therefore stm is expected to null (assertion). It is created here.
Note: The first scalar outputs depends on the deterministic ConnOut_FBcl#dataType which is different for different using types of the module.public int calcSliced()
public void determine_zVectorStm()
StatementData_JgenMdl.ixOutconRet with the first #conout which is a scalar.
This routine is called only in GenJava_Class_JgenMdl.findOutconRet() before the translation starts.
therefore stm is expected to null (assertion). It is created here.
Note: The first scalar outputs depends on the deterministic ConnOut_FBcl#dataType which is different for different using types of the module.public ConnOut_FBcl getOut(int ixPort)
public ConnOut_FBcl outconFirst()
java.lang.String nameCon()
public FBlock_FBcl templateFb()
public void templateFb(FBlock_FBcl src)
public void prepare()
public void terminateOpenIncons()
public void fillMaskParam(java.util.List<SlxData.MaskParam_Slx> srcMask)
srcMask - FBlock_JgenMdl.MaskParam_Mdl getMaskParam(java.lang.String name)
public boolean isTypesAllEqual()
void cleanupAfterTypePropagation()
void cleanupAfterJavaCode()
void writeDbginfo(StringFormatter sf)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class FBlock_FBcl