public class Evout_FBcl extends Evinout_FBcl
Pin_FBcl.XXXXXEKind
Modifier and Type | Field and Description |
---|---|
int |
idEventParallel
It is an id to distinguish parallel event chains.
|
protected java.util.Map<Evout_FBcl,Evout_FBcl> |
idxRepresentingEvents
Used while build the event chain.
|
static int[] |
isevinDriven |
static java.util.Map<Evout_FBcl,Evout_FBcl> |
null_idxRepresentingEvents |
static Evout_FBcl[] |
nullArray |
condBits, idEvent, idEventCt, mEvinClusterEnd, mEvoutClusterStart, nrEventInChain
connectDst, connectSrc, fb, name, pint, version, xy
Constructor and Description |
---|
Evout_FBcl(PinType_FBcl pint,
FBlock_FBcl fb,
XY_FBcl xy)
Ctor constructs an evout instance with the same name as stored in the type.
|
Evout_FBcl(PinType_FBcl pint,
java.lang.String name,
FBlock_FBcl fb,
XY_FBcl xy)
Ctor constructs an evout instance with a given specific name, may be another than the name in the type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addConditionBit(int nrBit)
Adds one bit with given number to each element of the second dimension of
Evinout_FBcl.condBits . |
boolean |
andConditionBits(long[][] mask)
If a Join_OFB is on input of a FBlock, all conditions of this events should be merged to AND and OR conditions for the Join event output.
|
java.lang.Iterable<Evin_FBcl> |
connectDst() |
long[] |
getConditionMaskMdl() |
boolean |
getEvMdlGuardBecauseInit(java.util.List<Evout_FBcl> listEvMdlGuard,
boolean bDstInit)
Searches in all sources of the eventchain (in
idxRepresentingEvents events from the modules inputs. |
int |
getLastCondBit()
Returns the bit number of the last set bit in
Evinout_FBcl.condBits |
boolean |
isDrivenByInit(Evout_FBcl evoutSrc) |
boolean |
isDrivenInChainBy(Evout_FBcl evoutSrc) |
boolean |
isDrivenInChainByAnyEvent() |
boolean |
isPropagated()
Check whether this evout is already regarded in the event propagation from data flow.
|
org.vishia.util.IterableIterator<Dout_FBcl> |
iterDout() |
org.vishia.util.IterableIterator<Dout_FBcl> |
iterDout(boolean bCreate)
Iterator over all associated dout pins for this evout.
|
org.vishia.util.IterableIterator<Evin_FBcl> |
iterEvin() |
org.vishia.util.IterableIterator<Evin_FBcl> |
iterEvin(boolean bCreate)
Iterator over all evin which are immediately corresponding to the given evout (for simple state machine Basic FBlocks)
Often it is only one evin.
|
org.vishia.util.IterableIterator<PinPort_FBcl> |
iterPort() |
java.lang.Iterable<Evout_FBcl> |
iterRepresentingEvents() |
void |
orConditionBits(long[][] mask,
long[] allBitsArg)
Sets the condition if
Evinout_FBcl.condBits ==null or adds an OR condition
to the given condBits. |
EvoutType_FBcl |
pintype()
Returns the type event. accesses
Pin_FBcl.pint and cast it to the expected EvoutType_FBcl. |
void |
setRepresentingEvent(Evout_FBcl evoutRepresenting)
Mark the event with all evoutSrc in the event chain before.
|
java.lang.StringBuilder |
toString(java.lang.StringBuilder app,
java.lang.String... cond) |
java.lang.String |
varName()
Returns a variable name proper to the Dout and FBlock.
|
getConditionBits, set_orNewConditionBits
addEvchain, addEvchainDepending, connDst, connectFrom, connectFrom, connSrc, containsEvchain, containsOtherEvchain, dinType, doutType, evChainHex, evinType, evoutType, fbtypeName, getFirstConnDst, getFirstConnSrc, getMaskEvinMdlChainDriven, getMaskEvoutMdlBackChainDriven, getOneConnSrc, getOneConnSrc, isEventBackChainDriven, isEventBackChainDriven, isEventChainDriven, isEventChainDriven, isEventChainDriven, isEventChainDriven, isKind, isNotKind, isUpdatePin, iterConnDst, iterConnSrc, iterEvchainDep, iterEvchainShow, nameFBpin, nameFBpin, nrofConnDst, nrofConnSrc, pinType, removeConnectDst, removeConnectSrc, removeConnSrcAll, removePinSimpleInConnDst, setEventBackChainDriven, setEventChainDriven, spec, spec, throwError, toString, XXXremoveConnectSrc, XXXremoveConnSrc
public static Evout_FBcl[] nullArray
public static java.util.Map<Evout_FBcl,Evout_FBcl> null_idxRepresentingEvents
public static int[] isevinDriven
public transient int idEventParallel
protected transient java.util.Map<Evout_FBcl,Evout_FBcl> idxRepresentingEvents
public Evout_FBcl(PinType_FBcl pint, FBlock_FBcl fb, XY_FBcl xy)
pint
- the given type definition of this event.fb
- associated FBlockpublic Evout_FBcl(PinType_FBcl pint, java.lang.String name, FBlock_FBcl fb, XY_FBcl xy)
pint
- the given type definition of this event.name
- the desired name.fb
- associated FBlockpublic java.lang.String varName()
public EvoutType_FBcl pintype()
Pin_FBcl.pint
and cast it to the expected EvoutType_FBcl.public java.lang.Iterable<Evin_FBcl> connectDst()
public org.vishia.util.IterableIterator<Dout_FBcl> iterDout(boolean bCreate)
public org.vishia.util.IterableIterator<Dout_FBcl> iterDout()
public org.vishia.util.IterableIterator<PinPort_FBcl> iterPort()
public org.vishia.util.IterableIterator<Evin_FBcl> iterEvin(boolean bCreate)
public org.vishia.util.IterableIterator<Evin_FBcl> iterEvin()
public void setRepresentingEvent(Evout_FBcl evoutRepresenting)
isDrivenInChainBy(Evout_FBcl)
,
See org.vishia.fbcl.readSource.Dataflow2Eventchain_FBrd#checkDinOtherAndConnectEv(org.vishia.fbcl.readSource.Dataflow2Eventchain_FBrd.EvPrepUpdInQueue, org.vishia.fbcl.fblockwr.Write_FBlock_FBwr, Evin_FBcl, java.util.List, java.util.List, java.util.List, int)
evoutSrc
- an event which drives this event in the event chain.
null possible, then the own event is entered only in idxRepresentingEvents
public java.lang.Iterable<Evout_FBcl> iterRepresentingEvents()
public boolean isDrivenInChainBy(Evout_FBcl evoutSrc)
public boolean isDrivenInChainByAnyEvent()
public boolean isDrivenByInit(Evout_FBcl evoutSrc)
public boolean getEvMdlGuardBecauseInit(java.util.List<Evout_FBcl> listEvMdlGuard, boolean bDstInit)
idxRepresentingEvents
events from the modules inputs.
It one of the module input event is named "init" all other found events are stored in the return list.
Then the init eventchain should be garded with the module's init (the FB with init should only processed on module init),
and a not init event chain should be garded with all events (OR) from this list.
It should not be processed if init comes.
If the modules input does not contain "init" then null is returned because no extra action is required.bDrivenByInit
- [0] = true if this evDst of a chain is forced by the module's init event input.public boolean isPropagated()
idxRepresentingEvents
is set.public boolean addConditionBit(int nrBit)
Evinout_FBcl.condBits
.
This is an AND relation for the given condition bits.
This is used for a primary condition in an 'ExprEv' FBlock or from a State FBlock.
This is also used for a module's evin (Type Evout_FBcl
) to notice, which conditions are used.
The second dimension is not used. It means condBits.length ==1
for the second dimension.
this is tested by assertion.nrBit
- which bit is to set. If the nrBit is >=64, the first dimension is expanded if necessary.public void orConditionBits(long[][] mask, long[] allBitsArg)
Evinout_FBcl.condBits
==null or adds an OR condition
to the given condBits.mask
- null for uncondtional, or a new condition from any other Evinout_FBcl.getConditionBits()
which should be ORed.
The condition vector itself is copied (original should not be changed).
It can be null for 'unconditional'.allBitsArg
- All condition bits from this event chain.
If all these bits are set because of OR, the Evinout_FBcl.condBits
get be unconditionally.public boolean andConditionBits(long[][] mask)
Bitfield.mergeWords(long[][], long[][])
, see examples there.log
- public int getLastCondBit()
Evinout_FBcl.condBits
public long[] getConditionMaskMdl()
public java.lang.StringBuilder toString(java.lang.StringBuilder app, java.lang.String... cond)
toString
in interface org.vishia.util.ToStringBuilder
toString
in class Evinout_FBcl