public class Operation_FBcl
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
DoutType_FBcl |
doutCombin
The associated dout if it is a operation for combinatoric, else null
|
EvinType_FBcl |
event
The event which drives the operation originally and immediately.
|
(package private) FBlock_Type_FBcl |
fbt |
private 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 EvinType_FBcl.operations . |
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. |
private 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<Operation_FBcl> |
nextDepending |
(package private) static java.util.List<Operation_FBcl> |
nullist
Empty List as Iterator without content.
|
private java.util.List<Operation_FBcl> |
prevDepending |
private static java.lang.String |
sIndent |
Constructor and Description |
---|
Operation_FBcl(java.lang.String name,
EvinType_FBcl evinType,
int ixOperInMdl) |
Operation_FBcl(java.lang.String name,
FBlock_Type_FBcl fbt,
DoutType_FBcl doutCombin,
int ixOperInMdl) |
Operation_FBcl(java.lang.String name,
int ixEvchainInMdl,
EvinType_FBcl evinType,
int ixOperInMdl) |
Modifier and Type | Method and Description |
---|---|
void |
addDepPrev(Operation_FBcl operPrev)
Adds an operation as previous depending, set all virtual Pins
|
void |
addEvbitFromOperation(Operation_FBcl src)
It is for
Dout_FBcl#operCombin derived from src Evchain_FBcl.operation |
void |
addFromOperation(Operation_FBcl src,
boolean bWithDeps) |
void |
assignDin(DinType_FBcl din)
Registeres this operation in din and store the bit in
#mUsedDinAll . |
void |
assignDin(PinBase_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(EvoutType_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.
|
OutTextPreparer |
genCodeStmnt() |
void |
genCodeStmnt(OutTextPreparer genCodeStatement) |
boolean |
hasStatements()
True then this operation should produce statements.
|
boolean |
hasStatementsAlsoInNextDeps() |
boolean |
hasStatementsGen() |
boolean |
isDrivenFromSameEvchain(Operation_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<Operation_FBcl> |
iterDepNext() |
java.lang.Iterable<Operation_FBcl> |
iterDepPrev() |
java.lang.Iterable<Din_FBcl> |
iterDin(FBlock_FBcl fb) |
java.lang.Iterable<DinType_FBcl> |
iterDinIfc(FBlock_Type_FBcl fbIfc) |
java.lang.Iterable<Dout_FBcl> |
iterDout(FBlock_FBcl fb)
Used especially in
BuildEvchainOperation_FBcl#checkDinDout(Pin_FBcl, Evchain_FBcl, Operation_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(Operation_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 |
setEvinBits(long mBit) |
void |
setEvinVirtFrom(Operation_FBcl operSrc)
Mark one evChain-chain of depending chains.
|
void |
setEvoutBits(long mBit) |
private void |
setEvoutBitVirtPrev(long mBit,
int recursion) |
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()
String representation of an operations:
Output nuances: 1/1 two digits: immediately and virtual (over depending operations) 0/1/1 thre 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<Operation_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 FBlock_Type_FBcl fbt
public final EvinType_FBcl event
public final int ixOperInEvent
event
EvinType_FBcl.operations
.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.private 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<Operation_FBcl> prevDepending
private java.util.List<Operation_FBcl> nextDepending
private 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 Operation_FBcl(java.lang.String name, int ixEvchainInMdl, EvinType_FBcl evinType, int ixOperInMdl)
public Operation_FBcl(java.lang.String name, EvinType_FBcl evinType, int ixOperInMdl)
public Operation_FBcl(java.lang.String name, FBlock_Type_FBcl fbt, DoutType_FBcl doutCombin, int ixOperInMdl)
public final java.lang.String name()
public void setDoutPin(DoutType_FBcl doutType)
doutPin
- public final void addDepPrev(Operation_FBcl operPrev)
operPrev
- private static int nrof1Bits(long mask)
public final java.lang.Iterable<Operation_FBcl> iterDepPrev()
public final java.lang.Iterable<Operation_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 FBlock_Type_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, Operation_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(FBlock_Type_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(Operation_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(PinBase_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(Operation_FBcl operSrc)
operSrc
- The operation of the evout before, the event-fork pointpublic boolean isDrivenFromSameEvchain(Operation_FBcl operSrc)
operSrc
- An operation on a src din pin of the current operation.public final void assignEvout(EvoutType_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 genCodeStmnt(OutTextPreparer genCodeStatement)
public void setHasStatements()
public OutTextPreparer genCodeStmnt()
public boolean hasStatements()
public boolean hasStatementsGen()
public void addFromOperation(Operation_FBcl src, boolean bWithDeps)
public void addEvbitFromOperation(Operation_FBcl src)
Dout_FBcl#operCombin
derived from src Evchain_FBcl.operation
src
- Evchain_FBcl.operation
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.String toString()
mNecessaryEventOper
mHasStatements
mUsesThis
toString
in class java.lang.Object