public class Din_FBcl extends Dinout_FBcl
Pin_FBcl.XXXXXEKind| Modifier and Type | Field and Description |
|---|---|
protected boolean |
bBreakChain
An input which breaks the chain of events because of an special internal wiring
condition from the source of the graphical module,
OdgConnection.ECkind.dataGet
it is set if the connection comes from a VarZ_OFB or from a connection style ofcDataGet. |
private boolean |
bCastDType
True then {@link #setDTypeCastInp(DType_FBcl.DtIxmdl) was called
or the propagated DType is not the same as the own.
|
protected boolean |
bNonFBarray
If true, then this pin is connected for all FBlock array elements with the same signal.
|
protected DType_FBcl.DtIxmdl |
dTypeCastInp
A possible specific data type for the pin as cast from the input.
|
private DType_FBcl |
dTypeConst
Detected Data Type of a
sConstant used for adaption of the given constant value. |
private DType_FBcl.DtIxmdl |
dTypePropg
The data type which comes from the input wiring, set in
DTypePropgPrc_FBcl
via #setDTypePropg(DType_FBcl.DtIxmdl). |
protected int[] |
ixArrayAccess
If not "", then it describes the access to an element in the connected doutSrc array
as textual information written in an din.
|
long |
mEvCluster
Association of the din on a FBlock instance or the module's dout to one or more evCluster
|
static Din_FBcl[] |
nullArray |
private java.lang.String |
sConstant
If not null then it is a constant given as String on this input.
|
steptime, zVectorDimconnectDst, connectSrc, fb, name, version, xy| Constructor and Description |
|---|
Din_FBcl(DinType_FBcl pint,
FBlock_FBcl fb,
XY_FBcl xy) |
Din_FBcl(DinType_FBcl pint,
java.lang.String name,
FBlock_FBcl fb,
XY_FBcl xy) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bCastDType()
Returns true if a numeric cast (also maybe with bit shift) in target code generation should be done.
|
boolean |
breakEventChain() |
DType_FBcl.DtIxmdl |
dTypeCastInp()
Returns null or the DType set with
setDTypeCastInp(org.vishia.fbcl.fblock.DType_FBcl.DtIxmdl). |
DType_FBcl |
dTypeConst() |
DType_FBcl |
dTypeDecl()
Returns the DType for the din pin as declared, not the cast type.
|
DType_FBcl.DtIxmdl |
dTypePropg()
Returns null or the already forward propagated DType set with
setDTypePropg(org.vishia.fbcl.fblock.DType_FBcl.DtIxmdl, boolean). |
Dout_FBcl |
getConnSrc()
Gets the source of this pin.
|
java.lang.String |
getConstant() |
java.lang.String |
getConstant(int ix)
Gets a part from the
sConstant which should contain more as one parts separated with comma. |
DinType_FBcl |
getDintype() |
(package private) DType_FBcl.DtIxmdl |
getDTypeIxMdl()
Gets a possible DType with ixMdl as stored in specific pins.
|
Evin_FBcl |
getOnlyoneAssocEvin() |
java.lang.Iterable<PinConnect_FBcl> |
iterConnSrcConditional(long[] condBits,
long mEvinMdlMask,
java.lang.String sVariant,
int ixFBlock)
Iterator for all connections to use.
|
java.lang.Iterable<Evin_FBcl> |
iterEvin() |
boolean |
nonFBarray()
If true, then this pin is connected for all FBlock array elements with the same signal.
|
java.lang.Iterable<EccAction_FBcl> |
operationsType()
Returns the appropriate Operation-List of the type to this pin.
|
static java.lang.String |
replaceAliasConst(java.lang.String src,
java.util.Map<java.lang.String,java.lang.String> idxAlias) |
void |
setBreakEventChain() |
void |
setConstant(java.lang.String val,
java.util.Map<java.lang.String,java.lang.String> idxAlias)
Sets the
sConstant and sets also a detected type of the const
to dTypeConst(). |
void |
setConstantDirect(java.lang.String val)
Called only for String constants, especially for expr term.
|
java.lang.String |
setDType(DType_FBcl.DtIxmdl dtixSrc,
LogMessage log)
Overridden form for
Dinout_FBcl#setDType(DType_FBcl):
If dTypeCastInp is set, this is determining. |
boolean |
setDTypeCastInp(DType_FBcl.DtIxmdl dtix)
Sets initial the
dTypeCastInp. |
boolean |
setDTypeConst(DType_FBcl dt)
Sets initial the
dTypeConst. |
boolean |
setDTypePropg(DType_FBcl.DtIxmdl dtix,
boolean bCast)
Sets initial the
dTypePropg. |
void |
setNonFBarray(boolean set)
If true, then this pin is connected for all FBlock array elements with the same signal.
|
java.lang.StringBuilder |
toString(java.lang.StringBuilder app,
java.lang.String... cond) |
java.lang.Iterable<Dout_FBcl> |
XXXconnectSrc() |
dtArrayCpp, dType, dType, dTypeChar, dTypeCix, dtypeCpp, dTypeFBpinNonArray, dTypeIxMdl, explainDTypeIx, getSteptime, getSteptimeStr, isComplexDType, namePin, propagateSteptime, sDTypeIx, sDTypeIx, sDTypeIxId, XXXdTypeIxMdladdEvchain, addEvchainDepending, changePinType, connDst, connectFrom, connectFrom, connectFrom, connSrc, containsEvchain, containsOtherEvchain, dinType, doutType, evChainHex, evinType, evoutType, getFirstConnDst, getFirstConnSrc, getMaskEvinMdlChainDriven, getMaskEvoutMdlBackChainDriven, getOneConnSrc, getOneConnSrc, graphicPos, isEventBackChainDriven, isEventBackChainDriven, isEventChainDriven, isEventChainDriven, isEventChainDriven, isEventChainDriven, isKind, isNotKind, isUpdatePin, iterConnDst, iterConnSrc, iterEvchainDep, iterEvchainShow, nameFBpin, nameFBpin, nameIdentifier, nrofConnDst, nrofConnSrc, pinNameFB, pint, pinType, removeConnectDst, removeConnectSrc, removeConnSrcAll, removePinSimpleInConnDst, setEventBackChainDriven, setEventChainDriven, sMaskHexEvinMdlChainDriven, spec, spec, throwError, toString, XXXremoveConnectSrc, XXXremoveConnSrc, XXXsetEventBackChainDrivenpublic static Din_FBcl[] nullArray
private java.lang.String sConstant
private DType_FBcl.DtIxmdl dTypePropg
DTypePropgPrc_FBcl
via #setDTypePropg(DType_FBcl.DtIxmdl).
It is usable for cast to dTypeCastInp(), if the source type should be known.
It is also interesting for report, see Reporter_FBcl.
see #setDTypePropg(org.vishia.fbcl.fblock.DType_FBcl.DtIxmdl).
see dTypePropg().private boolean bCastDType
protected DType_FBcl.DtIxmdl dTypeCastInp
DinoutType_FBcl.dType as fix dtype in the pin type
or in FBlock_FBcl.dTypes as type of maybe some more pins of this Pin_FBcl.fb
adequate to the index given in DinoutType_FBcl#ixDtype.
But for expressions it is possible that each input has a specific forward propagated data type
which may be used for type casting in the generated code etc.private DType_FBcl dTypeConst
sConstant used for adaption of the given constant value.
For example 1.01 is detected as double.
For C-Code generation cast to float creates "1.01f".
Cast to a integer with fractional bits generates for example "(int16)((1L<protected boolean bNonFBarray
protected int[] ixArrayAccess
protected boolean bBreakChain
OdgConnection.ECkind.dataGet
it is set if the connection comes from a VarZ_OFB or from a connection style ofcDataGet.
It is evaluated in DFlow2EvChain.public long mEvCluster
public Din_FBcl(DinType_FBcl pint, java.lang.String name, FBlock_FBcl fb, XY_FBcl xy)
public Din_FBcl(DinType_FBcl pint, FBlock_FBcl fb, XY_FBcl xy)
public void setConstant(java.lang.String val,
java.util.Map<java.lang.String,java.lang.String> idxAlias)
sConstant and sets also a detected type of the const
to dTypeConst().
First the given 'val' is translated with 'idxAlias' if it is an alias.
Then:
dTypeCastInp is set to null.
val - given String in the graphic.idxAlias - possible aliaspublic void setConstantDirect(java.lang.String val)
val - public static final java.lang.String replaceAliasConst(java.lang.String src,
java.util.Map<java.lang.String,java.lang.String> idxAlias)
public java.lang.String getConstant()
public java.lang.String getConstant(int ix)
sConstant which should contain more as one parts separated with comma.
For example "1, 2, 4, 8, 32" or "1.0, 3.16, 10.0"ix - from 0.., number of the partpublic java.lang.Iterable<PinConnect_FBcl> iterConnSrcConditional(long[] condBits, long mEvinMdlMask, java.lang.String sVariant, int ixFBlock)
sConstant, then one emtpy connection is delivered.
That is only used to enter in the evaluation of this pin (evaluates for connections).
Because of PinConnect_FBcl.pinSrc is null, it is not used, instead then the sConstant is tested.
The operation is used in otx scripts to evaluate expression inputs.condBits - if given, then only connections for this conditions are delivered.
This is checked with the event Evinout_FBcl.getConditionBits() for conditional event driven outputs
which are connected to the same destination.List as Iterable with the connections or with one empty connection if the pin has sConstant.public void setBreakEventChain()
public boolean breakEventChain()
public boolean setDTypeCastInp(DType_FBcl.DtIxmdl dtix)
dTypeCastInp. It it is set already, it is not changed.
It means the first set DType wins. This is used for value casting of the input in generated code.dt - public DType_FBcl.DtIxmdl dTypeCastInp()
setDTypeCastInp(org.vishia.fbcl.fblock.DType_FBcl.DtIxmdl).public boolean setDTypePropg(DType_FBcl.DtIxmdl dtix, boolean bCast)
dTypePropg. It it is set already, it is not changed.
It means the first set DType wins. This is used for value casting of the input in generated code.dtix - DType to set in propagationbCast - true then cast should be done in target code generation, because the dtix is another than the given DType of the pin.
It is false on application to DinExpr_FBcl, because the expression should work with the forward given DTypes with the expression.
But it is set on Din on FBlocks with given DTypes.public DType_FBcl.DtIxmdl dTypePropg()
setDTypePropg(org.vishia.fbcl.fblock.DType_FBcl.DtIxmdl, boolean).public boolean bCastDType()
bCastDType. It is set on {@link #setDTypeCastInp(DType_FBcl.DtIxmdl)
or on #setDTypePropg(DType_FBcl.DtIxmdl, boolean) but only with argument 'bCast',
which is set if the propagation has a different DType in the source of this din.public boolean setDTypeConst(DType_FBcl dt)
dTypeConst. It it is set already, it is not changed.
It means the first set DType wins. This is used for value casting of the input in generated code.dt - public DType_FBcl dTypeConst()
public DType_FBcl dTypeDecl()
dTypeDecl in class Dinout_FBclDinout_FBcl.dType()DType_FBcl.DtIxmdl getDTypeIxMdl()
Dinout_FBclFBlock_FBcl.dTypes.
see Din_FBclgetDTypeIxMdl in class Dinout_FBclpublic void setNonFBarray(boolean set)
FBlock_FBcl.sizeArrayFBpublic boolean nonFBarray()
FBlock_FBcl.sizeArrayFBpublic java.lang.String setDType(DType_FBcl.DtIxmdl dtixSrc, LogMessage log)
Dinout_FBcl#setDType(DType_FBcl):
If dTypeCastInp is set, this is determining. It means the given src is ignored.
dTypeCastInp is set by graphic text, as value casting, in responsible to the user.
Dinout_FBcl#setDType(DType_FBcl, DType_FBcl, org.vishia.msgDispatch.LogMessage).setDType in class Dinout_FBcldtixSrc - any given Data Type.Pin_FBcl.nameFBpin().public Dout_FBcl getConnSrc()
Pin_FBcl#getOneConnection()
because there is either null or only one Connection from the dout.getConstant(), elsewhere the source for the pinpublic java.lang.Iterable<Dout_FBcl> XXXconnectSrc()
public DinType_FBcl getDintype()
public java.lang.Iterable<EccAction_FBcl> operationsType()
public Evin_FBcl getOnlyoneAssocEvin()
public java.lang.StringBuilder toString(java.lang.StringBuilder app,
java.lang.String... cond)
public java.lang.Iterable<Evin_FBcl> iterEvin()