unRecipe 9.1.0
|
Functions | |
void | unRecipeFunctions_setBit (anytype &manRegVal, int position, bool value) |
void | unRecipeFunctions_getBit (anytype manRegVal, int position, int &value) |
void | unRecipeFunctions_sortAscDynLists (dyn_string &list1, dyn_anytype &list2, dyn_string &exceptionInfo) |
void | unRecipeFunctions_getDynPos (dyn_string dsSearch, dyn_string dsItems, dyn_int &diResult) |
void | unRecipeFunctions_dynDiff (dyn_anytype daList1, dyn_anytype daList2, dyn_anytype &daResult) |
bool | unRecipeFunctions_isRemoteSystemConnected (string sSystemName, dyn_string &exceptionInfo) |
bool | unRecipeFunctions_areListsEqual (dyn_string list1, dyn_string list2) |
void | unRecipeFunctions_mappingInsertValue (mapping &m, string key, string value, bool bUniqueValue=TRUE) |
bool | unRecipeFunctions_isLegalRecipeName (string sName, bool uiEnabled=true) |
dyn_string | unRecipeFunctions_joinDynString (dyn_string ds1, dyn_string ds2, dyn_string &exceptionInfo) |
bool | unRecipeFunctions_compareListElements (dyn_anytype daList1Orig, dyn_anytype daList2Orig, dyn_anytype &daMissingDpNames, dyn_anytype &daExtraDpNames, bool bIgnoreSystemName=TRUE) |
dyn_anytype | unRecipeFunctions_removeSystemNameFromList (dyn_anytype daList) |
void | unRecipeFunctions_replaceDynItem (dyn_anytype daList, anytype item, anytype replacement) |
void | unRecipeFunctions_printDeviceList (dyn_string dsDeviceDps, string sMessage) |
bool | unRecipeFunctions_handleDpGetSetError (int err, dyn_string &exceptionInfo) |
void | unRecipeFunctions_normalizeDp (string &sDpName) |
void | unRecipeFunctions_writeInRecipeLog (string sMessage, bool bWriteInGeneralLog=false, bool bWriteInLogViewer=false) |
void | unRecipeFunctions_getRangeValues (string range, string &min, string &max, dyn_string &exceptionInfo) |
void | unRecipeFunctions_getDeviceAliases (dyn_string dsDeviceDpNames, dyn_string &dsDeviceAliases) |
UNICOS Copyright (C) CERN 2017 All rights reserved
unRcpFunctions_utilities.ctl This file contains common utility functions.
void unRecipeFunctions_setBit | ( | anytype & | manRegVal, |
int | position, | ||
bool | value | ||
) |
Set the bit value in a register variable.
manRegVal | - [IN/OUT] Register where the bit value will be modified. |
position | - [IN] Bit position in the register variable. |
value | - [IN] New value for the bit in the register. |
void unRecipeFunctions_getBit | ( | anytype | manRegVal, |
int | position, | ||
int & | value | ||
) |
void unRecipeFunctions_sortAscDynLists | ( | dyn_string & | list1, |
dyn_anytype & | list2, | ||
dyn_string & | exceptionInfo | ||
) |
Auxiliary function to order alphabetically a list (list1) and reorder the second list (list2) in a consistent way.
list1 | - [IN/OUT] List to be ordered alphabetically. |
list2 | - [IN/OUT] List to be ordered in the same way as the list1. |
exceptionInfo | - [OUT] Standard error handling variable. |
void unRecipeFunctions_getDynPos | ( | dyn_string | dsSearch, |
dyn_string | dsItems, | ||
dyn_int & | diResult | ||
) |
Get the position of the dsSearch elements in the dsItems list.
dsSearch | - [IN] List of elements to search in the dsItems list. |
dsItems | - [IN] List of items. |
diResult | - [OUT] List containing the positions of the dsSearch elements in the dsItems list. |
void unRecipeFunctions_dynDiff | ( | dyn_anytype | daList1, |
dyn_anytype | daList2, | ||
dyn_anytype & | daResult | ||
) |
Get the difference of the daList1 with the daList2.
daList1 | - [IN] First list of elements. |
daList2 | - [IN] Second list of elements. |
daResult | - [OUT] List containing the elements of daList1 not contained in daList2. |
bool unRecipeFunctions_isRemoteSystemConnected | ( | string | sSystemName, |
dyn_string & | exceptionInfo | ||
) |
Check if a distributed system is connected.
sSystemName | - [IN] System name. |
exceptionInfo | - [OUT] Standard exception handling variable. |
bool unRecipeFunctions_areListsEqual | ( | dyn_string | list1, |
dyn_string | list2 | ||
) |
Function to check if the items of two lists are equal.
list1 | - [IN] The first list of elements. |
list2 | - [IN] The second list of elements. |
void unRecipeFunctions_mappingInsertValue | ( | mapping & | m, |
string | key, | ||
string | value, | ||
bool | bUniqueValue = TRUE |
||
) |
Auxiliary function to add values to a mapping where the mapping value is a dynamic list.
m | - [OUT] Mapping where to insert the values. |
key | - [IN] Key for the new value. |
value | - [IN] The value to insert. |
bUniqueValue | - [IN] If TRUE the values can not be repeated for the same key. |
bool unRecipeFunctions_isLegalRecipeName | ( | string | sName, |
bool | uiEnabled = true |
||
) |
Check if a recipe name is legal (for a recipe class or a recipe instance).
sName | - [IN] Recipe name. |
dyn_string unRecipeFunctions_joinDynString | ( | dyn_string | ds1, |
dyn_string | ds2, | ||
dyn_string & | exceptionInfo | ||
) |
Join the content of two dyn_string variables if they have the same number of elements.
ds1 | - [IN] The first dyn_string variable. |
ds2 | - [IN] The second dyn_string variable. |
exceptionInfo | - [OUT] Standard exception handling variable. |
bool unRecipeFunctions_compareListElements | ( | dyn_anytype | daList1Orig, |
dyn_anytype | daList2Orig, | ||
dyn_anytype & | daMissingDpNames, | ||
dyn_anytype & | daExtraDpNames, | ||
bool | bIgnoreSystemName = TRUE |
||
) |
Compares the elements contained in two lists.
daList1Orig | - [IN] First list of elements. |
daList2Orig | - [IN] Second list of elements. |
daMissingDpNames | - [OUT] List of elements contained in daList1 and not contained in daList2. |
daExtraDpNames | - [OUT] List of elements contained in daList2 and not contained in daList1. |
bIgnoreSystemName- | [IN] TRUE if the system name must be ignored. |
dyn_anytype unRecipeFunctions_removeSystemNameFromList | ( | dyn_anytype | daList | ) |
Removes the system name for each element in the daList.
daList | - [IN] List containing the elements. |
void unRecipeFunctions_replaceDynItem | ( | dyn_anytype | daList, |
anytype | item, | ||
anytype | replacement | ||
) |
Replaces all ocurrences of the 'item' by 'replacement' in the 'daList'.
daList | - [IN] List of elements. |
item | - [IN] Item to be replaced in the list. |
replacement | - [IN] New item for the replacement. |
void unRecipeFunctions_printDeviceList | ( | dyn_string | dsDeviceDps, |
string | sMessage | ||
) |
Print a message in the recipe log containing a list of devices (if any).
dsDeviceDps | - [IN] List of device DPs. |
sMessage | - [IN] Message to print if the list is not empty. |
bool unRecipeFunctions_handleDpGetSetError | ( | int | err, |
dyn_string & | exceptionInfo | ||
) |
Handle dpGet/dpSet errors.
err | - [IN] Value returned by dpGet/dpSet |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_normalizeDp | ( | string & | sDpName | ) |
Function to normalize a datapoint name (the trailing dot will be removed if it exists).
sDpName | - [IN/OUT] The datapoint name to normalize. |
void unRecipeFunctions_writeInRecipeLog | ( | string | sMessage, |
bool | bWriteInGeneralLog = false , |
||
bool | bWriteInLogViewer = false |
||
) |
Write a message in the recipe log.
sMessage | - [IN] The message to write in the recipe log. |
bWriteInGeneralLog | - [IN] Flag to specify if the message must be written in the UNICOS HMI log (false by default). |
bWriteInLogViewer | - [IN] Flag to specify if the message must be written in the WinCC OA log viewer (false by default). |
void unRecipeFunctions_getRangeValues | ( | string | range, |
string & | min, | ||
string & | max, | ||
dyn_string & | exceptionInfo | ||
) |
Get the min. and max. values defined in a range string
range | - [IN] String containing a range definition (i.e.: [0.0, 100.0]) |
min | - [OUT] Minimum value defined in the range. |
max | - [OUT] Maximum value defined in the range. |
exceptionInfo | - [OUT] Standard exception handling routine. |
void unRecipeFunctions_getDeviceAliases | ( | dyn_string | dsDeviceDpNames, |
dyn_string & | dsDeviceAliases | ||
) |
Get the device aliases from a list of dp names.
dsDeviceDpNames | - [IN] List of device dp names. |
dsDeviceAliases | - [OUT] List of device aliases. |