public class ReaderFBcl
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReaderFBcl.CmdArgs |
private class |
ReaderFBcl.NameAndTypeFB
Helper class to evaluate the real number of inconn and outconn due to the connection.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
bCheckParsing
Set it to true to check parsing, maybe while debugging.
|
(package private) OFBconv.CmdArgs |
cmdArgs |
(package private) LogMessage |
log |
(package private) LogMessage |
logpj |
private ZbnfJavaOutput |
parserJava |
private ZbnfJavaOutput |
parserST |
(package private) Prj_FBcl |
prj |
private WriterDataFBcl |
wrDataFBcl |
private WriterXmlFBCL |
wrXmlFBcl |
XmlJzReader |
xmlReader |
| Constructor and Description |
|---|
ReaderFBcl(LogMessage log,
Prj_FBcl prj,
OFBconv.CmdArgs cmdArgs) |
| Modifier and Type | Method and Description |
|---|---|
private java.util.List<EvinoutType_FBcl> |
checkAllTransitions(IEC61499data.Fb_ecc_declaration ecc,
Write_Module_FBwr mfbwr) |
private void |
optimizeEcc(java.util.List<EvinoutType_FBcl> evinUsed,
Write_Module_FBwr mfbwr)
This operation checks whether there is a simple regular ECC.
|
private Module_FBcl |
prepareModule(IEC61499data.Fb_type_declaration dataRaw)
Prepares from raw read data, creates the substantial content of the module and the interface.
|
private void |
prepDataConnections(IEC61499data.FBNetwork mdlraw,
Write_Module_FBwr mfbwr) |
private void |
prepEcc(IEC61499data.BasicFB basicFBraw,
Write_Module_FBwr mfbwr) |
private void |
prepEventConnections(IEC61499data.FBNetwork mdlraw,
Write_Module_FBwr mfbwr) |
private void |
prepEvin(IEC61499data.Fb_interface_list ifc,
Write_Module_FBwr mfbwr)
Prepare the event inputs of the module.
|
private void |
prepEvout(IEC61499data.Fb_interface_list ifc,
Write_Module_FBwr mfbwr)
prepares the output events with its data outputs from read FBCL data.
|
private void |
prepFBlocks(IEC61499data.FBNetwork mdlraw,
Write_Module_FBwr mfbwr) |
private void |
prepInpins(IEC61499data.Fb_interface_list ifc,
Write_Module_FBwr mfbwr,
java.util.List<DType_FBcl> dtypes)
Reads from
IEC61499data.Fb_interface_list#get_InputVars()
and writes to Write_Module_FBwr#addDinPort(int, String, DType_FBcl)
or to Write_Module_FBwr#addRefMdl(int, String, DType_FBcl)
if the type in IEC61499data.Input_var_declaration#type ends with "__REF" |
private void |
prepOutpins(IEC61499data.Fb_interface_list ifc,
Write_Module_FBwr mfbwr,
java.util.List<DType_FBcl> dtypes) |
Module_FBcl |
read(java.io.File fileFBCL,
int recursive)
Reads a IEC 61499 Composite FBlock (contains a graphical model) either from the textual
or from the XML syntax.
|
IEC61499data |
readFileRawData(java.io.File fileFBCL)
Reads one FBCL file as IEC 61499 module either from xml or from fbd.
|
private java.io.File |
searchSubmoduleFile(java.lang.String sType) |
FBtype_FBcl |
searchUserModule(java.lang.String sType,
int recursive)
Searches an FBcl file for an user module in all directories given with argument -fd:DIR
Already found and translated Modules are stored and gotten from
#idxAllFBlockType
A non found module is searched by name in the used module path
given with ReaderFBcl.CmdArgs.dirSrcFBCL search path (argument -fd:PATH) |
final OFBconv.CmdArgs cmdArgs
final LogMessage log
boolean bCheckParsing
final Prj_FBcl prj
private final ZbnfJavaOutput parserJava
private final ZbnfJavaOutput parserST
public final XmlJzReader xmlReader
private final WriterDataFBcl wrDataFBcl
private final WriterXmlFBCL wrXmlFBcl
final LogMessage logpj
public ReaderFBcl(LogMessage log,
Prj_FBcl prj,
OFBconv.CmdArgs cmdArgs)
throws java.lang.InstantiationException,
java.io.IOException
java.lang.InstantiationExceptionjava.io.IOExceptionpublic Module_FBcl read(java.io.File fileFBCL, int recursive)
fileFBCL - The file containing the module. Either in XML coding or IEC 61499 text coding.recursive - Start with 0, too much recursions (100) throws.readFileRawData(File) to get the raw Data for such FBlocks.java.lang.InstantiationExceptionjava.io.IOExceptionprivate java.io.File searchSubmoduleFile(java.lang.String sType)
public FBtype_FBcl searchUserModule(java.lang.String sType, int recursive) throws java.lang.InstantiationException, java.io.IOException
#idxAllFBlockType
A non found module is searched by name in the used module path
given with ReaderFBcl.CmdArgs.dirSrcFBCL search path (argument -fd:PATH)sType - name of the typerecursive - java.io.IOExceptionjava.lang.InstantiationExceptionpublic IEC61499data readFileRawData(java.io.File fileFBCL) throws java.io.IOException
fileFBCL - java.io.IOExceptionprivate Module_FBcl prepareModule(IEC61499data.Fb_type_declaration dataRaw)
FBtype_FBcl is completed
EvinoutType_FBcl.getAction(int) are not created yet.
EvinoutType_FBcl#get_dataPins()
as it is read from the source in the interface declaration. Not checked with inner wiring inside the module.
dataRaw - private void prepEvin(IEC61499data.Fb_interface_list ifc, Write_Module_FBwr mfbwr)
prepInpins(org.vishia.fbcl.parseIEC61499_gen.IEC61499data.Fb_interface_list, Write_Module_FBwr, List))
Or associate event in and event update in. In this case the event in should be always prepared (order in text file).
The found event which is associated to another evin is the update event in.ifc - mfbwr - private void prepEvout(IEC61499data.Fb_interface_list ifc, Write_Module_FBwr mfbwr)
ifc - mfbwr - private void prepInpins(IEC61499data.Fb_interface_list ifc, Write_Module_FBwr mfbwr, java.util.List<DType_FBcl> dtypes)
IEC61499data.Fb_interface_list#get_InputVars()
and writes to Write_Module_FBwr#addDinPort(int, String, DType_FBcl)
or to Write_Module_FBwr#addRefMdl(int, String, DType_FBcl)
if the type in IEC61499data.Input_var_declaration#type ends with "__REF"ifc - parse resultmfbwr - module to writedtypes - private void prepOutpins(IEC61499data.Fb_interface_list ifc, Write_Module_FBwr mfbwr, java.util.List<DType_FBcl> dtypes)
private void prepFBlocks(IEC61499data.FBNetwork mdlraw, Write_Module_FBwr mfbwr)
private void prepEventConnections(IEC61499data.FBNetwork mdlraw, Write_Module_FBwr mfbwr)
private void prepDataConnections(IEC61499data.FBNetwork mdlraw, Write_Module_FBwr mfbwr)
private void prepEcc(IEC61499data.BasicFB basicFBraw, Write_Module_FBwr mfbwr)
private java.util.List<EvinoutType_FBcl> checkAllTransitions(IEC61499data.Fb_ecc_declaration ecc, Write_Module_FBwr mfbwr)
private void optimizeEcc(java.util.List<EvinoutType_FBcl> evinUsed, Write_Module_FBwr mfbwr)
evinUsed - all events which are used by the eccmfbwr -