public class DinExpr_FBcl extends Din_FBcl
FBexpr_FBcl.
Dinout_FBcl.dType(). The expression pin has a forward propagated DType
stored in dTypeIxPart.
This can be deviant to the inner DType of the FBexpr_FBcl.dTypeAllDin.
Also a cast on input is possible.
| Modifier and Type | Class and Description |
|---|---|
static class |
DinExpr_FBcl.DTypeDesignation |
Pin_FBcl.XXXXXEKind| Modifier and Type | Field and Description |
|---|---|
protected boolean |
bCastToDTypePart
Only if this flag is set, the type is given as text,
and should be used to cast the part after modification of the input with K pin.
|
protected DType_FBcl.DtIxmdl |
dTypeIxPart
A possible specific data type for the part of the expression after the modification operation
used for casting after modification if also
bCastToDTypePart is set
and used for the output data type propagation. |
private DinExprK_FBcl |
pinK
The associated K pin for a second input of a constant to operate.
|
protected java.lang.String |
sElemDst
This is either used for setElement expression
(to set an array element or a struct element in the correspond variable after expression)
or also to store a given component name for sliced accesses.
|
protected java.lang.String |
sElemSrc
If not null or "", then it describes the access to an element in the connected doutSrc struct
as textual information written in an din.
|
java.lang.String |
sOperator
The operator for the pin, consisting of till three parts.
|
static java.lang.String |
sVersion
Version, history and license.
|
bBreakChain, bNonFBarray, dTypeCastInp, ixArrayAccess, mEvCluster, nullArraysteptime, zVectorDimconnectDst, connectSrc, fb, name, version, xy| Constructor and Description |
|---|
DinExpr_FBcl(DinType_FBcl pint,
java.lang.String name,
FBexpr_FBcl fb,
Module_FBcl.CreateMdl mdlcr)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
char |
cUnaryOperator() |
DinExpr_FBcl.DTypeDesignation |
dTypeDsgn(java.lang.String sSAT,
DinExpr_FBcl x1)
Builds a String usable for code generation with the DType designation
to call a proper operation.
|
DType_FBcl.DtIxmdl |
dTypeIxPart()
Returns the casting DType for the expression part or also the DType for forward propagation to the exprOut.
|
DType_FBcl |
dTypePart() |
DType_FBcl |
dTypePropgFwd() |
(package private) DType_FBcl.DtIxmdl |
getDTypeIxMdl()
Returns the non solved DType for non dedicated types.
|
java.lang.String |
getElemDst()
See
sElemDst |
java.lang.String |
getElemSrc()
See
sElemSrc |
(package private) DinExpr_FBcl.DTypeDesignation |
getInfoAdaptPartforAddToDTypeAll(java.lang.String sSat) |
DinExprK_FBcl |
pinK() |
java.lang.String |
setDType(DType_FBcl.DtIxmdl dtixSrcArg,
LogMessage log)
Overridden form for
Dinout_FBcl#setDType(DType_FBcl, DType_FBcl, org.vishia.msgDispatch.LogMessage):
It saves the src in dTypePart() for proper propagation to output if all DinExpr are propagated. |
boolean |
setDTypeExprPart(DType_FBcl.DtIxmdl dtix,
boolean castTo)
Sets initial the
dTypePart() and also the bCastToDTypePart. |
void |
setElementDst(java.lang.String val)
See
getElemDst() |
void |
setElemSrc(java.lang.String val)
See
getElemDst() |
void |
setPinK(DinExprK_FBcl pinK) |
boolean |
shouldCastPart()
Cast part does not mean, cast to the
FBexpr_FBcl.dTypeAllDin. |
java.lang.String |
sOperator() |
bCastDType, breakEventChain, dTypeCastInp, dTypeConst, dTypeDecl, dTypePropg, getConnSrc, getConstant, getConstant, getDintype, getOnlyoneAssocEvin, iterConnSrcConditional, iterEvin, nonFBarray, operationsType, replaceAliasConst, setBreakEventChain, setConstant, setConstantDirect, setDTypeCastInp, setDTypeConst, setDTypePropg, setNonFBarray, toString, XXXconnectSrcdtArrayCpp, 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 final java.lang.String sVersion
Dinout_FBcl.dType() for expression instances
org.vishia.mainCmd.MainCmd.
public java.lang.String sOperator
FBexpr_FBcl#setOperatorToPins(org.vishia.fbcl.readSource.Prj_FBCLrd)
and FBexpr_FBcl.setExprPinFromPinsExprFn().protected java.lang.String sElemSrc
protected java.lang.String sElemDst
protected DType_FBcl.DtIxmdl dTypeIxPart
bCastToDTypePart is set
and used for the output data type propagation.
The data type valid for the exprOut is stored in FBlock_FBcl.dTypes
adequate to the index given in DinoutType_FBcl#ixDtype.
But the output DType can be different to the FBexpr_FBcl.dTypeAllDin and hence also to this element.
org.vishia.fbcl.fblockwr.DTypePropgPrc_FBcl#propgExprForward(org.vishia.fbcl.fblockwr.Write_FBlock_FBwr, boolean, boolean)
If this is not set then Din_FBcl.dTypeCastInp() is used.
FBlock_FBcl.sizeArray() for backward propagation.protected boolean bCastToDTypePart
private DinExprK_FBcl pinK
public DinExpr_FBcl(DinType_FBcl pint, java.lang.String name, FBexpr_FBcl fb, Module_FBcl.CreateMdl mdlcr)
pint - name - fb - The associated expression where the pin is member ofmdlcr - It needs knowledge of the superior module because of #setDType(DType_FBcl, DType_FBcl, LogMessage)
may regard a conversion to a struct DType.public DinExprK_FBcl pinK()
public void setPinK(DinExprK_FBcl pinK)
public void setElemSrc(java.lang.String val)
getElemDst()public java.lang.String getElemSrc()
sElemSrcpublic void setElementDst(java.lang.String val)
getElemDst()public java.lang.String getElemDst()
sElemDstDType_FBcl.DtIxmdl getDTypeIxMdl()
Module_FBcl.dTypeMdl(org.vishia.fbcl.fblock.DType_FBcl.DtIxmdl)
with the result.getDTypeIxMdl in class Din_FBclpublic DType_FBcl dTypePropgFwd()
public DType_FBcl.DtIxmdl dTypeIxPart()
public DType_FBcl dTypePart()
public final boolean shouldCastPart()
FBexpr_FBcl.dTypeAllDin.
Cast to part is only set in OdgModule.createDinExpr(String, int[], EvinType_FBcl, String, org.vishia.fbcl.readOdg.OdgGBlock, org.vishia.fbcl.readOdg.OdgGPin)
because of a textual given DType in the graphic on the expression input pin.public final java.lang.String sOperator()
public final char cUnaryOperator()
public DinExpr_FBcl.DTypeDesignation dTypeDsgn(java.lang.String sSAT, DinExpr_FBcl x1)
DinExpr_FBcl.DTypeDesignation getInfoAdaptPartforAddToDTypeAll(java.lang.String sSat)
public java.lang.String setDType(DType_FBcl.DtIxmdl dtixSrcArg, LogMessage log)
Dinout_FBcl#setDType(DType_FBcl, DType_FBcl, org.vishia.msgDispatch.LogMessage):
It saves the src in dTypePart() for proper propagation to output if all DinExpr are propagated.
bCastToDTypePart is set, the dTypeIxPart is determined by graphic, hence not changed here.
dTypeIxPart.
sElemDst, hence it is a set of a structure member (such as '.im' for complex Dtypes),
then the structure DType is stored in dTypeIxPart
Din_FBcl.dTypeCastInp is set, this is determining. It means the given src is ignored.
Din_FBcl.dTypeCastInp is set by graphic text, as value casting, in responsible to the user.
bCastToDTypePart is set, the type is not changed by this forward propagation.
It is tested whether the propagated src dtype is compatible, then return null.
This is proper for a numeric downcast by given cast from a higher numeric format.setDType in class Din_FBcldtixSrcArg - any given Data Type.Pin_FBcl.nameFBpin().public boolean setDTypeExprPart(DType_FBcl.DtIxmdl dtix, boolean castTo)
dTypePart() and also the bCastToDTypePart.
It it is set already, it is not changed.
This is usual used for value casting of the expression input in generated code.dt - DType maybe registered in the module.castTo - true then this DType is given manually or should immediately force cast.
It is false if it is set in DTypePropgPrc_FBcl.propgDTypeForward(boolean)
to save a detected Din_FBcl.dTypeCastInp-DType especially as structure DType here.
Then the cast is faulty, instead the element set should be used.
Note: The dTypeIxPart is also interesting for report and overview. It documents the relations.