unRcpFunctions_utilities.ctl File Reference

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)

Detailed Description

UNICOS Copyright (C) CERN 2017 All rights reserved

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)

Function Documentation

public 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.

Referenced by _unRecipeFunctions_addDigitalParameterToBuffers(), _unRecipeFunctions_addMultiDpeDeviceToBuffers(), and _unRecipeFunctions_addXParameterToBuffers().

public 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
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.

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.

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.

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.

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.

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.

Referenced by _unRecipeFunctions_setOnlineValuesForNewDpes().

public 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.

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.

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.

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.

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.

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).

Parameters:
sName - [IN] Recipe name.
Returns:
TRUE if the recipe name is legal, otherwise FALSE.

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.

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.

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.

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.

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.

Parameters:
daList - [IN] List containing the elements.
Returns:
New list without the system name.

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'.

Parameters:
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).

Parameters:
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.

Parameters:
err - [IN] Value returned by dpGet/dpSet
exceptionInfo - [OUT] Standard exception handling variable.
Returns:

Referenced by _unRecipeFunctions_lockDevices(), _unRecipeFunctions_unlockDevices(), and unRecipeFunctions_dpMultiSet().

public void unRecipeFunctions_normalizeDp ( string &  sDpName  ) 
public 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).

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

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.

Referenced by unRecipeFunctions_checkRecipeValue().

public 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.

References unRecipeFunctions_normalizeDp().

Referenced by unRecipeFunctions_getInitialPcoRecipes(), and unRecipeFunctions_getLastActivatedPcoRecipes().


Generated on 11 Mar 2019 for unCPC6 by  doxygen 1.6.1