public class OdgModule
extends java.lang.Object
mdlw to the creation class of the FBcl module: Module_FBcl.
processGBlockToPin_FBclConnections(OdgGBlock) #Impl-ReadOdg-ConnFBcl
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
dbgFbNamePin_prcConnection
Set it for debugging to force a
Debugutil#stop() |
java.util.Map<java.lang.String,java.lang.String> |
idxAlias
Module local substitute between name in graphic and name used for FBcl
or also the name regarding non determined numeric DTypes.
|
java.util.Map<java.lang.Integer,OdgGBlock> |
idxAllGBlockByGpos
Index of all graphic FBlocks sorted by graphic position or posNr do get reproducible output.
|
java.util.Map<java.lang.Integer,OdgGBlock> |
idxDemux
List of all connection GBlocks, it is ofbDemux, ofbConnPoint but not Xref.
|
java.util.Map<java.lang.String,java.util.List<Write_FBlock_FBwr>> |
idxFBlockArray
Index of all graphic FBlocks which are defined as array.
|
java.util.Map<java.lang.Integer,OdgGBlock> |
idxGBlock
Index of all graphic FBlocks sorted by graphic position or posNr do get reproducible output
|
java.util.Map<java.lang.String,OdgGBlock> |
idxGBlockById
Instance index sorted by Id to find connections.
|
java.util.TreeMap<java.lang.String,OdgGBlock> |
idxGExprByName
Index of all expression graphic blocks sorted by name + graphic position.
|
java.util.Map<java.lang.Integer,OdgGBlock> |
idxGMdlPins
Index of Graphic FBlocks which are marked with kind "ofbMdlPins" containing the module pins.
|
java.util.Map<java.lang.String,OdgGPin> |
idxGPinById
All pins of this module sorted by the graphic id to find them for connection.
|
(package private) java.util.Map<java.lang.String,java.lang.String> |
idxStyle
Index of the styles in the XML file.
|
java.util.TreeMap<java.lang.String,OdgGPin> |
idxVarGPinByName
Index of all OdgGPin which are used as variable after, sorted by the variable name,
to find the proper OdgGPin if only the variable is shown and accessed in the graphic.
|
java.util.Map<java.lang.String,OdgGPin> |
idxXrefGpin
Index of all Xref referenced
OdgGPin to find it as textual connection. |
java.util.Map<java.lang.String,OdgXrefGraphic> |
idxXrefGraphicByName
Index of all Xref GBlock to create only one OdgXref per name and for post processing.
|
java.util.List<OdgNameTypeArray> |
listFreeVar
Found free expression output variables, later merged with the real used expression variable.
|
(package private) java.util.List<OdgPage> |
listPage
List of all pages, also refers the xml-page info
XmlForOdg.Draw_page
used for more evaluation module wise, especially the connections. |
Write_Module_FBwr |
mdlw
The real module.
|
protected int |
nAutoVariable |
protected int |
nAutoVariableAccess
Counter for the name for FBaccess, start with 1 in this module.
|
(package private) Prj_FBcl |
prj
The project used for the translation session.
|
(package private) java.lang.String |
sNameMdl |
OdgMdlStates |
stm |
(package private) long |
timeCmpFBcl |
(package private) long |
timeCompleteModule |
(package private) long |
timeDataPropg |
(package private) long |
timeEndModule |
(package private) long |
timeEventPropg |
(package private) long |
timePrep |
(package private) long |
timeStartModule |
(package private) long |
timeWrCmpCode |
(package private) long |
timeWrFBcl |
| Constructor and Description |
|---|
OdgModule(java.lang.String mdlName,
Prj_FBcl prj,
java.util.Map<java.lang.String,java.lang.String> idxStyle)
Constructor of the module with the odg data.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addPinConnected(java.util.List<FBlock_FBcl> listFBmdlSrc,
Pin_FBcl pinSrc,
java.lang.String connText,
OdgConnection.ECkind connKind,
Pin_FBcl pinDst,
int ixMux,
java.lang.String sElemSrc,
java.lang.String sElemDstArg)
Qualifies or checks admissibility of the pin with the connection kind
and adds the pin to the correct idx... in the FBlock of the source pin.
|
private void |
buildAssociatedEventDataPins(OdgGBlock fbg,
Write_Module_FBwr mdlwr)
Associates events and data from graphic for one graphic fblock.
|
private void |
buildAssociatedFBtypeEventDataPins(Write_Module_FBwr mdlwr) |
(package private) void |
buildAssociatedMdlEventDataPins(Write_Module_FBwr mdlwr)
Evaluates all graphic blocks of the module interface of kind "ofbMdlInp" and "ofbMdlOut"
given in
OdgReader#idxFBlockGraphicModuleIfc. |
void |
buildFBclData()
This operation sorts the graphic raw data to build a FBcl-kind mapping of data.
|
private OdgConnection.ECkind |
checkConnectionKind(OdgConnection.ECkind cKind,
OdgConnection conn,
boolean bSrc)
Check and set a new Connection kind if given is null or default.
|
private java.lang.String[] |
checkPrepareExprOperator(java.lang.String sDescr,
boolean bCast,
FBexpr_FBcl fbx)
Checks the input text of the expression input pin due to:
first ".[" is searched, 'posAccDst' set internally.
|
private void |
completeMissingFBtypeInGBlocks()
|
private boolean |
connect_pinCXref(java.lang.String nameXref,
java.util.List<Pin_FBcl> listDinDst) |
private void |
connectPinSrcDstObj(OdgGPin gpinStart,
OdgGPin gpinSrc,
java.lang.String deMuxSelSrc,
java.lang.String deMuxSelDst,
int ixPinMux,
OdgConnection conn,
OdgGPin gpinDst)
Connect immediately the gpinStart
OdgGPin.pinObj to the gpinDst OdgGPin.pinObj
with given selection of deMuxSelSrc and deMuxSelDst. |
private void |
connectViaDemux(OdgGPin gpinStart,
OdgGPin gpinSrc,
java.lang.String deMuxSelSrc,
java.lang.String deMuxSelDst,
OdgConnection.ECkind cKindArg,
int ixPinMux,
int recursion)
This is the commonly used connection function from given graphic connections to the FBcl connections
regarding Demux FBlocks and slicing.
|
private void |
connectViaDemux(OdgGPin gpinStart,
OdgGPin gpinSrc,
java.lang.String deMuxSelSrc,
java.lang.String deMuxSelDst,
OdgConnection.ECkind cKind,
OdgGPin gpinDst,
OdgGBlock gfbDst,
int ixPinMux,
int recursion) |
private DinExpr_FBcl |
createDinExpr(java.lang.String nameSpec,
int[] nrDinout,
EvinType_FBcl evint,
java.lang.String sOper,
OdgGBlock fbg,
OdgGPin gpin)
Creates a
DinExpr_FBcl with the given infos. |
private Dout_FBcl |
createDoutExpr(OdgGPin gpin,
java.lang.String sAccess,
int[] ixArray,
OdgGBlock fbg,
FBexpr_FBcl fbx,
EvoutType_FBcl evoutt,
java.lang.String sOper,
DType_FBcl.DtIxmdl dType,
OdgGPin gExprOut,
int[] nrDinout)
Creates the pin as exprOut.
|
(package private) void |
createFBclConnectionsFromGraphic()
Gets the connections from the graphic and stores it to the real used pins.
|
private void |
createFBexpr(OdgGBlock fbg,
FBtype_FBcl fbtx,
java.util.List<Write_FBlock_FBwr> fbwRef)
Creates an
FBexpr_FBcl as expression inside the OdgGBlock. |
private Pin_FBcl |
createFBexprPinAndKpin(OdgGPin gpin,
OdgGBlock fbg,
FBexpr_FBcl fbx,
EvinType_FBcl evint,
EvoutType_FBcl evoutt,
java.lang.String sOper,
OdgGPin gExprOut,
int[] nrDinout,
java.lang.String[] sExpr)
Creates the expression pin(s) from the given graphic pin gpin.
|
(package private) void |
createFBexprPins_duetoGBlockPins(OdgGBlock fbg)
|
private PinType_FBcl |
createFBlockPin(OdgGPin gpin,
OdgGBlock fbg,
EvinType_FBcl evint,
int ctEvinType)
Creates or gets the pin(s) in the non graphic instance from given Graphic pin gpin:
OdgGBlock.fbw, maybe more as one, OdgGBlock.fbtw
and sets the pin reference in gpin: OdgGPin.pinType, OdgGPin.pinObj. |
(package private) void |
createFBlockPins(OdgGBlock fbg)
|
(package private) void |
createFBPins_duetoGBlockPins()
completes the graphic Pins() with the FBlock_FBcl pins,
create or search the adequate pins in
FBlock_FBcl and FBtype_FBcl |
private void |
createInheritanceFBclConnectionsFromGraphic(Write_Module_FBwr mdlwr)
Gets the connections from the graphic for inheritance and stores it to the real used pins.
|
private DinExprK_FBcl |
createKinExpr(DinExpr_FBcl exprInp,
java.lang.String sOpK,
OdgGBlock fbg) |
private void |
createPinObjWithGivenPinType(OdgGPin gpin,
OdgGBlock fbg) |
private PinRef_FBcl |
createThizRefForFBoper(OdgGPin gpin,
OdgGBlock fbg,
FBexpr_FBcl fbx) |
private Dout_FBcl |
createVarRefRetInMdl(Dout_FBcl pinSrc,
PinKind_FBcl pinKind,
java.lang.String sNameFBy,
DType_FBcl.DtIxmdl dtype)
Creates a variable in the module which is used either as variable after an expression
or also as call by reference variable for an FBoper or any FBlock or also as return variable for a FBlock operation.
|
private void |
evalPinForAssociatedEvDataPins(OdgGPin pi,
Write_FBtype_FBwr fbtw,
java.util.List<EvinoutType_FBcl> listEvin,
java.util.List<EvinoutType_FBcl> listEvout,
EvinoutType_FBcl evUpdin,
EvinoutType_FBcl evUpdout,
Write_Module_FBwr mdlwr,
boolean bFirstCall,
XY_FBcl xy)
Associate any pin to evin, evout, evUpdin evUpdout, due to its functionality.
|
private void |
fulfillVariablesInExpressionFactors()
This operation fulfills textual connections in expressions for K-pins.
|
private java.lang.String |
getAccess(java.lang.String text,
int zText) |
private void |
getListDstXrefPins(java.util.List<OdgConnection> listAdd,
OdgXref xref,
int recursion) |
private java.lang.String |
getNextNamePin(java.lang.String sNameType,
int[] nrDinout,
int ixDinout)
Builds the name of the next pin for a multiple pin or returns sNameType if it is not a multiple type
|
private PinType_FBcl |
getPinTypeViaDemux(OdgGPin gpin)
Searches and returns the PinType on the opposite end of the deMux
|
java.lang.String |
getStyleFromid(java.lang.String id) |
private void |
processFBlockPinGraphicConnectionTextual(OdgGPin pi)
Processes the textual given connection.
|
(package private) void |
processGBlockToPin_FBclConnections(OdgGBlock fbg)
This routine processes all pins of the given GBlock in
OdgGBlock#idxPinInstance
and then their OdgGPin.connections for the source of the connection. |
private void |
processGPinToPin_FBclConnections(OdgGPin gpin,
OdgGBlock fbg,
OdgConnection.ECkind onlyConnKind)
Process all connections in the graphic from the given graphic pin (excl. inheritance, should be already processed).
|
private void |
processGraphicPinInheritance(OdgGPin pi,
OdgGBlock fbg)
Process all graphic connections which are inheritances.
|
private void |
processMdlout()
Process all mdl Dout in that kind that it is tested whether it is present by a variable in the Module.
|
private boolean |
processTypePinGraphicConnection(OdgGPin gpinSrc,
OdgConnection.ECkind onlyConnKind,
java.util.Iterator<OdgConnection> iterConn,
OdgConnection conn,
boolean bInstanceConn)
Process the graphic connection due to type connection which determines the type of src pin
|
(package private) boolean |
putGBlockByGrapicPos(OdgGBlock gblock)
Write a GBlock to this #idxGBlock with test whether it is twice.
|
private void |
resolveXrefGraphicConnections(OdgXrefGraphic xref)
Resolves the Xref connections to the real connections, now also over pages.
|
(package private) void |
writeFbgData(boolean bFbg,
java.lang.String sExt2,
int ixGraphicOrderStart)
Writes the Odg data to text file.
|
final java.lang.String sNameMdl
public final Write_Module_FBwr mdlw
public final OdgMdlStates stm
final java.util.List<OdgPage> listPage
XmlForOdg.Draw_page
used for more evaluation module wise, especially the connections.final java.util.Map<java.lang.String,java.lang.String> idxStyle
public final java.util.Map<java.lang.String,OdgGBlock> idxGBlockById
public final java.util.List<OdgNameTypeArray> listFreeVar
OdgNameTypeArray.descr contains the name, OdgNameTypeArray.pinC contains the id from xml for connection.public final java.util.Map<java.lang.String,OdgGPin> idxGPinById
public final java.util.Map<java.lang.Integer,OdgGBlock> idxGMdlPins
public final java.util.Map<java.lang.Integer,OdgGBlock> idxGBlock
public final java.util.Map<java.lang.Integer,OdgGBlock> idxAllGBlockByGpos
public final java.util.Map<java.lang.String,java.util.List<Write_FBlock_FBwr>> idxFBlockArray
public java.util.TreeMap<java.lang.String,OdgGBlock> idxGExprByName
OdgNameTypeArray.descr.
Some GBlocks with the same name, and hence the same only one representing FBgl instance can be existing.
They should all contained here, separately. Hence the graphic position is added to the key.
To search one occurrence of the GBlock with only the correct name use TreeMap.ceilingEntry(Object).public java.util.TreeMap<java.lang.String,OdgGPin> idxVarGPinByName
public java.util.Map<java.lang.Integer,OdgGBlock> idxDemux
public final java.util.Map<java.lang.String,OdgXrefGraphic> idxXrefGraphicByName
public final java.util.Map<java.lang.String,OdgGPin> idxXrefGpin
OdgGPin to find it as textual connection.public java.util.Map<java.lang.String,java.lang.String> idxAlias
final Prj_FBcl prj
protected int nAutoVariable
protected int nAutoVariableAccess
long timeStartModule
long timePrep
long timeDataPropg
long timeEventPropg
long timeCompleteModule
long timeWrFBcl
long timeCmpFBcl
long timeWrCmpCode
long timeEndModule
private static java.lang.String dbgFbNamePin_prcConnection
Debugutil#stop()public OdgModule(java.lang.String mdlName,
Prj_FBcl prj,
java.util.Map<java.lang.String,java.lang.String> idxStyle)
Module_FBcl and its writing wrapper Write_Module_FBwr.mdlName - name from the ofbTitle shape.prj - args - public void buildFBclData()
createFBPins_duetoGBlockPins()
#buildAssociatedMdlEventDataPins(OdgReader)
#createFBclConnectionsFromGraphic(OdgReader)
#supplementNotConnectedPins()
DataTracking_FBcL#propagateTypesEvents(Module_FBcl)
DataTracking_FBcL#propagateTypesEvents(Module_FBcl)
#processDflow()odg - void writeFbgData(boolean bFbg,
java.lang.String sExt2,
int ixGraphicOrderStart)
sExt2 - control of output name:
ixGraphicOrderStart - >=0 then touch all new OdgGBlock.ixGraphicOrder with a new value starting with this.private void completeMissingFBtypeInGBlocks()
FBtype_FBcl or also the Write_FBtype_FBwr in all idxGBlock
of this module.
OdgGBlock.fbw set.
Write_FBlock_FBwr knows its Write_FBlock_FBwr.fbtw
or just via its FBlock_FBcl the FBlock_FBcl.fbt after at least one OdgGBlock
is created with the FBtype information.
Write_FBlock_FBwr the FBtype information is taken and stored here in the
OdgGBlock.fbtw respectively OdgGBlock.fbt.
OdgGBlock.fbtw is also necessary to define a GBlock as class (as FBtype_FBcl).
public java.lang.String getStyleFromid(java.lang.String id)
boolean putGBlockByGrapicPos(OdgGBlock gblock)
key - the position as int keygblock - the GBlock.void createFBPins_duetoGBlockPins()
FBlock_FBcl and FBtype_FBclvoid createFBlockPins(OdgGBlock fbg)
Pin_FBcl with the PinType_FBcl for the given OdgGPin in the given OdgGBlock.
OdgGBlock.fbt, OdgGBlock.fbtw and OdgGBlock.fbw are already set.
whereby OdgGBlock.fbw is null if it is a GBlock for only the FBtype_FBcl definition (a class )
and OdgGBlock.fbtw is null but OdgGBlock.fbt is set if the FBtype_FBcl is not defined on demand,
it is existing from a definition module.
Note that the association of the correct FBtype_FBcl or also Write_FBtype_FBwr is done
in
OdgGPin.kind contains the kind of the Pin.
If it is an expression, the expression operand stored in OdgGPin.sText will be transferred to Din_FBcl.sConstant.
OdgGBlock.fbPinSrc and OdgGBlock.fbPinDst are handled later in processGBlockToPin_FBclConnections(OdgGBlock)
because more as one kind of connection may force more as one pins. It depends from the connections.fbg - private PinType_FBcl createFBlockPin(OdgGPin gpin, OdgGBlock fbg, EvinType_FBcl evint, int ctEvinType)
OdgGBlock.fbw, maybe more as one, OdgGBlock.fbtw
and sets the pin reference in gpin: OdgGPin.pinType, OdgGPin.pinObj.
The pins may be already existing in the non graphic instances, also get from OdgGBlock.fbt().
For connection processing the pins can be used referenced in gpin: OdgGPin.pinObj and OdgGPin.pinType.
FBlock_FBcl and FBtype_FBcl instances are accessible via Pin_FBcl.fb and PinType_FBcl.fbt.
The gpin.pinObj is an array of pins, due to the array of FBlock_FBcl in fbg.fbw.
Usual used only one instance, but possible more for Multi-FBlocks.gpin - Given graphic pin with name and maybe type in OdgGPin.nameType
and also Destination where gpin.pinObj and gpin.pinType is set.
OdgGPin.pinObj, OdgGPin.pinTypefbg - Source where and from where the non graphic pins are set and get, using OdgGBlock.fbw and OdgGBlock.fbtwvoid createFBexprPins_duetoGBlockPins(OdgGBlock fbg)
Pin_FBcl with the PinType_FBcl for the given OdgGPin in the given FBlock.
The OdgGPin.kind contains the kind of the Pin.
If it is an expression, the expression operand stored in OdgGPin.sText will be transferred to Din_FBcl.sConstant.fbg - odgr - private void createFBexpr(OdgGBlock fbg, FBtype_FBcl fbtx, java.util.List<Write_FBlock_FBwr> fbwRef)
FBexpr_FBcl as expression inside the OdgGBlock.
It adds the event pins "prep" and "prepO". FBlock_FBcl#_kindFBlock is FBlock_FBcl.Blocktype#expr
FBexpr_FBcl.cOp == '('.
FBexpr_FBcl.cOp == ''
see org.vishia.fbcl.writeFBcl.WriterCodegen#prepareExprTextGiven(Appendable, FBexpr_FBcl, String, String)
fbg - given Graphic blockfbtx - The expression type, maybe StdLibFBlocks_FBcl.fbtExpr_OFB, OFB_ExprEv or OFB_OperodgMdl - The modulefbwRef - If a FBoper_OFB should be created, the associated FBlockprivate Pin_FBcl createFBexprPinAndKpin(OdgGPin gpin, OdgGBlock fbg, FBexpr_FBcl fbx, EvinType_FBcl evint, EvoutType_FBcl evoutt, java.lang.String sOper, OdgGPin gExprOut, int[] nrDinout, java.lang.String[] sExpr)
OdgGPin.kind either a input or output pin is created: PinKind_FBcl.exprInp or PinKind_FBcl.fbdst:
An DinExpr_FBcl is created and stored as input in Write_FBlock_FBwr.idxDin,
with the name X1... and the PinType_FBcl#Din.
PinKind_FBcl.exprOut or PinKind_FBcl.Dout or PinKind_FBcl.vout or PinKind_FBcl.zout:
An Dout_FBcl is created and stored as output in Write_FBlock_FBwr.idxDout
with the name either y, Y, Vm, Q and that given PinKind_FBcl from OdgGPin.kind.
But not that the PinKind comes from the name of the pin y Y V Q and then from the name of the pin in the FBtype_FBcl
representing the expression. But it is asserted it is the same.
DinExpr_FBcl.sOperator determined from the sExpr
gpin - graphic pinfbg - graphic block where the pin is member of. For expression only one fbg exists.
OdgGBlock.fbw is the writer to the FBexpr_FBcl where the pin(s) is/are inserted.sExpr - should be String[2].
Din_FBcl.sConstant for the "expr" pin.
Din_FBcl.sConstant for the "expr" pin.
Din_FBcl.sConstant for the "expr" pin.
return null of a din for K... to add at last.private java.lang.String[] checkPrepareExprOperator(java.lang.String sDescr,
boolean bCast,
FBexpr_FBcl fbx)
FBexpr_FBcl#getOperator is used as operator.
FBexpr_FBcl.setOperatorToPins(Prj_FBcl), in this form taken from the 'sExpr' pin.
This evaluation is not done here. Only the content of 'sExpr' pin is prepared here.
sDescr - Given text from shape ofpExprPartsNameIn - fbx - The expressionDinExpr_FBcl.sOperator
and if an accDst is given, "@[123]" or "@.element" for the access to the variable after expression.
[1] to evaluate for the K-pin. It it is the DinExpr_FBcl#setConstant(String) if the pin has not a connection.
If length==3 then is is the flag for a detected limit operator.
Then this Din with this operator should not use as X1.. pin (ordinary expression input). .private DinExpr_FBcl createDinExpr(java.lang.String nameSpec, int[] nrDinout, EvinType_FBcl evint, java.lang.String sOper, OdgGBlock fbg, OdgGPin gpin)
DinExpr_FBcl with the given infos.
DinExpr_FBcl.sOperator is left empty here.
It is set in FBexpr_FBcl.setOperatorToPins(Prj_FBcl) which is called in Write_Module_FBwr.setExprOperatorToPins()
after reading all content, before further evaluation.
nameSpec - if not null then it is a specific name for a specific version of FBexpr. null if not specific, in the ordinary case.nrDinout - on pos [0] either -1 for a single pin or only one multiple pin or >=0 for the number of the multiple pin.
if nameSpec is a multiple pin or null, then this will be used and increment if >=0fbg - used for access to FBlock, type etc.gpin - The pin from graphic. The OdgGPin.nameType holds all necessary information for the data type and the graphic position.private java.lang.String getNextNamePin(java.lang.String sNameType,
int[] nrDinout,
int ixDinout)
sNameType - If ends with "999" the part without "x999" is used.nrDinout - array with the current index start from 0 or 1 to take this index and increment
or nrDinout[ixDinout] == -1 if only the base name should be used because there is only one pin instead multiple.ixDinout - the position in nrDinout where the index is stored, usual 0 for input, 1 for outputprivate DinExprK_FBcl createKinExpr(DinExpr_FBcl exprInp, java.lang.String sOpK, OdgGBlock fbg)
private Dout_FBcl createDoutExpr(OdgGPin gpin, java.lang.String sAccess, int[] ixArray, OdgGBlock fbg, FBexpr_FBcl fbx, EvoutType_FBcl evoutt, java.lang.String sOper, DType_FBcl.DtIxmdl dType, OdgGPin gExprOut, int[] nrDinout)
gpin - The graphic pinixArray - sAccess - fbg - The frame where the graphic pin is member offbx - it is fbg.fbw, but cast as FBexpr_FBclevoutt - given if bOper = true, as evin to associate with the created dout typebOper - dt - gExprOut - if gpin == gExprOut then creates a exprOut instead Dout, Zout, Vout but creates the following variable.nrDinout - private Dout_FBcl createVarRefRetInMdl(Dout_FBcl pinSrc, PinKind_FBcl pinKind, java.lang.String sNameFBy, DType_FBcl.DtIxmdl dtype)
Dout_FBcl pin which was first created as pin of the FBexpr or pin of FBlock_FBcl
is given here as 'pinSrc'.
Dout_FBcl from the created variable is stored in OdgGPin.pinObj because it is used for connect in the module.
Dout_FBcl is the output of the FBlock_FBcl of type 'VarL_OFB' or 'VarV_OFB' or 'VarZ_OFB'
which is registered in the module.
connectViaDemux(OdgGPin, OdgGPin, String, String, org.vishia.fbcl.readOdg.OdgConnection.ECkind, int, int)
connects the variable, the variable is connected with the 'pinSrc'.
The fbd file (IEC61499) contains the variable extra, and the connection, all proper.
pinSrc - The output which should be connected to the Var..._OFB.X inputpinKind - kind of the variable, PinKind_FBcl.Dout or ~Vout or ~ZoutsNameFBy - Name of the variable resp. the representing Var---OFB FBlockdtype - data type same as the expression or operation outputprivate PinRef_FBcl createThizRefForFBoper(OdgGPin gpin, OdgGBlock fbg, FBexpr_FBcl fbx)
private java.lang.String getAccess(java.lang.String text,
int zText)
void buildAssociatedMdlEventDataPins(Write_Module_FBwr mdlwr)
OdgReader#idxFBlockGraphicModuleIfc.
Any of this block can contain PinBase_FBcl#addAssociatedEvData(PinBase_FBcl).
EvinType_FBcl#setPrepUpdEvent(EvinoutType_FBcl)

odg - The gathered graphic data.private void buildAssociatedFBtypeEventDataPins(Write_Module_FBwr mdlwr)
private void buildAssociatedEventDataPins(OdgGBlock fbg, Write_Module_FBwr mdlwr)
OdgGBlock.iterPin().
This operation is called twice for a fbg which is first not unique.
fbg - The graphic blockmdlwr - null if executed for a fbg inside the module, the module for a module pin graphic block.
It is used in #evalPinForAssociatedEvDataPins(OdgGPin, Write_FBlock_FBwr, List, EvinoutType_FBcl, EvinoutType_FBcl, EvinoutType_FBcl, Write_Module_FBwr)
to associate an EccAction_FBcl stored in the module to event pins.private void evalPinForAssociatedEvDataPins(OdgGPin pi, Write_FBtype_FBwr fbtw, java.util.List<EvinoutType_FBcl> listEvin, java.util.List<EvinoutType_FBcl> listEvout, EvinoutType_FBcl evUpdin, EvinoutType_FBcl evUpdout, Write_Module_FBwr mdlwr, boolean bFirstCall, XY_FBcl xy)
Write_FBtype_FBwr.completeMissingEventPins(). Not all pins need to be drawn in the graphic.pi - The pin from the graphic block From OdgGBlocklistEvin - given more as one evin of the block or emtpyevout - given evout in the graphic appearance , or nullevUpdin - same for updateevUpdout - mdlwr - null if this is not a module pin FBlock.private void processMdlout()
StdLibFBlocks_FBcl.fbtVarV_OFB and ~fbtVarZ_OFB
DinoutType_FBcl.changeAccTargetCode(DoutTargetCodeAccess) with DoutTargetCodeAccess.UseVarMdl.
private void createInheritanceFBclConnectionsFromGraphic(Write_Module_FBwr mdlwr)
OdgGPin.connections
which are only stored in the graphic level in OdgReader
Write_FBtype_FBwr.listInheritance.
Write_FBtype_FBwr.createInheritanceType() and FBtype_FBcl.CreateFBT.createIdxInheritance()
the inheritances are stored in the FBtype_FBcl.inheritance array.
But this routines must be called only after gather all inheritances in the graphic.odg - graphic datavoid createFBclConnectionsFromGraphic()
OdgGPin.connections
which are only stored in the graphic level in OdgReader
The PinInstances are referred from OdgGBlock#idxPinInstance
and also OdgGBlock.fbPinSrc and OdgGBlock.fbPinDst.
FBlock in the adequate specific idx...
PinConnection#idxPinConnected
and PinConnection#idxPinBackConnectedodg - graphic dataprivate void resolveXrefGraphicConnections(OdgXrefGraphic xref)
OdgGPin as source of this Xref (expected only one) via its OdgGBlock.fbPinDst connected.
OdgGBlock.fbPinSrc connected.
idxXrefGraphicByName.
It contains all Xref and also all ofbConnPoints of the module.xref - The OdgGBlock which is an OdgXrefGraphic.
For all Xref with the same name only one instance is used.private OdgConnection.ECkind checkConnectionKind(OdgConnection.ECkind cKind, OdgConnection conn, boolean bSrc)
cKind - givenconn - the new given connection in this Xref connectionsprj occurs.OdgConnection.eKind if the given cKind is more deterministic.
This is necessary for connections via Demux to transport information about the connection kind
especially to non determined connection kinds for aggregation to the THIS port.
The last one cannot be automatically determined because it is a connection to the whole GBlock.void processGBlockToPin_FBclConnections(OdgGBlock fbg)
OdgGBlock#idxPinInstance
and then their OdgGPin.connections for the source of the connection.
OdgReader.processGraphicConnectionsOfAllModulePages(OdgModule, org.vishia.fbcl.readOdg.xml.XmlForOdg)
OdgGPin.pinObj() are created, but have not connections.
OdgGPin.pinObj() are connected each other.
Pin_FBcl#connect which refers immediately the dst pin in the FBlock_FBcl / FBlock_FBcl
All idxXrefGraphicByName which are no more necessary (all connections are used) are deleted.
fbg - the GBlock or GExpession graphical instance which contains the pins with their connections.private void processGPinToPin_FBclConnections(OdgGPin gpin, OdgGBlock fbg, OdgConnection.ECkind onlyConnKind)
processTypePinGraphicConnection(OdgGPin, org.vishia.fbcl.readOdg.OdgConnection.ECkind, Iterator, OdgConnection, boolean).
This is to clarify types of data and references.
#connectViaDemuxXref(OdgGPin, OdgGPin, String, String, int, int),
because the connections maybe made over XRef and DeMux.
Din_FBcl instead of the correct Dout_FBcl.
The problem is solved from Pin_FBcl#connectFrom(Pin_FBcl): Either the real source is found in the immediately connected Din_FBcl by the existing source connection,
or the source connection is catched up if the connection from the real source is processed. Then all indirect connections are resolved.gpin - The pin in graphic. For textual connection it is the dst pin. For graphic connection it is only used as OdgConnection.piSrc
of all found connections, means only as source pin of the connection.fbg - the graphic FBlock. More as one graphic FBlock can exist for one really FBlock_FBcl or FBtype_FBcl.
They are referenced from OdgGBlock.fbw and OdgGBlock.fbtwonlyKind - if null process all pins. If given process only this pin Kind.private boolean processTypePinGraphicConnection(OdgGPin gpinSrc, OdgConnection.ECkind onlyConnKind, java.util.Iterator<OdgConnection> iterConn, OdgConnection conn, boolean bInstanceConn)
gpinSrc - the pin instance which's connections are handledfbg - the graphic block from which comes pinonlyConnKind - null for all, or handle only this connection kinditerConn - iterator in pin to remove the connectionconn - the given connectionbInstanceConn - true then it is also an instance connectionprivate PinType_FBcl getPinTypeViaDemux(OdgGPin gpin)
gpin - given pin of a Demux, may be a Demux pin or Mux pin as src or dst, OdgGBlock.fbPinSrcprivate void connectViaDemux(OdgGPin gpinStart, OdgGPin gpinSrc, java.lang.String deMuxSelSrc, java.lang.String deMuxSelDst, OdgConnection.ECkind cKindArg, int ixPinMux, int recursion)
Pin_FBcl.connectDst and Pin_FBcl.connectSrc is set. Pin_FBcl.connDst().
This operation regards destination of ofpDemux and ofbDemux.
The connection paths is tracked through all these path parts.
Also connections of arrays are regarded.
OdgGPin.connections.
There are gathered from the graphic in OdgReader#gatherConnection(OdgPage, OdgModule, org.vishia.fbcl.readOdg.xml.XmlForOdg.Draw_connector, org.vishia.fbcl.readOdg.xml.XmlForOdg).
OdgGPin.connections are tracked, the OdgConnection.piDst is used,
the OdgConnection.piSrc should be equal gpinSrc.
OdgConnection.eKind "rpagdze" are used.
This excludes composition, dependency, inheritance, docu, requirement, attrib and evDataRel.
OdgGBlock.eKindBlock is FBkind_FBcl.demux,
then either the pin is a deMux pin (style ofpDemux) or the pin is the source or destination of a DeMux FBlock (style ofbDemux).
Then #connectViaDemux(OdgGPin, OdgGPin, String, String, OdgGPin, OdgGBlock, int, int) is called
for further tracking.
gpinStart - The pin from where the connection startsgpinSrc - The pin of the current connectioncKindArg - kind of the connection will be transferred from start to the end, because end connections may have OdgConnection.ECkind.unspec else.deMuxSelSrc - For sliced FBlocks as source or bus connections using Demux: The name in the ofpDemux pin.deMuxSelDst - For sliced FBlocks as destination using ofpDemux as input and ofbDemux OdgGBlock.fbPinSrc as output to a sliced block.
The name in the ofpDemux input pin.recursion - countered for all connection pathsprivate void connectViaDemux(OdgGPin gpinStart, OdgGPin gpinSrc, java.lang.String deMuxSelSrc, java.lang.String deMuxSelDst, OdgConnection.ECkind cKind, OdgGPin gpinDst, OdgGBlock gfbDst, int ixPinMux, int recursion)
private void connectPinSrcDstObj(OdgGPin gpinStart, OdgGPin gpinSrc, java.lang.String deMuxSelSrc, java.lang.String deMuxSelDst, int ixPinMux, OdgConnection conn, OdgGPin gpinDst)
OdgGPin.pinObj to the gpinDst OdgGPin.pinObj
with given selection of deMuxSelSrc and deMuxSelDst.
The following constellations are possible:
FBlock-sliced.pin --->|deMuxSelSrc--->pinDstIn the chain a deMux is given with input on mux and output on a selected ofpDemux pin. Then the sliced fbSrc is accessed with the required deMuxSelSrc.
pinStart --->deMuxSelDst|--->pinDstIn the chain a deMux is given with input on a selected ofpDemux pin and mux output. Then the sliced fbDst is accessed with the required deMuxSelDst.
gpinStart - The original output pin before all deMuxgpinSrc - The current pin after given deMuxdeMuxSelSrc - String for selection deMux on gpinSrcdeMuxSelDst - String for selection deMux before gpinDstconn - Info about connectiongpinDst - the current destination pin.private void processFBlockPinGraphicConnectionTextual(OdgGPin pi)
OdgGPin.nameType . OdgNameTypeArray.fblockC
and in OdgNameTypeArray.pinC.
It is written in form "fb@pin" or "@modulePin" or "@fbVariable".
The part after '@' is stored in OdgNameTypeArray.pinC, see OdgNameTypeArray.
A variable after expression resp. a module variable is also addressed with '@fbVariable'
whereas the 'fbVariable' is the name of the FBlock which is a FBlock_FBcl.Blocktype#VarAfterExpr.
OdgNameTypeArray.fblockC is optional, can be null.
OdgNameTypeArray.fblockC can contain more as one name separated with dot
to access a FBlock internally in a given FBlock which is used as module.
This is especially used to access values for a scope. It is not recommended for general use,
because the property of 'pin' or 'interface' to a module is circumvented, hence only to access test values.
OdgNameTypeArray.pinC can be null if OdgNameTypeArray.fblockC is given.
Then the 'THIZ'-port of the FBlock is used (aggregation to the whole FBlock).
OdgNameTypeArray.fblockC and OdgNameTypeArray.pinC is given,
OdgNameTypeArray.fblockC is null, then
pi - The graphic pin instanceprivate void processGraphicPinInheritance(OdgGPin pi, OdgGBlock fbg)
pi - fbg - private boolean connect_pinCXref(java.lang.String nameXref,
java.util.List<Pin_FBcl> listDinDst)
private void fulfillVariablesInExpressionFactors()
private void getListDstXrefPins(java.util.List<OdgConnection> listAdd, OdgXref xref, int recursion)
private void addPinConnected(java.util.List<FBlock_FBcl> listFBmdlSrc, Pin_FBcl pinSrc, java.lang.String connText, OdgConnection.ECkind connKind, Pin_FBcl pinDst, int ixMux, java.lang.String sElemSrc, java.lang.String sElemDstArg)
Pin.ECkind#inheritance: Instead connection to FBbase#XXXfbPinDst
a new pin with PinKind_FBcl.impl is created and stored in FBtype_FBcl#idxImpl.
FBbase#XXXfbPinSrc of a FBlock_FBcl a new pin is created and stored
in FBlock_FBcl#pinExpr.
#addPinConnected(FBbase, PinConnection, PinConnection, ECdst, String) is called
which calls FBlock#addPinKind(PinKind_FBcl, Pin_FBcl, PinConnection, ECdst, String).
This puts the correct pin in the correct index, means FBlock#idxAggr etc. and also
FBtype_FBcl#idxAggr etc.
PinConnection#idxPinConnected
and the back connection in PinConnection#idxPinBackConnected.pinSrc - The original found pin maybe without exact designation PinKind_FBcl.unspec or PinKind_FBcl.fbsrc.
Either the pin will be qualified by the kind of connection, or the connection kind is checked whether it is admissible for the pin kind,
or a second qualified pin will be created additionally for this connection.connText - possible text of the connectionconnKind - kind of connection (adequate the style in the graphic data)pinDst - The pin for destination of this connection.sElemSrc - written to PinConnect_FBcl.sElemSrc used for code generation.sElemDst - written to PinConnect_FBcl.sElemDst used for code generation.