public class Dataflow2Eventchain_FBrd
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
ctActivity |
(package private) EventCluster_FBrd |
evCluster_Startup
Special event cluster for calculation of constants (In Simulink as "inf" = "infinite" sample time. ).
|
(package private) java.util.List<EventCluster_FBrd> |
evclusters
Contains all FBlocks which are associated to a Event source but not wired yet.
|
(package private) java.util.LinkedList<MetaEvin_FBrd> |
evinToProcess |
(package private) java.util.Map<java.lang.Long,EventCluster_FBrd> |
idxEvCl |
(package private) java.util.Map<java.lang.String,EventCluster_FBrd> |
idxEvClUpd |
(package private) Prj_FBCLrd.Log |
log |
(package private) java.util.Map<java.lang.String,MetaEvin_FBrd> |
mapMevin |
(package private) Write_Module_FBwr |
mdlWr
Set in
#prc(Module_FBcl) , the only one public routine of this class. |
(package private) java.util.List<MetaDataInpin_FBrd> |
metaInBonds |
Constructor and Description |
---|
Dataflow2Eventchain_FBrd(java.io.Writer log) |
Modifier and Type | Method and Description |
---|---|
private void |
addAllOtherImmediatelyDin(java.util.List<DinType_FBcl> gatherDinIfc,
Dout_FBcl dinPort,
int recursively) |
private void |
addEvinToProcess(MetaEvin_FBrd mevin) |
private void |
assignEvClusterToAllMetaEvin()
Assigns the correct event cluster to any used FBlock-evin due to the mask
of primary cluster signification.
|
private void |
associateMaskBitsToAllMetaEvin() |
private void |
buildEventChainInCluster(EventCluster_FBrd evCluster)
Builds the event chain in any detected cluster from the first start fb in one serial line.
|
private void |
checkConnIn(MetaEvin_FBrd mfb)
Checks the din of the Operation associated to this evin of any FBlock.
|
private void |
checkDout(Dout_FBcl doutSrc,
Portdout_FBcl.Wr doutPort,
DoutType_FBcl doutIfc) |
private boolean |
checkFBlockConnInSerialInCluster(MetaEvin_FBrd srcmev,
MetaEvin_FBrd dstmev,
EventCluster_FBrd evCluster)
Checks all input connection of dstmfb and connect the srcmfb with dstmfb if possible.
|
private void |
checkOtherDstConnInFromOutport(Pin_FBcl dinParallel,
EvoutType_FBcl evoutIfc,
EventCluster_FBrd evCluster,
Write_Module_FBwr mdlWr)
Checks whether another ConnInput from the original FB for Outpin
is another (parallel) Outpin (usual stupid)
is an input of a Mux for association more as one output for events.
|
private void |
checkSetEvin(Write_Module_FBwr mdlWr,
long maskCheck,
int recursive) |
private void |
connectEvents(MetaEvin_FBrd srcmev,
MetaEvin_FBrd currmev)
Connects the given Evin and additionally events from other cluster or from inPins.
|
private void |
connectEventSrcOut(DoutType_FBcl srcOut,
EvinType_FBcl evIn) |
private void |
connectOtherEvCluster()
This routine is invoked at last after the event chain in the cluster is established.
|
private void |
createEvInputFromDataPins(Write_Module_FBwr mdlWr)
Analyzes
metaInBonds and detects which input drives the same cluster. |
private void |
createEvInputFromDinPort(Write_Module_FBwr mdlWr)
Creates
EvinType_FBcl for the type of the module
appropriate to the DinType_FBcl of the module
or adequate Write_Module_FBwr.iterDinPort() of the inner module. |
private void |
detectEndOutpinFBlockForEvCluster()
Gathers all output pins of the module, builds output events
and associates the output pins.
|
private void |
detectEndStateFBlocksForEvCluster() |
private void |
detectStartupFBlocks()
A FBlock is marked with startup as stepTime if it is a constant or is marked in any appropriate kind in the graphical model.
|
private Evout_FBcl |
getaddBondIn_steptimeEvent(MetaEvin_FBrd mfb) |
private EventCluster_FBrd |
getCreateUpdEvcluster(java.lang.String steptime) |
private MetaEvin_FBrd |
getEvinpinFromDout(Pin_FBcl dout) |
private MetaEvin_FBrd |
getMetaEvin(Evin_FBcl evin,
Operation_FBcl oper) |
private MetaFBlock_FBrd |
getOrCreateMetaFB(FBlock_FBcl fb) |
private MetaDataInpin_FBrd |
getOrCreateMetaInpin(Pin_FBcl bondIn) |
private void |
initMapMeta(Module_FBcl mdl)
Builds instances of
MetaEvin_FBrd for each evin pin of the FBlocks of this module. |
void |
prc(Write_Module_FBwr mdlwr) |
final Prj_FBCLrd.Log log
Write_Module_FBwr mdlWr
#prc(Module_FBcl)
, the only one public routine of this class.java.util.Map<java.lang.String,MetaEvin_FBrd> mapMevin
java.util.List<MetaDataInpin_FBrd> metaInBonds
java.util.List<EventCluster_FBrd> evclusters
java.util.Map<java.lang.Long,EventCluster_FBrd> idxEvCl
java.util.Map<java.lang.String,EventCluster_FBrd> idxEvClUpd
EventCluster_FBrd evCluster_Startup
java.util.LinkedList<MetaEvin_FBrd> evinToProcess
int ctActivity
public void prc(Write_Module_FBwr mdlwr)
private void initMapMeta(Module_FBcl mdl)
MetaEvin_FBrd
for each evin pin of the FBlocks of this module.
The instances are sorted by key built in MetaEvin_FBrd.MetaEvin_FBrd(Evin_FBcl, Operation_FBcl)
and stored in mapMevin
to use transient for this functionality.mdl
- private MetaEvin_FBrd getEvinpinFromDout(Pin_FBcl dout)
private void detectEndOutpinFBlockForEvCluster()
EventCluster_FBrd
is build and add
to evclusters
.
MetaEvin_FBrd
is added usind addEvinToProcess(MetaEvin_FBrd)
to evinToProcess
.
This MetaEvin_FBrd is added to the assiciated Event cluster using
EventCluster_FBrd.addEndEvin(MetaEvin_FBrd)
- Hence it is the start to detect
the event chain.
mdlWr
- Writer for the module, access to the moduleprivate void checkDout(Dout_FBcl doutSrc, Portdout_FBcl.Wr doutPort, DoutType_FBcl doutIfc)
private void checkOtherDstConnInFromOutport(Pin_FBcl dinParallel, EvoutType_FBcl evoutIfc, EventCluster_FBrd evCluster, Write_Module_FBwr mdlWr)
dinParallel
- eventBondOutpin
- evCluster
- mdlWr
- private void detectEndStateFBlocksForEvCluster()
private EventCluster_FBrd getCreateUpdEvcluster(java.lang.String steptime)
private void detectStartupFBlocks()
private void associateMaskBitsToAllMetaEvin()
private void assignEvClusterToAllMetaEvin()
private void checkConnIn(MetaEvin_FBrd mfb)
MetaEvin_FBrd.bStartEvinOfCluster
.
If all inputs come from another event cluster or as port, the bStartFBlockOfCluster is set.
It helps to find the start in the cluster.
MetaDataInpin_FBrd.addDstEvent(EventCluster_FBrd)
if the connin is a inpin
MetaEvin_FBrd.bStartEvinOfCluster
= false if a connIn is found to a FBlock of the same cluster.
mfb
- private void addEvinToProcess(MetaEvin_FBrd mevin)
private void createEvInputFromDataPins(Write_Module_FBwr mdlWr)
metaInBonds
and detects which input drives the same cluster.
With this information the event inputs of the module are created
via calling Write_Module_FBwr.addEvinPort(String)
and the event inputs are associated to the data inputs.
For any element in metaInBonds
the association MetaDataInpin_FBrd#evInput
is set
with the new created instance of MetaEvInput
. This helps to associate the event input
of the following FBlocks, see connectEvents(MetaEvin_FBrd, MetaEvin_FBrd)
.mdlWr
- private void checkSetEvin(Write_Module_FBwr mdlWr, long maskCheck, int recursive)
private void createEvInputFromDinPort(Write_Module_FBwr mdlWr)
EvinType_FBcl
for the type of the module
appropriate to the DinType_FBcl
of the module
or adequate Write_Module_FBwr.iterDinPort()
of the inner module.
This routine is intent to create less EvinType_FBcl
for the module.
All input ports which are connected immediately to the same operations (of the following FBlock)
get only one common event input.
But all inputs which are independent to other inputs gets different event inputs.mdlWr
- private void addAllOtherImmediatelyDin(java.util.List<DinType_FBcl> gatherDinIfc, Dout_FBcl dinPort, int recursively)
private void buildEventChainInCluster(EventCluster_FBrd evCluster)
evCluster
- private boolean checkFBlockConnInSerialInCluster(MetaEvin_FBrd srcmev, MetaEvin_FBrd dstmev, EventCluster_FBrd evCluster)
srcmev
- the fb where the chain comes from, the last fb in the chain.
It need not be data-connected with dstmfb,
it can be a FBlock of any other data chain if parallel branches are exists.
It is only used to build the chain.dstmev
- fb to checkevCluster
- own clusterprivate void connectEvents(MetaEvin_FBrd srcmev, MetaEvin_FBrd currmev)
MetaEvin_FBrd.srcsOtherEvCluster
and MetaEvin_FBrd.srcInpins
from the nextmev are checked
whether some more event inputs are necessary, respectively this is the event input from the start fblock.
checkFBlockConnInSerialInCluster(MetaEvin_FBrd, MetaEvin_FBrd, EventCluster_FBrd)
.srcmev
- if null then the currmev is the first block of the cluster.currmev
- the current event, srcmev and currmev are connected as serial event chain in the cluster.private Evout_FBcl getaddBondIn_steptimeEvent(MetaEvin_FBrd mfb)
private void connectOtherEvCluster()
private void connectEventSrcOut(DoutType_FBcl srcOut, EvinType_FBcl evIn)
private MetaFBlock_FBrd getOrCreateMetaFB(FBlock_FBcl fb)
private MetaEvin_FBrd getMetaEvin(Evin_FBcl evin, Operation_FBcl oper)
private MetaDataInpin_FBrd getOrCreateMetaInpin(Pin_FBcl bondIn)