public class Module_FBlock_JgenMdl extends FBlock_JgenMdl
FBlock_JgenMdl.ClusterInfo, FBlock_JgenMdl.MaskParam_Mdl, FBlock_JgenMdl.XXXInitBlock
FBlock_FBcl.Blocktype, FBlock_FBcl.WriteFB
Modifier and Type | Field and Description |
---|---|
(package private) DataType_FBcl[] |
dTypesInModule
Reference to all data types which are used in this module,
twice, as copy to restore changed types after generation with specified types.
|
(package private) DataType_FBcl[] |
dTypesInModuleBack
Reference to all data types which are used in this module,
twice, as copy to restore changed types after generation with specified types.
|
FBlock_JgenMdl[] |
endBlocks
end blocks of calculation in the module.
|
(package private) java.util.HashMap<java.lang.Integer,FBlock_JgenMdl> |
endFblocks
The end blocks which are detected in
Clustering_FBlock#processCluster(Module_FBlock_JgenMdl)
It are all FBlocks for endfb for all event queues. |
java.util.List<EvInput_FBcl> |
eventInputs |
java.util.List<EvOutput_FBcl> |
events
All calculation order or event queues in this module.
|
FBlock_FBcl |
fbm
The Block which presents the Module-Interface, it is the type block for the module.
|
(package private) boolean |
isGenJava
true if Java code was generated.
|
(package private) java.util.List<Connection_FBcl> |
listConOfModuleForTyping |
Module_JgenMdl |
module
If not null then this block is a sub system.
|
(package private) ModuleTranslated_JgenMdl |
moduleTranslated
It is the container to gather all Operation_FBlock etc (especially update Blocks) while the inner Modules (
Callmodule_FBlock_JgenMdl are replaced. |
GenJavaPrj_JgenMdl |
prj
Set if the SubModule is assigned to a class, generated Java source.
|
java.lang.String |
sLibFile
Name of the lib file where the module were found.
|
(package private) java.util.Map<java.lang.String,SymbolicValue_JgenMdl> |
symbParam |
_moduleBlock, bAddForTypePropagation, bAddInCluster, clusterInfo, conSliced, dataTypesPropagated, dbgOrder, dbgStringType, dstFbExcl, dstFbMultiple, eventOut, maskParam, opClusterBlock, sClassName, sFunction, sImport, sInstanceName, slxBlock, sOperators3Arg, srcFbExcl, srcFbMultiple, stm
_itsModule, din, dout, evin, evout, name, sOperators, typeFB
Constructor and Description |
---|
Module_FBlock_JgenMdl(java.lang.String sLibFile,
java.lang.String sNameClass,
Module_FBlock_JgenMdl inModule,
GenJavaPrj_JgenMdl prj) |
Modifier and Type | Method and Description |
---|---|
void |
addSymbolicParameter(java.lang.String name,
java.lang.String value,
DataType_FBcl type) |
private java.lang.String |
buildNameWithSpecifiedDtypes(Callmodule_FBlock_JgenMdl callBlock) |
void |
checkForCallmodulesAndTranslate(Callmodule_FBlock_JgenMdl callBlock,
ModuleTranslated_JgenMdl superiorModule,
boolean bTopModule,
int recursion) |
java.lang.String |
convertNumExpr(java.lang.String valin,
DataType_FBcl type,
java.lang.String nameFb)
Generates code for a number.
|
private void |
createConDtypesOfModule()
Creates the
InconTyped_JgenMdl.dataType() and the OutconOfModule_JgenMdl#dataType() of the module
from the data types of the connections of the FBlock_Port_JgenMdl . |
private void |
createConType(Connection_FBcl conModule,
Connection_FBcl conPort)
Copy type information from the port to the connection or vice versa, called after assembling the FBlocks of a module from model sources.
|
private DataType_FBcl |
createConTypeFromPortTypeConnections(DataType_FBcl portType,
int zVectorDimCon1,
DataType_FBcl depType) |
private DataType_FBcl |
createConTypeIntern(Connection_FBcl con,
DataType_FBcl conType,
DataType_FBcl portType,
int zVectorDimCon1,
DataType_FBcl depType) |
private void |
createInconType(InconOfModule_JgenMdl conModule)
Copy type information from the port to the connection or vice versa, called after assembling the FBlocks of a module from model sources.
|
private void |
createOutconType(OutconOfModule_JgenMdl conModule)
Copy type information from the port to the connection or vice versa, called after assembling the FBlocks of a module from model sources.
|
void |
prepare_TypePropagationInModule() |
void |
propagateTypeToCallModules(int recursion)
Replaces the connections in the superior model from this to the
#operBlocks of this submodule. |
private void |
replaceTypesInModuleForTranslation(Callmodule_FBlock_JgenMdl callBlock)
Replace the types in the module for translation of the module.
|
(package private) void |
storeDataTypesInModule(java.util.Map<DataType_FBcl,DataType_FBcl> mapDataTypesInModule) |
java.lang.String |
toString() |
private ModuleTranslated_JgenMdl |
translate(java.lang.String sClassNameJava,
ModuleTranslated_JgenMdl superiorModule,
boolean bTopModule)
Translate this module.
|
calcSliced, cleanupAfterJavaCode, cleanupAfterTypePropagation, copyBlockPropertiesFrom, createBlockInstance, determine_zVectorStm, evOperations, fillMaskParam, findOutconRet, getMaskParam, getOut, globalName, globalName, isTypesAllEqual, nameCon, oneEvOper, outconFirst, prepare, registerSrcExcl, registerSrcMultiple, sClassName, setName, sImport, templateFb, templateFb, terminateOpenIncons, writeDbginfo
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, XXXgetConnout
public FBlock_FBcl fbm
java.util.List<Connection_FBcl> listConOfModuleForTyping
java.util.Map<java.lang.String,SymbolicValue_JgenMdl> symbParam
public FBlock_JgenMdl[] endBlocks
public java.util.List<EvOutput_FBcl> events
public java.util.List<EvInput_FBcl> eventInputs
java.util.HashMap<java.lang.Integer,FBlock_JgenMdl> endFblocks
Clustering_FBlock#processCluster(Module_FBlock_JgenMdl)
It are all FBlocks for endfb for all event queues.DataType_FBcl[] dTypesInModule
DataType_FBcl[] dTypesInModuleBack
public Module_JgenMdl module
public GenJavaPrj_JgenMdl prj
public final java.lang.String sLibFile
FBlock_FBcl.name()
.boolean isGenJava
ModuleTranslated_JgenMdl moduleTranslated
Callmodule_FBlock_JgenMdl
are replaced.
If the module is translated itself, it is possible that it is used to translate in another dataType situation again.
Therefore this instance is created newly after translation.public Module_FBlock_JgenMdl(java.lang.String sLibFile, java.lang.String sNameClass, Module_FBlock_JgenMdl inModule, GenJavaPrj_JgenMdl prj)
public void addSymbolicParameter(java.lang.String name, java.lang.String value, DataType_FBcl type)
void storeDataTypesInModule(java.util.Map<DataType_FBcl,DataType_FBcl> mapDataTypesInModule)
public java.lang.String convertNumExpr(java.lang.String valin, DataType_FBcl type, java.lang.String nameFb)
PrepareFromSlx#convertNumExpr(org.vishia.smlk.smlk2FBCL.SlxData.Block_SlxData, DataType_FBcl)
Note it is a problem between Simulink and FBlock_Mdl.
valin
- block
- type
- public void prepare_TypePropagationInModule() throws java.io.IOException
java.io.IOException
private void createConDtypesOfModule()
InconTyped_JgenMdl.dataType()
and the OutconOfModule_JgenMdl#dataType()
of the module
from the data types of the connections of the FBlock_Port_JgenMdl
.
The DataType_FBcl
of the Connections have to be an extra instance, the same instance like inside the module should not be used
because the module acts as a template FBlock. The DataType_Mdl of the connection have only connections and dependencies with connections
to the connection of the module, not to other connections. That is necessary for the template role of the Module_FBlock.
FBlock_JgenMdl#conin
and FBlock_JgenMdl#conout
of this Module are created already on creation of the module block from the Model data.
There the Connection_FBcl#zVectorDim
are stored already from the model data. It is especially in for-each subsystems.private void createOutconType(OutconOfModule_JgenMdl conModule)
conModule
- The connection of the module block (outside)portType
- The port type inside the module, from its connection insideprivate void createInconType(InconOfModule_JgenMdl conModule)
conModule
- The connection of the module block (outside)portType
- The port type inside the module, from its connection insideprivate void createConType(Connection_FBcl conModule, Connection_FBcl conPort)
conModule
- The connection of the module block (outside)portType
- The port type inside the module, from its connection insideprivate DataType_FBcl createConTypeFromPortTypeConnections(DataType_FBcl portType, int zVectorDimCon1, DataType_FBcl depType)
private DataType_FBcl createConTypeIntern(Connection_FBcl con, DataType_FBcl conType, DataType_FBcl portType, int zVectorDimCon1, DataType_FBcl depType)
public void propagateTypeToCallModules(int recursion) throws java.io.IOException
#operBlocks
of this submodule.
Module_FBlock_JgenMdl
instance presents the access to the functionality of the sub module (call of its operations).
#clazz
association is removed.
#operBlocks
. That are the operations which can be called (not should be called in any case) in the superior level.
#operBlocks
are used without copying because this Submodule_FBlock is only contained one time in the model. It is not a library block.
#inConnections
and FBlock_JgenMdl#outConnections
of the refBlock are reassigned to the #operBlocks
because instead using the refBlock the particular Operation_FBlock_JgenMdl
are used instead.
That is because the model has different order of execution for the particular operations, or maybe some operations are not used.
java.io.IOException
public void checkForCallmodulesAndTranslate(Callmodule_FBlock_JgenMdl callBlock, ModuleTranslated_JgenMdl superiorModule, boolean bTopModule, int recursion) throws java.io.IOException
java.io.IOException
private java.lang.String buildNameWithSpecifiedDtypes(Callmodule_FBlock_JgenMdl callBlock)
private final void replaceTypesInModuleForTranslation(Callmodule_FBlock_JgenMdl callBlock)
ModuleTranslated_JgenMdl.replaceConnectionsToOperation(Callmodule_FBlock_JgenMdl, ModuleTranslated_JgenMdl)
because it is not done for the translation of this but for the translation of the superior module.callBlock
- The calling block, which contains the actual types. It is part of the superior module.private final ModuleTranslated_JgenMdl translate(java.lang.String sClassNameJava, ModuleTranslated_JgenMdl superiorModule, boolean bTopModule) throws java.io.IOException
replaceTypesInModuleForTranslation(Callmodule_FBlock_JgenMdl)
was called.
After translation the module is cleaned up for another type specified translation.sClassNameJava
- the specified class name with type extensionssuperiorModule
- There the update operations etc. are stored which should be invoked for this modulemoduleTranslated
which gets all operation of this module which should be called outside
for the translated module.java.io.IOException
public java.lang.String toString()
toString
in class FBlock_JgenMdl