public class Translation2Target_FBtrl
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
dependingMap
Header or import for code generation.
|
(package private) java.lang.StringBuilder |
sbFile |
(package private) java.lang.StringBuilder |
sTemp |
(package private) TranslationScripts.Data |
trlData |
(package private) TranslationScripts |
trlScripts |
(package private) java.util.Map<java.lang.String,VariableDef_FBtrl> |
varMap |
Constructor and Description |
---|
Translation2Target_FBtrl(TranslationScripts trlScript) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
convertToOtx(Execode expr,
Module_FBcl mdl) |
private void |
generateFile(java.io.File genSrcDir,
Module_FBcl mdl) |
private void |
genOperationForEvinPin(EvinType_FBcl evinPin,
Module_FBcl mdl) |
private void |
genOperationForOutpin(DoutType_FBcl pinout,
Module_FBcl mdl)
Generates the second source code : operation for the given output pin for the generated source file.
|
private static OutTextPreparer |
genOtxExprForOutpinAccess(Module_FBcl mdl,
DoutType_FBcl pinout,
long usedInpins)
Generates the code gen rule for the access code for the pin for usage of the module
|
(package private) TranslateEvchain_FBtrl |
genStatementForEvcurr(Module_FBcl mdl,
Evchain_FBcl.EvCurr evCurr,
boolean bHasStatements,
TranslateEvchain_FBtrl trlEvcurrArg) |
private TranslateEvchain_FBtrl |
genStatementsForEvchain(Evchain_FBcl evChain,
Module_FBcl mdl,
TranslateEvchain_FBtrl trlEvcurrArg) |
private long |
genStatementsForOperEvinPin(Operation_FBcl operEvinPin,
TranslateEvchain_FBtrl trlEvcurr,
Module_FBcl mdl,
int recursion) |
static void |
translate(Module_FBcl mdl,
java.io.File genSrcDir,
TranslationScripts trlScript,
int recursion)
Generates the target sources to the Module
and generates the event operationin
EvinType_FBcl.iterOperations()
. |
private void |
translateModule(Module_FBcl mdl,
java.io.File genSrcDir,
int recursion) |
final TranslationScripts trlScripts
final TranslationScripts.Data trlData
private transient java.util.Map<java.lang.String,java.lang.String> dependingMap
transient java.util.Map<java.lang.String,VariableDef_FBtrl> varMap
java.lang.StringBuilder sbFile
java.lang.StringBuilder sTemp
public Translation2Target_FBtrl(TranslationScripts trlScript)
public static void translate(Module_FBcl mdl, java.io.File genSrcDir, TranslationScripts trlScript, int recursion)
EvinType_FBcl.iterOperations()
.Operation_FBcl.genCodeStmnt
and the output operation in DoutType_FBcl#genCodeAccess
mdl
- genSrcDir
- trlScript
- recursion
- java.io.IOException
private void translateModule(Module_FBcl mdl, java.io.File genSrcDir, int recursion) throws java.io.IOException
java.io.IOException
private TranslateEvchain_FBtrl genStatementsForEvchain(Evchain_FBcl evChain, Module_FBcl mdl, TranslateEvchain_FBtrl trlEvcurrArg) throws java.io.IOException
java.io.IOException
TranslateEvchain_FBtrl genStatementForEvcurr(Module_FBcl mdl, Evchain_FBcl.EvCurr evCurr, boolean bHasStatements, TranslateEvchain_FBtrl trlEvcurrArg) throws java.io.IOException
java.io.IOException
private static OutTextPreparer genOtxExprForOutpinAccess(Module_FBcl mdl, DoutType_FBcl pinout, long usedInpins)
mdl
- The modulepinout
- The pinusedInpins
- The combinatoric used inPinsprivate static java.lang.String convertToOtx(Execode expr, Module_FBcl mdl)
private void genOperationForEvinPin(EvinType_FBcl evinPin, Module_FBcl mdl) throws java.io.IOException
java.io.IOException
private long genStatementsForOperEvinPin(Operation_FBcl operEvinPin, TranslateEvchain_FBtrl trlEvcurr, Module_FBcl mdl, int recursion) throws java.io.IOException
java.io.IOException
private void genOperationForOutpin(DoutType_FBcl pinout, Module_FBcl mdl) throws java.io.IOException
mdl
- The moduleportOut
- for this port. The port contains the necessary code snippet in Pin_FBcl#sConstant
already.
The associated interface pin contains the rule to generate code in DoutType_FBcl#genCodeAccess
already.java.io.IOException
private void generateFile(java.io.File genSrcDir, Module_FBcl mdl) throws java.io.IOException
genSrcDir
- mdl
- java.io.IOException
- it is unexpected. Exception on writefile will be print as error