fwDIP
8.4.0
|
Functions | |
string | fwDIPImport_getNodeValue (int docNum, int node) |
bool | _fwDIP_checkDIPManager (mapping mTemp, mapping &m_dsAllPublication, dyn_string &exceptionInfo, file fFile) |
_fwDIPImport_getAllOtherDIPPublication (dyn_string dsDIPAllConfig, string sDIPConfig, mapping &m_dsAllPublication, dyn_string &exceptionInfo) | |
bool | _fwDIPImport_isPublicationUsed (string sPublicationName, mapping &m_dsAllPublication, string &sDIPConfig) |
int | _fwDIP_getAllDIPConfigFromConfigFile (dyn_int &diNumber, dyn_string &dsConfigFileDIPConfig) |
fwDIPImport_checkDriver (dyn_string &exceptionInfo, file fFile) | |
_fwDIPImport_addStartManager (int iManagerType, string sManager, string sCommandLine, string sAction) | |
int | _fwDIPImport_managerState (int iManagerType, string sManager, string sCommandLine, int iManagerNumber) |
fwDIPImport_loadFile (int &iDipMgrNumber, string sFile, dyn_mapping &dmDIPtype, mapping &mDIPdpeList, mapping &m_dsAllPublication, dyn_string &exceptionInfo, string sLogFile="") | |
fwDIPImport_createDIPConfig (dyn_mapping &dmDIPtype, mapping &mDIPdpeList, dyn_string &exceptionInfo, string sLogFile="") | |
_fwDIPImport_createDIPManagerConfig (file fFile, mapping mDIPtype, string &sDIPConfigDP, dyn_string &exceptionInfo) | |
fwDIPImport_DIPApiManager (int iManagerNumber, string sDns, string sParameters, dyn_string &exceptionInfo, file fFile) | |
fwDIPImport_DIPApiConfigProjectFile (int iManagerNumber, string sDIPConfigDP, dyn_string &exceptionInfo, file fFile) | |
fwDIPImport_DIPConfigDP (string sDIPConfigDP, string sPublisherName, int iQueryTimeOut, dyn_string &exceptionInfo, file fFile) | |
_fwDIPImport_createDIPPublicationSubscriptionConfig (file fFile, string sDIPConfigDP, mapping mDIPtype, dyn_dyn_string ddsDPE, dyn_string &exceptionInfo) | |
_fwDIPImport_createDIPPublication (file fFile, string sDIPConfigDP, mapping mDIPtype, dyn_dyn_string ddsDPE, dyn_string &exceptionInfo) | |
_fwDIPImport_dumpException (string sType, file fFile, dyn_string exceptionInfoTemp, dyn_string &exceptionInfo, string sPubName, string sDIPConfigDP) | |
bool | _fwDIPImport_checkPublicationDPE (dyn_string &dsDPE, dyn_string dsName, dyn_string dsElements, dyn_string dsAlias, dyn_string &exceptionInfo) |
_fwDIPImport_createDIPSubscription (file fFile, string sDIPConfigDP, mapping mDIPtype, dyn_dyn_string ddsDPE, dyn_string &exceptionInfo) | |
bool | _fwDIPImport_checkAndCreateSubscriptionDPE (string sSubscriptionType, dyn_string &dsDPE, dyn_string dsType, dyn_string dsName, dyn_string dsElements, dyn_string dsAlias, dyn_string &exceptionInfo) |
bool | _fwDIPImport_checkDPEType (string sSubscriptionType, string sDPType, string sElements, dyn_string dsDpel, dyn_int diDpelType) |
_fwDIPImport_dumpInLogFile (file fFile, dyn_mapping dmDIPtype, mapping mDIPdpeList) | |
string | fwDIPImport_makeLogFileName () |
void | fwDIPImport_loadConfigInMemory (int &iDipMgrNumber, int docNum, int node, string type, dyn_mapping &dmDIPtype, mapping &mDIPdpeList, mapping &m_dsAllPublication, file fFile, dyn_string &exceptionInfo) |
int | _fwDIPImport_add (string manager, string startMode, int secKill, int restartCount, int resetMin, string commandLine, string host="", int port=4999, string user="", string pwd="") |
int | _fwDIPImport_pmonGetCount (string sHost, int iPort) |
_fwDIP_fputs (string sString, file fFile, int iPos=-1, int iMax=-1) | |
public | _fwDIP_setProgressBar (int iPos=-1, int iMax=-1) |
_fwDIP_setRemainingTime (int iElapsedTime, int iDone, int iTotal, bool bVisible) | |
This library contains utility functions for the import of fwDIP config.
27/08/2013: Herve Milcent DIP-120 - DIP and fwDipImport, accept "single" keyword in the import file and use "single" in the export instead of "simple"
27/08/2013: Herve Milcent first version
string fwDIPImport_getNodeValue | ( | int | docNum, |
int | node | ||
) |
Get the value of a xml node
docNum | input, the xml document number |
node | input, the node id |
bool _fwDIP_checkDIPManager | ( | mapping | mTemp, |
mapping & | m_dsAllPublication, | ||
dyn_string & | exceptionInfo, | ||
file | fFile | ||
) |
Check if the DIP configuration is correct
mTemp | input, the current DIP config read from the file |
m_dsAllPublication | the list of all the publications except the ones of the current DIP config used |
exceptionInfo | details of any exceptions are returned here |
fFile | input, the log file name id |
_fwDIPImport_getAllOtherDIPPublication | ( | dyn_string | dsDIPAllConfig, |
string | sDIPConfig, | ||
mapping & | m_dsAllPublication, | ||
dyn_string & | exceptionInfo | ||
) |
Get all the publications except the ones of the DIP config currently used
the list of publications is returned in a mapping variable:
dsDIPAllConfig | input, list of all the existing DIP config |
sDIPConfig | input, the DIP config to skip |
m_dsAllPublication | the list of all the publication except the ones of the current DIP config used |
exceptionInfo | details of any exceptions are returned here |
bool _fwDIPImport_isPublicationUsed | ( | string | sPublicationName, |
mapping & | m_dsAllPublication, | ||
string & | sDIPConfig | ||
) |
Check if the publication is already defined and return the DIP config name
sPublicationName | input, the DIP publication |
m_dsAllPublication | the list of all the publication except the ones of the current DIP config used |
sDIPConfig | if the publication is already defined, the DIP config DP name is returned here |
int _fwDIP_getAllDIPConfigFromConfigFile | ( | dyn_int & | diNumber, |
dyn_string & | dsConfigFileDIPConfig | ||
) |
Get all the DIP Config from the wincc oa config file.
diNumber | the list of DIP manager number |
dsConfigFileDIPConfig | the list of DIP config DP |
fwDIPImport_checkDriver | ( | dyn_string & | exceptionInfo, |
file | fFile | ||
) |
Check if the SIM driver 13 is started and of type SIM, if not, it is added in the console and started
exceptionInfo | details of any exceptions are returned here |
fFile | input, the log file name id |
_fwDIPImport_addStartManager | ( | int | iManagerType, |
string | sManager, | ||
string | sCommandLine, | ||
string | sAction | ||
) |
Add a manager in the console, start a manager in the console
iManagerType | input, the type of manager: DRIVER_MAN, API_MAN |
sManager | input, the manager name |
sCommandLine | input, command line of the manager |
sAction | input, type of action: "ManStart"=start a manager, "ManAdd"=add a manager |
int _fwDIPImport_managerState | ( | int | iManagerType, |
string | sManager, | ||
string | sCommandLine, | ||
int | iManagerNumber | ||
) |
Check the state of a manager
iManagerType | input, the type of manager: DRIVER_MAN, API_MAN |
sManager | input, the manager name |
sCommandLine | input, command line of the manager |
iManagerNumber | input, the manager number |
fwDIPImport_loadFile | ( | int & | iDipMgrNumber, |
string | sFile, | ||
dyn_mapping & | dmDIPtype, | ||
mapping & | mDIPdpeList, | ||
mapping & | m_dsAllPublication, | ||
dyn_string & | exceptionInfo, | ||
string | sLogFile = "" |
||
) |
Load a XML file
All the DIP configuration of the file are kept in two variables:
in a mapping of the list dmDIPtype one can have:
mDIPdpeList[1]: dyn_string[1] first DPE of the publication and it configuration dyn_string[2] second DPE of the publication and it configuration ... mDIPdpeList[2]: dyn_string[1] first DPE of the publication and it configuration
.... mDIPdpeList[n]: dyn_string[1] first DPE of the subscription and it configuration
The DPE configuration is a dyn_string: [1] name [2] alias [3] element [4] tag [5] buffer [6] overwrite: true or false [7] type: simple, single or multiple [8] description [9] unit
To retreive all the DIP configuration, one loops:
iDipMgrNumber | the DIP manager number to used |
sFile | input, the XML file to read |
dmDIPtype | list of DIP configuration |
mDIPdpeList | DPE list |
m_dsAllPublication | all the DIP publication |
exceptionInfo | details of any exceptions are returned here |
sLogFile | input, the log file name |
fwDIPImport_createDIPConfig | ( | dyn_mapping & | dmDIPtype, |
mapping & | mDIPdpeList, | ||
dyn_string & | exceptionInfo, | ||
string | sLogFile = "" |
||
) |
Create the DIP config, publication and subscription
All the DIP configuration of the file are kept in two variables:
in a mapping of the list dmDIPtype one can have:
mDIPdpeList[1]: dyn_string[1] first DPE of the publication and it configuration dyn_string[2] second DPE of the publication and it configuration ... mDIPdpeList[2]: dyn_string[1] first DPE of the publication and it configuration
.... mDIPdpeList[n]: dyn_string[1] first DPE of the subscription and it configuration
The DPE configuration is a dyn_string: [1] name [2] alias [3] element [4] tag [5] buffer [6] overwrite: true or false [7] type: simple, single or multiple [8] description [9] unit
To retreive all the DIP configuration, one loops:
dmDIPtype | list of DIP configuration |
mDIPdpeList | DPE list |
exceptionInfo | details of any exceptions are returned here |
sLogFile | input, the log file name |
_fwDIPImport_createDIPManagerConfig | ( | file | fFile, |
mapping | mDIPtype, | ||
string & | sDIPConfigDP, | ||
dyn_string & | exceptionInfo | ||
) |
Configure the DIP config
fFile | input, the log file name id |
mDIPtype | input, a DIP configuration |
sDIPConfigDP | the DIP config DP |
exceptionInfo | details of any exceptions are returned here |
fwDIPImport_DIPApiManager | ( | int | iManagerNumber, |
string | sDns, | ||
string | sParameters, | ||
dyn_string & | exceptionInfo, | ||
file | fFile | ||
) |
Check if the DIP API manager is started and add it in the console if needed
iManagerNumber | input, the DIP manager number |
sDns | input, the DIP dns |
sParameters | input, extra parameters for the DIP manager |
exceptionInfo | details of any exceptions are returned here |
fFile | input, the log file name id |
fwDIPImport_DIPApiConfigProjectFile | ( | int | iManagerNumber, |
string | sDIPConfigDP, | ||
dyn_string & | exceptionInfo, | ||
file | fFile | ||
) |
Set the entry for the DIP API manager in the winccoa project config file
iManagerNumber | input, the DIP manager number |
sDIPConfigDP | input, the DIP config DP name |
exceptionInfo | details of any exceptions are returned here |
fFile | input, the log file name id |
fwDIPImport_DIPConfigDP | ( | string | sDIPConfigDP, |
string | sPublisherName, | ||
int | iQueryTimeOut, | ||
dyn_string & | exceptionInfo, | ||
file | fFile | ||
) |
Create the DIP config DP if needed and set it.
sDIPConfigDP | input, the DIP config DP name |
sPublisherName | input, the DIP config publisher name |
iQueryTimeOut | input, the query timeout of for the DIP API manager |
exceptionInfo | details of any exceptions are returned here |
fFile | input, the log file name id |
_fwDIPImport_createDIPPublicationSubscriptionConfig | ( | file | fFile, |
string | sDIPConfigDP, | ||
mapping | mDIPtype, | ||
dyn_dyn_string | ddsDPE, | ||
dyn_string & | exceptionInfo | ||
) |
Create the DIP publication or subscription.
All the DIP publication or subscription is stored in two variables:
fFile | input, the log file name id |
sDIPConfigDP | input, the DIP config DP name |
mDIPtype | input, the DIP config publisher name |
ddsDPE | input, the query timeout of for the DIP API manager |
exceptionInfo | details of any exceptions are returned here |
_fwDIPImport_createDIPPublication | ( | file | fFile, |
string | sDIPConfigDP, | ||
mapping | mDIPtype, | ||
dyn_dyn_string | ddsDPE, | ||
dyn_string & | exceptionInfo | ||
) |
Create the DIP publication.
All the DIP publication or subscription is stored in two variables:
fFile | input, the log file name id |
sDIPConfigDP | input, the DIP config DP name |
mDIPtype | input, the DIP config publisher name |
ddsDPE | input, the query timeout of for the DIP API manager |
exceptionInfo | details of any exceptions are returned here |
_fwDIPImport_dumpException | ( | string | sType, |
file | fFile, | ||
dyn_string | exceptionInfoTemp, | ||
dyn_string & | exceptionInfo, | ||
string | sPubName, | ||
string | sDIPConfigDP | ||
) |
Dump exception in the log file.
sType | input, type of configuration |
fFile | input, the log file name id |
exceptionInfoTemp | input, the exception to write to the log file |
exceptionInfo | details of any exceptions are returned here |
sPubName | input, the name of the configuration |
sDIPConfigDP | input, the DIP config DP name |
bool _fwDIPImport_checkPublicationDPE | ( | dyn_string & | dsDPE, |
dyn_string | dsName, | ||
dyn_string | dsElements, | ||
dyn_string | dsAlias, | ||
dyn_string & | exceptionInfo | ||
) |
Check and return the publication DPE.
dsDPE | the list of DPE |
dsName | input, the list of name xml node value |
dsElements | input, the list of elements xml node value |
dsAlias | input, the list of alias xml node value |
exceptionInfo | details of any exceptions are returned here |
_fwDIPImport_createDIPSubscription | ( | file | fFile, |
string | sDIPConfigDP, | ||
mapping | mDIPtype, | ||
dyn_dyn_string | ddsDPE, | ||
dyn_string & | exceptionInfo | ||
) |
Create the DIP subscription.
All the DIP publication or subscription is stored in two variables:
fFile | input, the log file name id |
sDIPConfigDP | input, the DIP config DP name |
mDIPtype | input, the DIP config publisher name |
ddsDPE | input, the query timeout of for the DIP API manager |
exceptionInfo | details of any exceptions are returned here |
bool _fwDIPImport_checkAndCreateSubscriptionDPE | ( | string | sSubscriptionType, |
dyn_string & | dsDPE, | ||
dyn_string | dsType, | ||
dyn_string | dsName, | ||
dyn_string | dsElements, | ||
dyn_string | dsAlias, | ||
dyn_string & | exceptionInfo | ||
) |
Check and create the subscription DPE
sSubscriptionType | input, type of subscription read from the file, xsd:bool, xsd:float, xsd:int, xsd:string |
dsDPE | list of DPE |
dsType | input, DP type of the given DPE |
dsName | input, the list of name xml node value |
dsElements | input, the list of elements xml node value |
dsAlias | input, the list of alias xml node value |
exceptionInfo | details of any exceptions are returned here |
bool _fwDIPImport_checkDPEType | ( | string | sSubscriptionType, |
string | sDPType, | ||
string | sElements, | ||
dyn_string | dsDpel, | ||
dyn_int | diDpelType | ||
) |
Check the type of DPE can accept the DIP subscription
sSubscriptionType | input, type of subscription read from the file, xsd:bool, xsd:float, xsd:int, xsd:string |
sDPType | input, DP type |
sElements | input, the elements xml node value=DPE |
dsDpel | input, the list of list of DPE of the sDPType |
diDpelType | input, the list of list of DPE type of the sDPType |
_fwDIPImport_dumpInLogFile | ( | file | fFile, |
dyn_mapping | dmDIPtype, | ||
mapping | mDIPdpeList | ||
) |
dump the DIP config in the log file
All the DIP configuration of the file are kept in two variables:
in a mapping of the list dmDIPtype one can have:
mDIPdpeList[1]: dyn_string[1] first DPE of the publication and it configuration dyn_string[2] second DPE of the publication and it configuration ... mDIPdpeList[2]: dyn_string[1] first DPE of the publication and it configuration
.... mDIPdpeList[n]: dyn_string[1] first DPE of the subscription and it configuration
The DPE configuration is a dyn_string: [1] name [2] alias [3] element [4] tag [5] buffer [6] overwrite: true or false [7] type: simple, single or multiple [8] description [9] unit
To retreive all the DIP configuration, one loops:
fFile | input, the log file name id |
dmDIPtype | list of DIP configuration |
mDIPdpeList | DPE list |
string fwDIPImport_makeLogFileName | ( | ) |
returns the file name to be use for log file
void fwDIPImport_loadConfigInMemory | ( | int & | iDipMgrNumber, |
int | docNum, | ||
int | node, | ||
string | type, | ||
dyn_mapping & | dmDIPtype, | ||
mapping & | mDIPdpeList, | ||
mapping & | m_dsAllPublication, | ||
file | fFile, | ||
dyn_string & | exceptionInfo | ||
) |
Load the DIP config into memory
iDipMgrNumber | the DIP manager number to used |
docNum | input, the XML doc number |
node | input, the node number |
type | input, type of config read from the xml file: configuration, publication, etc. |
dmDIPtype | list of DIP configuration |
mDIPdpeList | DPE list |
m_dsAllPublication | all the DIP publication |
fFile | input, the log file name id |
exceptionInfo | details of any exceptions are returned here |
int _fwDIPImport_add | ( | string | manager, |
string | startMode, | ||
int | secKill, | ||
int | restartCount, | ||
int | resetMin, | ||
string | commandLine, | ||
string | host = "" , |
||
int | port = 4999 , |
||
string | user = "" , |
||
string | pwd = "" |
||
) |
This function allows to insert a manager into a project. It is checked before, if the
manager already exists.
manager | name of the manager |
startMode | {manual, once, always} |
secKill | seconds to kill after stop |
restartCount | number of restarts |
resetMin | restart counter reset time (minutes) |
commandLine | commandline for the manager |
host | hostname |
port | pmon port |
user | pmon user |
pwd | pmon password |
!!!!
int _fwDIPImport_pmonGetCount | ( | string | sHost, |
int | iPort | ||
) |
Equivalent to pmonGetCount(). This function returns the number of manager in the console.
sHost | input, pmon hostname |
iPort | input, pmon port number |
_fwDIP_fputs | ( | string | sString, |
file | fFile, | ||
int | iPos = -1 , |
||
int | iMax = -1 |
||
) |
dump string to a file and the screen log.
sString | input, string to write to the log and the screen log |
fFile | input, file descriptor |
iPos | input, progress bar value |
iMax | input, progress bar max |
public _fwDIP_setProgressBar | ( | int | iPos = -1 , |
int | iMax = -1 |
||
) |
set the progress bar.
iPos | input, progress bar value |
iMax | input, progress bar max |
_fwDIP_setRemainingTime | ( | int | iElapsedTime, |
int | iDone, | ||
int | iTotal, | ||
bool | bVisible | ||
) |
set the remaining time.
iElapsedTime | input, elapsed time since the beginning |
iDone | input, number of element processed |
iTotal | input, total number of element |
bVisible | input, visibility of the text |