fwDevice
8.4.0
|
Functions | |
fwDeviceFrontEndConfigFile_CreateContents (string dpName, string &fileContents, dyn_string &exceptionInfo) | |
fwDeviceFrontEndConfigFile_GetBranchRecursive (string dpName, unsigned hierarchyLevel, dyn_dyn_string &hierarchyData, dyn_string &exceptionInfo) | |
fwDeviceFrontEndConfigFile_ProcessEntry (string deviceDpName, string rawEntry, string &processedEntry, dyn_string &exceptionInfo) | |
fwDeviceFrontEndConfigFile_GetDpTypeTag (string deviceDpType, int tagType, string &configEntry, dyn_string &exceptionInfo) | |
fwDeviceFrontEndConfigFile_GetDeviceTag (dyn_string device, int tagType, string &configEntry, dyn_string &exceptionInfo) | |
NOTE: This file is not automatically loaded by fwCore.ctl and needs to be loaded explicitely, if needed
This library contains function associated with the creation of front end config files, using the framework hierarchy and the data stored in the device definitions.
fwDeviceFrontEndConfigFile_CreateContents | ( | string | dpName, |
string & | fileContents, | ||
dyn_string & | exceptionInfo | ||
) |
Creates a string containing the required contents of a front end config file. The string can be written directly
to a file. The file is generated by moving down the hierarchy from a given starting point. The file entries for each device found are read from the device definitions and appended to the contents of the file.
dpName | the name of the dp at the top of the hierarchy from which to make the config file. |
fileContents | the contents of the file is returned here |
exceptionInfo | details of any exceptions are returned here |
fwDeviceFrontEndConfigFile_GetBranchRecursive | ( | string | dpName, |
unsigned | hierarchyLevel, | ||
dyn_dyn_string & | hierarchyData, | ||
dyn_string & | exceptionInfo | ||
) |
Recursive function for finding details of the devices below a given device in the hierarchy
dpName | the name of the dp from which to find the devices below. |
hierarchyLevel | an unsigned giving the starting hierarchy level of dpName devices deeper in the hierarchy are given number relative to this starting number Note: this value can be chosen arbitrarily in any situation, but the most likely setting is 1 |
hierarchyData | 1- The dpNames of the dps in the hierarchy below dpName (including dpName) 2- The dptypes of the dps listed in 1 3- An unsigned representing the hierarhcy level of the dps listed in 1 higher values represent devices deeper in the hierarchy eg. children of dpName will have a value of hierarchyLevel+1 |
exceptionInfo | details of any exceptions are returned here |
fwDeviceFrontEndConfigFile_ProcessEntry | ( | string | deviceDpName, |
string | rawEntry, | ||
string & | processedEntry, | ||
dyn_string & | exceptionInfo | ||
) |
Function to process the config file entries read from the device definitions.
Substitutions are made as with address templates eg. name1% etc.. In addition dpe:<dpElement>% is substituted with the value from dpElement eg. dpe:.Settings.BaudRate% might be replaced with 125000
deviceDpName | the name of the dp for which to process the given entry text. |
rawEntry | the raw entry read from the device definitions |
processedEntry | the processed entry is returned here, ready to be inserted in the config file |
exceptionInfo | details of any exceptions are returned here |
fwDeviceFrontEndConfigFile_GetDpTypeTag | ( | string | deviceDpType, |
int | tagType, | ||
string & | configEntry, | ||
dyn_string & | exceptionInfo | ||
) |
DEPRECATED - Function to read the config file tags from the device definitions for a specific device type
DEPRECRATED - Please use fwDeviceFrontEndConfigFile_GetDeviceTag instead
fwDeviceFrontEndConfigFile_GetDeviceTag | ( | dyn_string | device, |
int | tagType, | ||
string & | configEntry, | ||
dyn_string & | exceptionInfo | ||
) |
Function to read the config file tags from the model or device definitions for a specific device
device | the device object, must contains at least the dpName |
tagType | fwDeviceFrontEndConfigFile_OPENING_TAG to get opening tags fwDeviceFrontEndConfigFile_CLOSING_TAG to get closing tags |
configEntry | the contents of the relevant dyn_string in the device definitions returned as a single string |
exceptionInfo | details of any exceptions are returned here |