Functions | |
public void | unRecipeFunctions_setBit (anytype &manRegVal, int position, bool value) |
public void | unRecipeFunctions_getBit (anytype manRegVal, int position, int &value) |
public void | unRecipeFunctions_sortAscDynLists (dyn_string &list1, dyn_anytype &list2, dyn_string &exceptionInfo) |
public void | unRecipeFunctions_getDynPos (dyn_string dsSearch, dyn_string dsItems, dyn_int &diResult) |
public void | unRecipeFunctions_dynDiff (dyn_anytype daList1, dyn_anytype daList2, dyn_anytype &daResult) |
public bool | unRecipeFunctions_isRemoteSystemConnected (string sSystemName, dyn_string &exceptionInfo) |
public bool | unRecipeFunctions_areListsEqual (dyn_string list1, dyn_string list2) |
public void | unRecipeFunctions_mappingInsertValue (mapping &m, string key, string value, bool bUniqueValue=TRUE) |
public bool | unRecipeFunctions_isLegalRecipeName (string sName) |
public dyn_string | unRecipeFunctions_joinDynString (dyn_string ds1, dyn_string ds2, dyn_string &exceptionInfo) |
public bool | unRecipeFunctions_compareListElements (dyn_anytype daList1Orig, dyn_anytype daList2Orig, dyn_anytype &daMissingDpNames, dyn_anytype &daExtraDpNames, bool bIgnoreSystemName=TRUE) |
public dyn_anytype | unRecipeFunctions_removeSystemNameFromList (dyn_anytype daList) |
public void | unRecipeFunctions_replaceDynItem (dyn_anytype daList, anytype item, anytype replacement) |
public void | unRecipeFunctions_printDeviceList (dyn_string dsDeviceDps, string sMessage) |
public bool | unRecipeFunctions_handleDpGetSetError (int err, dyn_string &exceptionInfo) |
public void | unRecipeFunctions_normalizeDp (string &sDpName) |
public void | unRecipeFunctions_writeInRecipeLog (string sMessage, bool bWriteInGeneralLog=false, bool bWriteInLogViewer=false) |
public void | unRecipeFunctions_getRangeValues (string range, string &min, string &max, dyn_string &exceptionInfo) |
public 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.
public 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. |
Referenced by _unRecipeFunctions_addDigitalParameterToBuffers(), _unRecipeFunctions_addMultiDpeDeviceToBuffers(), and _unRecipeFunctions_addXParameterToBuffers().
public void unRecipeFunctions_getBit | ( | anytype | manRegVal, | |
int | position, | |||
int & | value | |||
) |
public 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. |
Referenced by _unRecipeFunctions_loadRecipeInstances(), and unRecipeFunctions_getRecipeClasses().
public 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. |
Referenced by _unRecipeFunctions_setOnlineValuesForNewDpes().
public 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. |
Referenced by _unRecipeFunctions_setOnlineValuesForNewDpes().
public 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. |
Referenced by _unRecipeFunctions_activateRecipe(), _unRecipeFunctions_doesRecipeClassExist(), and unRecipeFunctions_getRecipeClasses().
public 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. |
Referenced by unRecipeFunctions_deviceUpdatedRcpClassCB(), unRecipeFunctions_deviceUpdatedRcpInstanceCB(), and unRecipeFunctions_saveRecipeInstance().
public 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. |
Referenced by unRecipeFunctions_activateRecipes(), and unRecipeFunctions_getApplicationPcos().
public bool unRecipeFunctions_isLegalRecipeName | ( | string | sName | ) |
Check if a recipe name is legal (for a recipe class or a recipe instance).
sName | - [IN] Recipe name. |
Referenced by unRecipeFunctions_createRecipeInstance(), and unRecipeFunctions_duplicateRecipeInstance().
public 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. |
Referenced by unRecipeFunctions_duplicateRecipeInstance().
public 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. |
References unRecipeFunctions_removeSystemNameFromList().
Referenced by unRecipeFunctions_displayDbValues().
public dyn_anytype unRecipeFunctions_removeSystemNameFromList | ( | dyn_anytype | daList | ) |
Removes the system name for each element in the daList.
daList | - [IN] List containing the elements. |
Referenced by unRecipeFunctions_compareListElements().
public 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. |
Referenced by unRecipeFunctions_updateRecipeClassPrivileges().
public 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. |
References unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_displayDbValues().
public 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. |
Referenced by _unRecipeFunctions_lockDevices(), _unRecipeFunctions_unlockDevices(), and unRecipeFunctions_dpMultiSet().
public 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. |
Referenced by _unRecipeFunctions_getDevicePrivileges(), _unRecipeFunctions_getInitialRecipeOfClass(), _unRecipeFunctions_getLastActivatedRecipeDp(), _unRecipeFunctions_getPcoChildren(), _unRecipeFunctions_getRecipeClassData(), _unRecipeFunctions_getRecipeClassDataFromInstance(), _unRecipeFunctions_getSaveOperationIds(), _unRecipeFunctions_isRecipeClassDefinitionValid(), _unRecipeFunctions_saveRecipeClassAndInstancesToDb(), _unRecipeFunctions_setDevicePrivileges(), unRecipeDbFunctions_getRecipeInstanceDbValues(), unRecipeFunctions_activateRecipe(), unRecipeFunctions_compareOnlineValues(), unRecipeFunctions_displayOnlineValues(), unRecipeFunctions_duplicateRecipeInstance(), unRecipeFunctions_getDeviceAliases(), unRecipeFunctions_getRecipeClassObject(), unRecipeFunctions_loadRecipeClassData(), unRecipeFunctions_saveRecipeToDb(), unRecipeFunctions_selectPcoRecipes(), unRecipeFunctions_selectRecipeClass(), unRecipeFunctions_updatePredefinedRecipeInstancePrivileges(), unRecipeFunctions_updateRecipeClassPrivileges(), and unRecipeFunctions_updateRecipeInstancePrivileges().
public 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). |
Referenced by _unRecipeFunctions_activateRecipe(), _unRecipeFunctions_cancelRecipeActivation(), _unRecipeFunctions_cellEditionFinished(), _unRecipeFunctions_checkRecipeStatusBufferCB(), _unRecipeFunctions_createRecipeClass(), _unRecipeFunctions_createRecipeInstanceFromDbInternal(), _unRecipeFunctions_deleteRecipeInstances(), _unRecipeFunctions_doesRecipeClassExist(), _unRecipeFunctions_dropRecipeInDb(), _unRecipeFunctions_getDpeAddress(), _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb(), _unRecipeFunctions_getExistingInstanceOrCreateNewInstanceFromDb(), _unRecipeFunctions_getRecipeClassDataFromInstance(), _unRecipeFunctions_getRecipeClassList(), _unRecipeFunctions_lockDevices(), _unRecipeFunctions_printDbSaveMessage(), _unRecipeFunctions_recipeActivationStatusCrcOk(), _unRecipeFunctions_recipeActivationStatusDone(), _unRecipeFunctions_recipeActivationStatusError(), _unRecipeFunctions_recipeActivationStatusNewIdReceived(), _unRecipeFunctions_recipeActivationWrongOnlineValues(), _unRecipeFunctions_resetRecipeActivation(), _unRecipeFunctions_saveRecipeClassesToDb(), _unRecipeFunctions_saveRecipeClassToDb(), _unRecipeFunctions_saveRecipeElementsToFile(), _unRecipeFunctions_saveRecipeObjectToDb(), _unRecipeFunctions_sendData(), _unRecipeFunctions_unlockDevices(), unRecipeDbFunctions_getRecipeInstanceDbValues(), unRecipeFunctions_activateRecipe(), unRecipeFunctions_activateRecipes(), unRecipeFunctions_addRecipeClassDevices(), unRecipeFunctions_adoptOnlineValues(), unRecipeFunctions_applyRecipeClassModifications(), unRecipeFunctions_cancelSaveRecipeToDb(), unRecipeFunctions_checkRecipeStatus(), unRecipeFunctions_compareOnlineValues(), unRecipeFunctions_createRecipeInstance(), unRecipeFunctions_deleteRecipeClass(), unRecipeFunctions_deleteRecipeInstance(), unRecipeFunctions_deviceUpdatedRcpInstanceCB(), unRecipeFunctions_displayDbValues(), unRecipeFunctions_displayOnlineValues(), unRecipeFunctions_duplicateRecipeInstance(), unRecipeFunctions_editRecipeClassPrivileges(), unRecipeFunctions_editRecipeInstance(), unRecipeFunctions_editRecipeValuesAndShowDifferences(), unRecipeFunctions_exportMultipleRecipes(), unRecipeFunctions_getRecipeInstancesFromDatabase(), unRecipeFunctions_loadRecipeClassData(), unRecipeFunctions_loadRecipeClasses(), unRecipeFunctions_loadRecipeInstanceData(), unRecipeFunctions_loadRecipeMetadataFromDb(), unRecipeFunctions_loadSingleRecipeFromDb(), unRecipeFunctions_lockRecipe(), unRecipeFunctions_printDeviceList(), unRecipeFunctions_removeSelectedRecipeClassDevices(), unRecipeFunctions_saveAsInitialRecipe(), unRecipeFunctions_saveRecipeInstance(), unRecipeFunctions_saveRecipeToDb(), and unRecipeFunctions_writeDifferentOnlineValuesReport().
public 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. |
Referenced by unRecipeFunctions_checkRecipeValue().
public 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. |
References unRecipeFunctions_normalizeDp().
Referenced by unRecipeFunctions_getInitialPcoRecipes(), and unRecipeFunctions_getLastActivatedPcoRecipes().