fwConfigurationDB  8.4.0
Private Functions

Private Functions in general module

void _fwConfigurationDB_getPropertiesAndDPEs (string dptName, dyn_string &properties, dyn_string &dpes, string &devTypeName, dyn_string &exceptionInfo, string deviceModel="")
 
dyn_string _fwConfigurationDB_getDPTElements (string dptName, dyn_string &exceptionInfo, bool all=FALSE)
 
void _fwConfigurationDB_getDPTElements2 (string dptName, dyn_string &elementNames, dyn_int &elementTypes, dyn_string &exceptionInfo, bool all=FALSE)
 
int _fwConfigurationDB_typeIdToDpeTypeId (int varType)
 
void _fwConfigurationDB_dataToString (anytype data, int dataType, string listSeparator, string &encodedData, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_stringToData (string encodedData, int dataType, string listSeparator, anytype &data, dyn_string &exceptionInfo)
 
string _fwConfigurationDB_getFwDeviceName (string dptName, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_getAlertData (dyn_dyn_mixed &recipeObject, int row, dyn_string &exceptionInfo)
 
string _fwConfigurationDB_NodeSystemName (string nodeName)
 
string _fwConfigurationDB_NodeNameWithoutSystem (string nodeName)
 
string _fwConfigurationDB_NodeNameWithSystem (string nodeName, string systemName, dyn_string &exceptionInfo)
 
void fwConfigurationDB_dpSetMany (dyn_string &dpes, dyn_mixed &values, dyn_string &exceptionInfo, string systemName="")
 
void fwConfigurationDB_dpSetManyDist (dyn_string &dpes, dyn_mixed &values, dyn_string &exceptionInfo, bool checkDpeExist=false)
 

Detailed Description

Function Documentation

void _fwConfigurationDB_getPropertiesAndDPEs ( string  dptName,
dyn_string &  properties,
dyn_string &  dpes,
string &  devTypeName,
dyn_string &  exceptionInfo,
string  deviceModel = "" 
)
Retrieves dp elements for a dp type

This function retrieves the list of data point elements for a given data poin type. If the dpt is a framework data point type, the appropriate device definition is queried to determine the names related to data point elements.

On return, for the Framework Device data point types, the first list (properties variable) will contain the list of property names present in the device definition. The second list (dpes variable) will contain the data point element names associated with the property names from the first list, plus all the data point elements that have no device definition. This way, the function may be used to get the list of all dpes (the second list), the list of dpes from the device definitions (take only the first N items from the second list, where N is the number of elements of the first list), etc. The function will also return the device name from the device definition (in the devName argument).

For non-Frame Device data point types, the first list will always be empty, and the second list will contain the list of all dpes.

Note, that this function will work even if there is no instance of a device type available yet! (In such a case, extracting all data point element could have been done simply by a combination of dpNames() and dpSubStr() for an arbitrary, existing data point...

See also _fwConfigurationDB_getDPTElements .

Parameters
dptNamethe name of data point type
propertieson return will contain the list of property names
dpeson return will contain the list of all data point elements
devTypeNameon return will contain the device type name from the device definition, or dptName
exceptionInfostandard exception handling variable
deviceModel(optional) device model
dyn_string _fwConfigurationDB_getDPTElements ( string  dptName,
dyn_string &  exceptionInfo,
bool  all = FALSE 
)
Retrieves the names of DP elements for given data point type

This function retrieves all data point elements for specified data point type. resolving (recursively) all references to other data points and structures.

Parameters
dptNamethe name of the data point type
exceptionInfostandard exception handling variable
all(optional) if TRUE, all properties, including the "." entries of structures will be resolved; If FALSE, only the leaves of the structures will be returned
Returns
the list of all data point elements for dptName
See Also
_fwConfigurationDB_getDPTElements2
void _fwConfigurationDB_getDPTElements2 ( string  dptName,
dyn_string &  elementNames,
dyn_int &  elementTypes,
dyn_string &  exceptionInfo,
bool  all = FALSE 
)
Retrieves the names and types of DP elements for given data point type

This function retrieves all data point elements for specified data point type. resolving (recursively) all references to other data points and structures.

Parameters
dptNamethe name of the data point type
elementNameson return will contain the names of dp elements
elementTypeson return will contain the types of dp elements
exceptionInfostandard exception handling variable
all(optional) if TRUE, all properties, including the "." entries of structures will be resolved; If FALSE, only the leaves of the structures will be returned
See Also
fwConfigurationDB_getDPTElements
void _fwConfigurationDB_getAlertData ( dyn_dyn_mixed &  recipeObject,
int  row,
dyn_string &  exceptionInfo 
)
Gets the alert settings

This function gets current alert settings for a dp from the system and stores it in the data structure which is a single row of recipeObject. The data point name and data point element are passed in thr recipeRow variable as well.

Parameters
recipeRowthe input/output variable, a single row of the recipeObject refering to a single DPE.
  • on entry, recipeRow[fwConfigurationDB_RO_DP_NAME] should contain the datapoint name, and recipeRow[fwConfigurationDB_RO_ELEMENT_NAME] the data point element
  • on exit, the entries that refer to alerts will be filled with data (indices fwConfigurationDB_RO_HAS_ALERT, and fwConfigurationDB_RO_ALERT_MINIDX to fwConfigurationDB_RO_ALERT_MINIDX), the other will not be touched
exceptionInfostandard exception handling variable
string _fwConfigurationDB_NodeSystemName ( string  nodeName)

Returns system name of the node. If not specified in nodeName, returns local system

string _fwConfigurationDB_NodeNameWithoutSystem ( string  nodeName)

Returns the device (node) name, ensuring it does not contain system name

string _fwConfigurationDB_NodeNameWithSystem ( string  nodeName,
string  systemName,
dyn_string &  exceptionInfo 
)
Returns the device (node) name, ensuring it has system name in it.

passing "" as systemName means: use local system.

void fwConfigurationDB_dpSetManyDist ( dyn_string &  dpes,
dyn_mixed &  values,
dyn_string &  exceptionInfo,
bool  checkDpeExist = false 
)
performs a dpSet for a list of datapoint elements

the list may contain dpes for many systems - they are sorted/grouped appropriately

The parameters: dpes and values are passed by reference to avoid re-allocation; they are not modified