public class EccAction_FBcl
extends java.lang.Object
implements org.vishia.util.ToStringBuilder
Modifier and Type | Field and Description |
---|---|
private boolean |
bMoreEventSources |
DoutType_FBcl |
doutCombin
The associated dout if it is a operation for combinatoric, else null
|
(package private) FBtype_FBcl |
fbt |
private org.vishia.util.OutTextPreparer |
genCodeStmnt
If not null then it contains the generation rule to execute the event-forced operation
for execution statements of the event-chain order.
|
boolean |
isSrcGenerated |
int |
ixEvchainInMdl |
int |
ixOperInEvent
The index of this operation inside the
event() EvinoutType_FBcl.actions . |
int |
ixOperInMdl |
long |
mCorrespondEvinForUpdate
Bits for evin of this FBlock which are necessary for this update event.
0 if this Operation is not an dedicated update operation.
|
private long |
mDin
Bits for up to 63
FBlock_FBcl.din which are Input pins for this operation. |
private long |
mDinVirt |
private long |
mDout
Bits for up to 64
FBlock_FBcl.dout which are influenced or driven by this operation. |
private long |
mDoutSet
Bits for up to 64
FBlock_FBcl.dout which are immediately set into a state variable in the calling level. |
private long |
mDoutVirt
Bits for up to 64
FBlock_FBcl.dout which are direct or indirect influenced or driven by this operation. |
private long |
mEvin
Bits for up to 63
FBlock_FBcl.evin -pins which influences the outputs of this operation. |
private long |
mEvinVirt
Bits for up to 63
FBlock_FBcl.evin -pins which influences the outputs of this operation
or depending operations. |
long |
mEvout
Bits for up to 62
FBlock_FBcl.evout which fires immediately due to this event pin for combinatoric (simple FB with only algorithm)
This is usual 0x0001 for the primitive FBs. |
long |
mEvoutTrgStm
Bits for up to 62
FBlock_FBcl.evout which may fire because a statemachines switches
triggered with an evin with this operation (input event). |
long |
mEvoutVirt
Bits for up to 62
FBlock_FBcl.evout which are direct or indirect triggered by this operation. |
private static long |
mHasStatements
If this bit 63 is set in
mEvin this Operation has Statements, it is necessary. |
private static long |
mNecessaryEventOper
If this bit 63 is set in
mEvout this Operation is generated in any case. |
private long |
mNextDepending
Mask of bits for depending operations inclusively the own operation.
|
long |
mOperGenerated
Mask of all operations which are executed already in the generated code of this.
|
private long |
mPrevDep
Mask of bits for depending operations inclusively the own operation.
|
static long |
mUsesThis
If this bit 63 is set in
mDin it needs the instance pointer to work (this) |
java.lang.String |
name |
private java.util.List<EccAction_FBcl> |
nextDepending |
(package private) static java.util.List<EccAction_FBcl> |
nullist
Empty List as Iterator without content.
|
private EvinoutType_FBcl |
oneTriggerEv
The event which drives the operation originally and immediately.
|
private java.util.List<EccAction_FBcl> |
prevDepending |
private static java.lang.String |
sIndent |
private java.lang.String |
sOperation |
Constructor and Description |
---|
EccAction_FBcl(EccAction_FBcl src,
EvinoutType_FBcl evType)
Copy constructor with given Action, but for association to another event.
|
EccAction_FBcl(java.lang.String name,
EvinoutType_FBcl evinType,
int ixOperInMdl) |
EccAction_FBcl(java.lang.String name,
FBtype_FBcl fbt,
DoutType_FBcl doutCombin,
int ixOperInMdl) |
EccAction_FBcl(java.lang.String name,
FBtype_FBcl fbt,
int ixOperInMdl,
int ixEvout) |
EccAction_FBcl(java.lang.String name,
int ixEvchainInMdl,
EvinoutType_FBcl evinType,
int ixOperInMdl) |
Modifier and Type | Method and Description |
---|---|
void |
addDepPrev(EccAction_FBcl operPrev)
Adds an operation as previous depending, set all virtual Pins
|
void |
addEvbitFromOperation(EccAction_FBcl src)
It is for
Dout_FBcl#operCombin derived from src Evchain_FBcl.operation |
void |
addFromOperation(EccAction_FBcl src,
boolean bWithDeps) |
void |
addTrgEvin(EvoutType_FBcl evTrg,
Write_FBtype_FBwr fbtw)
Sets one trigger event which forces this action.
|
void |
assignDin(DinType_FBcl din)
Registeres this operation in din and store the bit in
#mUsedDinAll . |
void |
assignDin(Pin_FBcl pin) |
void |
assignDout(DoutType_FBcl dout,
boolean setVariable)
Sets the given Bit for associating an dout pin to this operation and registers this operation to the pin.
|
void |
assignEvout(EvinoutType_FBcl evout)
Sets the given Bit for associating an evout pin to this operation.
|
void |
clearDinBits(long mBits)
Clear given input Port pins to the operation.
|
EvinoutType_FBcl |
event()
Returns the only one trigger event.
|
org.vishia.util.OutTextPreparer |
genCodeStmnt() |
boolean |
hasStatements()
True then this operation should produce statements.
|
boolean |
hasStatementsAlsoInNextDeps() |
boolean |
hasStatementsGen() |
boolean |
isDrivenFromSameEvchain(EccAction_FBcl operSrc)
Returns true if the operSrc is driven by the same event as this.
|
boolean |
isNecessaryEventOper()
Returns true if this operation is unconditionally necessary to call in the event chain.
|
java.lang.Iterable<EccAction_FBcl> |
iterDepNext() |
java.lang.Iterable<EccAction_FBcl> |
iterDepPrev() |
java.lang.Iterable<Din_FBcl> |
iterDin(FBlock_FBcl fb) |
java.lang.Iterable<DinType_FBcl> |
iterDinIfc(FBtype_FBcl fbIfc) |
java.lang.Iterable<Dout_FBcl> |
iterDout(FBlock_FBcl fb)
Used especially in
BuildEvchainOperation_FBcl#checkDinDout(Pin_FBcl, Evchain_FBcl, EccAction_FBcl, org.vishia.fbcl.fblockwr.Write_Module_FBwr)
to detect whether this Operation is necessary. |
java.lang.Iterable<Dout_FBcl> |
iterDoutVirt(FBlock_FBcl fb) |
java.lang.Iterable<Evin_FBcl> |
iterEvin(FBlock_FBcl fb)
Returns the Iterable over all associated evin pins of an Operation.
|
java.lang.Iterable<Evin_FBcl> |
iterEvinUpdate(FBlock_FBcl fb) |
java.lang.Iterable<Evout_FBcl> |
iterEvout(FBlock_FBcl fb)
Returns the Iterable over the
FBlock_FBcl.evout of the given fb with this associated operation of the Type. |
java.lang.Iterable<Evout_FBcl> |
iterEvoutVirt(FBlock_FBcl fb)
Returns the Iterable over the
FBlock_FBcl.evout of the given fb with this associated operation of the Type. |
long |
mCorrespondEvinForUpdate() |
long |
mDin()
Returns the input pins which are used by this operation.
|
long |
mDinPins()
Returns the input pins which are used by this operation.
|
long |
mDinVirt() |
long |
mDout()
Returns the mask which outputs are influenced by this operation.
|
long |
mDoutSet()
Returns the mask which outputs should be presented by a variable and offer with a reference to it on call of this routine
in the target language..
|
long |
mDoutVirt() |
long |
mEvinVirt() |
long |
mEvoutBitsVirt() |
java.lang.String |
name() |
int |
nrDout() |
private static int |
nrof1Bits(long mask) |
int |
nrofEvout() |
private void |
setDinBitNext(long mBit,
int recursion) |
void |
setDinBits(long mBit)
Set necessary input Port pins to the operation.
|
void |
setDinBitsVirt(long mBit)
Transfers the yet need Input Port pins to the operation.
|
void |
setDinBitsVirtFrom(EccAction_FBcl operSrc) |
void |
setDoutBits(long mBit) |
void |
setDoutPin(DoutType_FBcl doutType)
Marks this operation as combinatoric for this given output pin.
|
void |
setDoutVirt(long mBit) |
private void |
setDoutVirtPrev(long mBit,
int recursion) |
void |
setEvin(EvinoutType_FBcl evin) |
void |
setEvinBits(long mBit) |
void |
setEvinVirtFrom(EccAction_FBcl operSrc)
Mark one evChain-chain of depending chains.
|
void |
setEvoutBits(long mBit) |
private void |
setEvoutBitVirtPrev(long mBit,
int recursion) |
void |
setGenCodeStmnt(org.vishia.util.OutTextPreparer genCodeStatement) |
void |
setGenCodeStmnt(java.lang.String sOperation,
java.lang.String... argNames) |
void |
setHasStatements()
Set the information that the operation produce statements, it is necessary.
|
void |
setNecessaryEventOper()
Set for special operations and all operations of event in state machines:
The operation is unconditionally necessary to call.
|
void |
setUsesThis()
Set if the operation needs any instance variable.
|
java.lang.String |
toString() |
java.lang.StringBuilder |
toString(java.lang.StringBuilder w,
java.lang.String... cond)
String representation of an operations:
Output nuances: 1/1 two digits: immediately and virtual (over depending operations) 0/1/1 three digits: first is the set dout from the operation. |
java.lang.String |
toStringDependingNext(int indent) |
private java.lang.String |
toStringDependingNext(int indent,
java.lang.StringBuilder sb) |
java.lang.String |
toStringDependingPrev(int indent) |
private java.lang.String |
toStringDependingPrev(int indent,
java.lang.StringBuilder sb) |
boolean |
usesThis()
Returns true if the operations needs the instance of the FBlock, usual this in C++ or thiz in C objectOriented.
|
long |
XXXmEvoutBits() |
static java.util.List<EccAction_FBcl> nullist
public int ixOperInMdl
public boolean isSrcGenerated
public long mOperGenerated
Module_FBcl.allOperations()
resp. corresponds to ixOperInMdl
of each other Operation. The bit of this is set too.final FBtype_FBcl fbt
private EvinoutType_FBcl oneTriggerEv
private boolean bMoreEventSources
public final int ixOperInEvent
event()
EvinoutType_FBcl.actions
.public DoutType_FBcl doutCombin
public long mCorrespondEvinForUpdate
public final int ixEvchainInMdl
private static final long mHasStatements
mEvin
this Operation has Statements, it is necessary.
If the bit is 0, the operation is only present in FBcl data to inform about usage pins.private long mEvin
FBlock_FBcl.evin
-pins which influences the outputs of this operation.
The bit 63 is used to mark with mHasStatements
private long mEvinVirt
FBlock_FBcl.evin
-pins which influences the outputs of this operation
or depending operations.public long mEvoutTrgStm
FBlock_FBcl.evout
which may fire because a statemachines switches
triggered with an evin with this operation (input event).private static final long mNecessaryEventOper
mEvout
this Operation is generated in any case.
It is especially for Event-Operations for internal Access.public long mEvout
FBlock_FBcl.evout
which fires immediately due to this event pin for combinatoric (simple FB with only algorithm)
This is usual 0x0001 for the primitive FBs. This value is set in the type.public long mEvoutVirt
FBlock_FBcl.evout
which are direct or indirect triggered by this operation.public static final long mUsesThis
mDin
it needs the instance pointer to work (this)private long mDin
FBlock_FBcl.din
which are Input pins for this operation.private long mDinVirt
private long mDoutSet
FBlock_FBcl.dout
which are immediately set into a state variable in the calling level.
It is either for a predefined Function in the target language or for a state variable from a unit delay.
The module may not need any own state variable (for example for unit delay).private long mDout
FBlock_FBcl.dout
which are influenced or driven by this operation.private long mDoutVirt
FBlock_FBcl.dout
which are direct or indirect influenced or driven by this operation.public final java.lang.String name
private long mPrevDep
private long mNextDepending
private java.util.List<EccAction_FBcl> prevDepending
private java.util.List<EccAction_FBcl> nextDepending
private java.lang.String sOperation
private org.vishia.util.OutTextPreparer genCodeStmnt
EvinoutType_FBcl#operation(int)
then this is a combinatoric block.
Its functionality is stored in DoutType_FBcl#operation(int)
in this same element.private static java.lang.String sIndent
public EccAction_FBcl(java.lang.String name, int ixEvchainInMdl, EvinoutType_FBcl evinType, int ixOperInMdl)
public EccAction_FBcl(java.lang.String name, FBtype_FBcl fbt, int ixOperInMdl, int ixEvout)
public EccAction_FBcl(java.lang.String name, EvinoutType_FBcl evinType, int ixOperInMdl)
public EccAction_FBcl(EccAction_FBcl src, EvinoutType_FBcl evType)
src
- evType
- public EccAction_FBcl(java.lang.String name, FBtype_FBcl fbt, DoutType_FBcl doutCombin, int ixOperInMdl)
public final java.lang.String name()
public void addTrgEvin(EvoutType_FBcl evTrg, Write_FBtype_FBwr fbtw)
oneTriggerEv
and can be get with #event().
If there are more events bMoreEventSources
is set.
The events can be get only via mEvin
resp. #iterEvin()
evin
- public EvinoutType_FBcl event()
iterEvin(FBlock_FBcl)
to get all events.public void setDoutPin(DoutType_FBcl doutType)
doutPin
- public final void addDepPrev(EccAction_FBcl operPrev)
operPrev
- private static int nrof1Bits(long mask)
public final java.lang.Iterable<EccAction_FBcl> iterDepPrev()
public final java.lang.Iterable<EccAction_FBcl> iterDepNext()
public final long XXXmEvoutBits()
public final java.lang.Iterable<Evout_FBcl> iterEvout(FBlock_FBcl fb)
FBlock_FBcl.evout
of the given fb with this associated operation of the Type.public final long mEvoutBitsVirt()
public final java.lang.Iterable<Evout_FBcl> iterEvoutVirt(FBlock_FBcl fb)
FBlock_FBcl.evout
of the given fb with this associated operation of the Type.public final int nrofEvout()
public final boolean isNecessaryEventOper()
mNecessaryEventOper
is set in mEvout
, see setNecessaryEventOper()
.public final void setNecessaryEventOper()
public final java.lang.Iterable<Evin_FBcl> iterEvin(FBlock_FBcl fb)
Dout_FBcl#operCombin
to check whether the associated evin bits
are member of the same or another Evchain_FBcl
.fb
- The fb instance (the operation is related to the FBtype_FBcl
)public final long mDout()
isNecessaryEventOper()
public final int nrDout()
public final long mDoutSet()
public final java.lang.Iterable<Dout_FBcl> iterDout(FBlock_FBcl fb)
BuildEvchainOperation_FBcl#checkDinDout(Pin_FBcl, Evchain_FBcl, EccAction_FBcl, org.vishia.fbcl.fblockwr.Write_Module_FBwr)
to detect whether this Operation is necessary. If the outputs are not wired ...fb
- public final long mDoutVirt()
public final java.lang.Iterable<Dout_FBcl> iterDoutVirt(FBlock_FBcl fb)
public final java.lang.Iterable<Din_FBcl> iterDin(FBlock_FBcl fb)
public final java.lang.Iterable<DinType_FBcl> iterDinIfc(FBtype_FBcl fbIfc)
public final long mCorrespondEvinForUpdate()
public final java.lang.Iterable<Evin_FBcl> iterEvinUpdate(FBlock_FBcl fb)
public long mDin()
mUsesThis
.public long mDinPins()
mUsesThis
.public long mDinVirt()
public void setUsesThis()
public boolean usesThis()
public final void setDinBits(long mBit)
mBit
- possible use of mUsesThis
public final void clearDinBits(long mBits)
public final void setDoutBits(long mBit)
public final void setDinBitsVirt(long mBit)
Evchain_FBcl
only, package private.
This operation is registered with Pin_Type_FBcl#addOperation(Operation_FBcl
to the din already.mBit
- public final void setDinBitsVirtFrom(EccAction_FBcl operSrc)
public final void setDoutVirt(long mBit)
public final void assignDin(DinType_FBcl din)
#mUsedDinAll
.
It is for simple FBlocks.din
- public final void assignDout(DoutType_FBcl dout, boolean setVariable)
mDoutVirt
for all previous depending operation too
because the previous operation is necessary if this pin is used.dout
- The pin.setVariable
- true then mDoutSet
is set, it means the operation forces a variable on this output
of an usage FBlock. This variable can be either the state variable itself (for unit delay) or an output variable
for a predefined function in the target language.
The predefined function uses an output pointer for this variable,
for example it is a TYPE* in C/++ or an VAR_INOUT for STpublic final void assignDin(Pin_FBcl pin)
private final void setDoutVirtPrev(long mBit, int recursion)
private final void setDinBitNext(long mBit, int recursion)
public final void setEvinBits(long mBit)
public long mEvinVirt()
public final void setEvinVirtFrom(EccAction_FBcl operSrc)
operSrc
- The operation of the evout before, the event-fork pointpublic boolean isDrivenFromSameEvchain(EccAction_FBcl operSrc)
operSrc
- An operation on a src din pin of the current operation.public final void assignEvout(EvinoutType_FBcl evout)
mEvoutVirt
for all previous depending operation too
because the previous operation is necessary if this pin is used.ixBit
- 0... the Bit number.public final void setEvoutBits(long mBit)
private final void setEvoutBitVirtPrev(long mBit, int recursion)
public boolean hasStatementsAlsoInNextDeps()
public void setGenCodeStmnt(org.vishia.util.OutTextPreparer genCodeStatement)
public void setGenCodeStmnt(java.lang.String sOperation, java.lang.String... argNames)
public void setHasStatements()
public org.vishia.util.OutTextPreparer genCodeStmnt()
public boolean hasStatements()
public boolean hasStatementsGen()
public void addFromOperation(EccAction_FBcl src, boolean bWithDeps)
public void addEvbitFromOperation(EccAction_FBcl src)
Dout_FBcl#operCombin
derived from src Evchain_FBcl.operation
src
- Evchain_FBcl.operation
public void setEvin(EvinoutType_FBcl evin)
public java.lang.String toStringDependingNext(int indent)
private java.lang.String toStringDependingNext(int indent, java.lang.StringBuilder sb)
public java.lang.String toStringDependingPrev(int indent)
private java.lang.String toStringDependingPrev(int indent, java.lang.StringBuilder sb)
public java.lang.StringBuilder toString(java.lang.StringBuilder w, java.lang.String... cond)
mNecessaryEventOper
mHasStatements
mUsesThis
toString
in interface org.vishia.util.ToStringBuilder
public java.lang.String toString()
toString
in class java.lang.Object