|
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) |
|
(c) Copyright CERN 2005. All rights not expressly granted are reserved. iceco.nosp@m.ntro.nosp@m.ls.su.nosp@m.ppor.nosp@m.t@cer.nosp@m.n.ch
SPDX-License-Identifier: LGPL-3.0-only
unRcpFunctions_utilities.ctl This file contains common utility functions.
- Creation Date
- 15/03/2017
- Modification History
- Constraints
- None
- Usage
- Public
- PVSS managers
- Ui, CTRL
- Author
- Ivan Prieto Barreiro (BE-ICS)
◆ unRecipeFunctions_setBit()
void unRecipeFunctions_setBit |
( |
anytype & |
manRegVal, |
|
|
int |
position, |
|
|
bool |
value |
|
) |
| |
Set the bit value in a register variable.
- Parameters
-
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. |
◆ unRecipeFunctions_getBit()
void unRecipeFunctions_getBit |
( |
anytype |
manRegVal, |
|
|
int |
position, |
|
|
int & |
value |
|
) |
| |
Get the bit value in a register variable.
- Parameters
-
manRegVal | - [IN] Register where the bit value will read. |
position | - [IN] Bit position in the register variable. |
value | - [IN] Value of the bit in the register. |
- Reviewed:
- 2018-08-06 API
◆ unRecipeFunctions_sortAscDynLists()
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.
- Parameters
-
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. |
◆ unRecipeFunctions_getDynPos()
void unRecipeFunctions_getDynPos |
( |
dyn_string |
dsSearch, |
|
|
dyn_string |
dsItems, |
|
|
dyn_int & |
diResult |
|
) |
| |
Get the position of the dsSearch elements in the dsItems list.
- Parameters
-
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. |
◆ unRecipeFunctions_dynDiff()
void unRecipeFunctions_dynDiff |
( |
dyn_anytype |
daList1, |
|
|
dyn_anytype |
daList2, |
|
|
dyn_anytype & |
daResult |
|
) |
| |
Get the difference of the daList1 with the daList2.
- Parameters
-
daList1 | - [IN] First list of elements. |
daList2 | - [IN] Second list of elements. |
daResult | - [OUT] List containing the elements of daList1 not contained in daList2. |
◆ unRecipeFunctions_isRemoteSystemConnected()
bool unRecipeFunctions_isRemoteSystemConnected |
( |
string |
sSystemName, |
|
|
dyn_string & |
exceptionInfo |
|
) |
| |
Check if a distributed system is connected.
- Parameters
-
sSystemName | - [IN] System name. |
exceptionInfo | - [OUT] Standard exception handling variable. |
- Returns
- TRUE if the system is not remote or if it is a remote and connected, otherwise FALSE.
◆ unRecipeFunctions_areListsEqual()
bool unRecipeFunctions_areListsEqual |
( |
dyn_string |
list1, |
|
|
dyn_string |
list2 |
|
) |
| |
Function to check if the items of two lists are equal.
- Parameters
-
list1 | - [IN] The first list of elements. |
list2 | - [IN] The second list of elements. |
- Returns
- TRUE if the lists contain the same elements, otherwise FALSE.
◆ unRecipeFunctions_mappingInsertValue()
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.
- Parameters
-
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. |
◆ unRecipeFunctions_isLegalRecipeName()
bool unRecipeFunctions_isLegalRecipeName |
( |
string |
sName, |
|
|
bool |
uiEnabled = true |
|
) |
| |
Check if a recipe name is legal (for a recipe class or a recipe instance).
- Parameters
-
- Returns
- TRUE if the recipe name is legal, otherwise FALSE.
◆ unRecipeFunctions_joinDynString()
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.
- Parameters
-
ds1 | - [IN] The first dyn_string variable. |
ds2 | - [IN] The second dyn_string variable. |
exceptionInfo | - [OUT] Standard exception handling variable. |
- Returns
- New dyn_string with the concatenated elements of the variables ds1 and ds2.
◆ unRecipeFunctions_compareListElements()
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.
- Parameters
-
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. |
- Returns
- TRUE if the lists contain the same elements, otherwise FALSE.
◆ unRecipeFunctions_removeSystemNameFromList()
dyn_anytype unRecipeFunctions_removeSystemNameFromList |
( |
dyn_anytype |
daList | ) |
|
Removes the system name for each element in the daList.
- Parameters
-
daList | - [IN] List containing the elements. |
- Returns
- New list without the system name.
◆ unRecipeFunctions_replaceDynItem()
void unRecipeFunctions_replaceDynItem |
( |
dyn_anytype |
daList, |
|
|
anytype |
item, |
|
|
anytype |
replacement |
|
) |
| |
Replaces all ocurrences of the 'item' by 'replacement' in the 'daList'.
- Parameters
-
daList | - [IN] List of elements. |
item | - [IN] Item to be replaced in the list. |
replacement | - [IN] New item for the replacement. |
◆ unRecipeFunctions_printDeviceList()
void unRecipeFunctions_printDeviceList |
( |
dyn_string |
dsDeviceDps, |
|
|
string |
sMessage |
|
) |
| |
Print a message in the recipe log containing a list of devices (if any).
- Parameters
-
dsDeviceDps | - [IN] List of device DPs. |
sMessage | - [IN] Message to print if the list is not empty. |
◆ unRecipeFunctions_handleDpGetSetError()
bool unRecipeFunctions_handleDpGetSetError |
( |
int |
err, |
|
|
dyn_string & |
exceptionInfo |
|
) |
| |
Handle dpGet/dpSet errors.
- Parameters
-
err | - [IN] Value returned by dpGet/dpSet |
exceptionInfo | - [OUT] Standard exception handling variable. |
- Returns
◆ unRecipeFunctions_normalizeDp()
void unRecipeFunctions_normalizeDp |
( |
string & |
sDpName | ) |
|
Function to normalize a datapoint name (the trailing dot will be removed if it exists).
- Parameters
-
sDpName | - [IN/OUT] The datapoint name to normalize. |
◆ unRecipeFunctions_writeInRecipeLog()
void unRecipeFunctions_writeInRecipeLog |
( |
string |
sMessage, |
|
|
bool |
bWriteInGeneralLog = false , |
|
|
bool |
bWriteInLogViewer = false |
|
) |
| |
Write a message in the recipe log.
- Parameters
-
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). |
◆ unRecipeFunctions_getRangeValues()
void unRecipeFunctions_getRangeValues |
( |
string |
range, |
|
|
string & |
min, |
|
|
string & |
max, |
|
|
dyn_string & |
exceptionInfo |
|
) |
| |
Get the min. and max. values defined in a range string
- Parameters
-
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. |
◆ unRecipeFunctions_getDeviceAliases()
void unRecipeFunctions_getDeviceAliases |
( |
dyn_string |
dsDeviceDpNames, |
|
|
dyn_string & |
dsDeviceAliases |
|
) |
| |
Get the device aliases from a list of dp names.
- Parameters
-
dsDeviceDpNames | - [IN] List of device dp names. |
dsDeviceAliases | - [OUT] List of device aliases. |