#include <fbcallconverter.h>
Public Slots | |
| void | convert (QString *Str, int pageIndex, int from, int to, int option) |
Public Member Functions | |
| FBCallConverter (PageCtrl *pageCtrl) | |
| virtual | ~FBCallConverter () |
Private Member Functions | |
| int | convertFBCAllAtTo (QStringList *tmpList, int pageIndex, int index, int to, int option) |
| bool | getCallLineItems (QString str, int ioStyle, QString *fbPart, QString *tag, QString *comment, QString *lineEnd) |
| QString | getComment (QString str) |
| QString | getDefaultInputLine (QString str, int ioStyle) |
| QString | getDefaultOutputLine (QString str, int ioStyle) |
| QString | getIECInputLine (QString instance, QString str, int ioStyle, QString prgLng) |
| QString | getIECOutputLine (QString instance, QString str, int ioStyle, QString prgLng) |
| QString | getMoellerILOutputLine (QString str, int ioStyle) |
| int | getNextCALPos (QStringList *tmpList, int pageIndex, int index) |
Private Attributes | |
| PageCtrl * | m_PageCtrl |
| instance of PageCtrl class | |
| FBCallConverter::FBCallConverter | ( | PageCtrl * | pageCtrl | ) |
creating function for FBCallConverter -function block call<CAL> model converter-
| PageCtrl | class |
| FBCallConverter::~FBCallConverter | ( | ) | [virtual] |
virtual destructor
| void FBCallConverter::convert | ( | QString * | Str, | |
| int | pageIndex, | |||
| int | from, | |||
| int | to, | |||
| int | option | |||
| ) | [slot] |
FB call convert routine
| *Str | contains the string wich will be worked | |
| pageIndex | is the index of the selected page | |
| from | contains the current extension of the file/page | |
| to | contains the requested extension of the file/page | |
| option | contains the information about special conversion options option 0: do nothing option 1: all into selected compatibility call model option 2: outputs into simple IEC call model option 3: all into simple IEC call model |
| int FBCallConverter::convertFBCAllAtTo | ( | QStringList * | tmpList, | |
| int | pageIndex, | |||
| int | index, | |||
| int | to, | |||
| int | option | |||
| ) | [private] |
convert default call at index in tmpList into Moeller style
| *tmpList | temporary list which will be filled with the file content | |
| pageIndex | is the index of the selected page | |
| index | contains position of the next function block call model | |
| to | holds the appointed file extension | |
| option | contains the information about special conversion options |
option 0: do nothing
option 1: all into selected compatibility call model
option 2: outputs into simple IEC call model
option 3: all into simple IEC call model
| bool FBCallConverter::getCallLineItems | ( | QString | str, | |
| int | ioStyle, | |||
| QString * | fbPart, | |||
| QString * | tag, | |||
| QString * | comment, | |||
| QString * | lineEnd | |||
| ) | [private] |
get function block part and connected tag by solving str into fbPart and tag
| str | contains line | |
| ioStyle | used to handle standard inputs/outputs (0) and Moeller outputs (1) | |
| *fbPart | will filled with function block in/out substring | |
| *tag | will filled with connected tag substring | |
| *comment | will filled with comment substring | |
| *lineEnd | will filled with the line end sign |
| QString FBCallConverter::getComment | ( | QString | str | ) | [private] |
get comment from str
| QString FBCallConverter::getDefaultInputLine | ( | QString | str, | |
| int | ioStyle | |||
| ) | [private] |
get default input line: ' input := tag,'
| QString FBCallConverter::getDefaultOutputLine | ( | QString | str, | |
| int | ioStyle | |||
| ) | [private] |
get default output line: ' output => tag,'
| QString FBCallConverter::getIECInputLine | ( | QString | instance, | |
| QString | str, | |||
| int | ioStyle, | |||
| QString | prgLng | |||
| ) | [private] |
get IEC intput line according to the programming language IL: 'LD tag ST INSTANCE.input (*...*)
' ST: 'INSTANCE.input := tag; (*...*)
'
| QString FBCallConverter::getIECOutputLine | ( | QString | instance, | |
| QString | str, | |||
| int | ioStyle, | |||
| QString | prgLng | |||
| ) | [private] |
get IEC output line according to the programming language IL: 'LD INSTANCE.output (*...*)
ST tag
' ST: 'tag := INSTANCE.output; (*...*)
'
| QString FBCallConverter::getMoellerILOutputLine | ( | QString | str, | |
| int | ioStyle | |||
| ) | [private] |
get Moeller output line: ' tag := > output,'
| int FBCallConverter::getNextCALPos | ( | QStringList * | tmpList, | |
| int | pageIndex, | |||
| int | index | |||
| ) | [private] |
get position of next FB call 'CAL'/'CALL'/'abcdefg ('
PageCtrl* FBCallConverter::m_PageCtrl [private] |
instance of PageCtrl class
1.5.9