public class BuildEvchainOperation_FBcl
extends java.lang.Object
Module_FBcl.evChains
:
Evchain_FBcl
is a straight forward sequence of event connections without fork and join in a module.
It connects via Evin_FBcl
and Evout_FBcl
parts inside a FBlock
with the functionality associated to this events.
Evchain_FBcl.EvCurr
Evchain_FBcl.EvCurr
in Evchain_FBcl.evList
as members, as smallest part.
Evchain_FBcl.Evcurr#evin
is characterized by its EvinType_FBcl
of the FBlock_Type_FBcl
and excatly one of its associated EvinType_FBcl.operations
. The operation describes the connectivity and the functinality.
(An EvinType_FBcl
can have more as one operations, then it is a forked event inside the Submodule.
Only one is member of a evChain).
Evchain_FBcl.EvCurr#operEvinType
characterizes the member.
Evchain_FBcl.EvCurr#evin
which refers the FBlock instance.
Evchain_FBcl.EvCurr
(evChain members) inside, if the submodule is more complex.
DoutType_FBcl
from the event Evchain_FBcl.EvCurr#operEvinType
:
Operation_FBcl.iterDout(FBlock_FBcl)
describes the associated outputs of the FBlock for this evChain Member.
EvoutType_FBcl.iterDataPins()
.
DoutType_FBcl.operDout
. That is for combinatoric outputs.
The operDout may refer other Operation_FBcl#mUsedDin
than the EvinType_FBcl.operations
.
Operation_FBcl
inside an Evchain_FBcl
Evchain_FBcl
starts with its Evchain_FBcl.operation
.
It is the same operation as the selected EvinType_FBcl.operations
where the Evchain starts in the module.
This operation contains all evin/out and din/out which are affected by this part of evin functionality.
Depending affected outputs are designated as 'virtual'.
Evchain_FBcl
has depending (following) evChains, especially inside a subModule,
then the Evchain_FBcl.operation
has Operation_FBcl.iterDepNext()
.
This following operation(s) may be marked with Operation_FBcl.hasStatements()
.
Evchain_FBcl
is separated in a part with statements, which are executed if the event occurs,
and some parts of the chain, which are accessed by a combinatoric functionality of an output.
For a complete code generation of the chain this combinatoric functions are generated in the same target code operation,
but for an optimized target code, the access to the combinatoric output is handled extra and only if the output is
really used. That saves calculation time.
Operation_FBcl.doutCombin
. It is the DoutType_FBcl
of the module
which`s access calls this operation.
Evchain_FBcl.operation
and thus also
the appropriate EvinType_FBcl.operations
is the same as the DoutType_FBcl.operDout()
.
Operation_FBcl
. This is because more as one parallel combinatoric data flow is given
within the sequential event connection.
Evchain_FBcl
Evchain_FBcl.ixEvcurrWithStatements
marks the last Evchain_FBcl.EvCurr
in the Evchain_FBcl.evList
which is used for statements of the evChain. This ixEvCurrWithStatements is == -1
if the evChain is only combinatoric.
Dout_FBcl.isObjectVar()
marks outputs, which are used in the module by other evChain too.
On target code generation they should be presented by an instance variable.
This Dout_FBcl
appropriate to an Evchain_FBcl.EvCurr#operEvinType
are (have to be) a part of the
Evchain_FBcl.ixEvcurrWithStatements
range.
Dout_FBcl#isPresentedByVar
not of chain marks outputs, which should be presented by local variables
in an target output access routine to hold more as one used values.
They are not a part of the Evchain_FBcl.ixEvcurrWithStatements
range.
Translation2Target_FBtrl
.Modifier and Type | Field and Description |
---|---|
(package private) boolean |
dbgMdl |
private int |
ixEvIntern
Index of inner
EvinType_FBcl starting after the evin of the module. |
Constructor and Description |
---|
BuildEvchainOperation_FBcl() |
Modifier and Type | Method and Description |
---|---|
private EvinType_FBcl |
buildEvchain(Evchain_FBcl.Wr evChain,
Write_Module_FBwr mdlwr,
java.util.List<Evchain_FBcl.Wr> evChainList)
Build one Evchain_FBcl.
|
(package private) void |
buildOperDout(Write_Module_FBwr mdlwr) |
static Module_FBcl |
execute(Write_Module_FBwr mdlwr,
Prj_FBCLrd pj,
WriterDataFBcl wrDataFBcl)
Builds event chains with its operation.
|
private Evchain_FBcl.Wr |
newEventChain(java.lang.String nameOperation,
int ixOperFB1,
Evin_FBcl evinStart,
EvinType_FBcl evinPin,
Operation_FBcl operPrev,
long mBitsEvchain,
Write_Module_FBwr mdlwr)
Creates a new
Evchain_FBcl and adds it to evChainList. |
private void |
newEventChains(java.util.List<Evchain_FBcl.Wr> evChainList,
Evout_FBcl evoutSrc,
EvinType_FBcl evinPin,
java.lang.String simpleName,
Operation_FBcl operPrev,
long mBitsEvchain,
Write_Module_FBwr mdlwr)
Checks all dst event and builds one or more new eventChain with the start events.
|
private Evin_FBcl |
nextEventOfEvchain(Write_Module_FBwr mdlwr,
Pin_FBcl evinCurr,
Operation_FBcl operCurr,
Operation_FBcl operEvinType,
long mBitsEvchain,
java.util.List<Evchain_FBcl.Wr> evChainList)
Process one element in the event chain.
|
private int ixEvIntern
EvinType_FBcl
starting after the evin of the module.
Inner EvinType are created because any event-operation should have an Operation_FBcl.event
reference.
This may be necessary for a correct system.boolean dbgMdl
public static Module_FBcl execute(Write_Module_FBwr mdlwr, Prj_FBCLrd pj, WriterDataFBcl wrDataFBcl)
mdlwr
- The model writeable accessible.pj
- tool environmentwrDataFBcl
- class to write output files (*.fbcldata)private EvinType_FBcl buildEvchain(Evchain_FBcl.Wr evChain, Write_Module_FBwr mdlwr, java.util.List<Evchain_FBcl.Wr> evChainList)
evChain
- mdlwr
- evChainList
- private void newEventChains(java.util.List<Evchain_FBcl.Wr> evChainList, Evout_FBcl evoutSrc, EvinType_FBcl evinPin, java.lang.String simpleName, Operation_FBcl operPrev, long mBitsEvchain, Write_Module_FBwr mdlwr)
evChainList
- To add the new chainevoutSrc
- The source pin before the event chain,
it may have more as one dst, then more as one eventChains are created.evinPin
- The correspond type pin for the evoutSrc.
Either the evoutSrc is an evinPort, then it is the evin on the type.
Or the evoutSrc is an inner pin for an inner operation, then evinPin is an evOperationsimpleName
- operPrev
- often null, maybe a previous Operation for an inner operation.mdlwr
- private Evchain_FBcl.Wr newEventChain(java.lang.String nameOperation, int ixOperFB1, Evin_FBcl evinStart, EvinType_FBcl evinPin, Operation_FBcl operPrev, long mBitsEvchain, Write_Module_FBwr mdlwr)
Evchain_FBcl
and adds it to evChainList.evChainList
- Add to this listnameOperation
- The name of the operation added to evinStartixOperFB1
- Index of the operation in the new Evchain_FBcl.ixFirstOper
evinStart
- The start event of the chain.evoutSrc
- The src event before the chainevinPin
- null or the evin pin on the Module. null then an internal evin will be crated.operPrev
- null or a previous Evchain_FBcl.operation
mBitsEvchain
- The bit designation of the prvious evChain, more as one bit set on a E_REND FBlock.mdlwr
- the module access.private Evin_FBcl nextEventOfEvchain(Write_Module_FBwr mdlwr, Pin_FBcl evinCurr, Operation_FBcl operCurr, Operation_FBcl operEvinType, long mBitsEvchain, java.util.List<Evchain_FBcl.Wr> evChainList)
mdlwr
- evinCurr
- the current evin of any FBlock instance in the module as current member of this event chainoperCurr
- the operation which is associated with this event chain. To this opeation a depending next new one is added if a fork of events is detected.evChainList
- to register new event chain start points (a new Evchain_FBcl
instance) to process later.
It is set if a fork of events is detected.evoutCurrRet
- reference to store the only one evout to this evchain. Note: If the evinCurr drives more as one evout, the chain is ended here.void buildOperDout(Write_Module_FBwr mdlwr)