unRcpFunctions.ctl File Reference

LIBRARY: unRecipeFunctions.ctl

Author:
: Ivan Prieto Barreiro (EN-ICE-SIC)

Creation Date: April 2011

version 1.4.0

Modification History: 01/11/2011: Ivan

  • v1.1.0: The device type names have been modified to use the "CPC_" prefix.

01/08/2012: Ivan

  • v1.2.0 : Adding new functionalities to the component:
    • Dynamic creation of recipe classes.
    • Recipe activation in multiple PLCs.

09/12/2013: Ivan

  • v1.3.4 : Bug fixing and improvements in existing functionalities.

09/09/2014: Ivan

  • v1.4.0 : Bug fixing and improvements in existing functionalities.

External Functions: Internal Functions:



const int unRecipeFunctions_ERROR_NoRecipeClass = -1
const int unRecipeFunctions_ERROR_InvalidElements = -2
const int unRecipeFunctions_ERROR_NoRecipeInstance = -3
const int RCP_INSTANCE_ID = 1
const int RCP_INSTANCE_NAME = 2
const int RCP_INSTANCE_CLASS = 3
const int RCP_INSTANCE_AUTHOR = 4
const int RCP_INSTANCE_VERSION = 5
const int RCP_INSTANCE_CREATED = 6
const int RCP_INSTANCE_LAST_USAGE = 7
const int RCP_INSTANCE_LAST_MODIFIED = 8
const int RCP_INSTANCE_LAST_ACT_USER = 9
const int RCP_INSTANCE_LAST_MOD_USER = 10
const int RCP_INSTANCE_VALUES = 11
const int RCP_INSTANCE_PREDEFINED = 12
const int RCP_CLASS_NAME = 1
const int RCP_CLASS_TYPE = 2
const int RCP_CLASS_DESC = 3
const int RCP_CLASS_ELEMENTS = 4
const int RCP_CLASS_ELEMENTS_DESC = 5
const int RCP_CLASS_ELEMENTS_RANGE = 6
const int RCP_CLASS_ELEMENTS_UNIT = 7
const int RCP_CLASS_INSTANCES = 8
const int RCP_CLASS_EDITABLE = 9
const int RCP_CLASS_LAST_MODIFIED = 10
const int RCP_CLASS_LAST_ACTIVATED = 11
const int RCP_CLASS_LAST_ACTIVATION_TIME = 12
const int RCP_INITIAL_OK = 0
const int RCP_INITIAL_NO_DEFINED = -1
const int RCP_INITIAL_TOO_MANY = -2
const int RCP_INITIAL_UNDEFINED = -3
const string CELL_EDIT_COLOR = "{204,255,153}"
const string CELL_VALUE_OUT_OF_RANGE_COLOR = "{255,64,64}"
const string CELL_ERROR_COLOR = "{255,0,0}"
const string CELL_BG_COLOR = "{255,255,255}"
const string INACTIVE_RCP_COLOR = "{251,255,72}"
const string ACTIVE_RCP_COLOR = "{0,245,0}"
global mapping unRecipe_rangeElements
global int g_editingRowNumber = -1
global string g_editingColName = ""
global bool g_bCreatingRecipeInstance = false
global mapping unRecipeFaceplate_selectedRecipe
void _unRecipeFunctions_formatValues (dyn_string dpNames, dyn_string values, dyn_anytype &formattedValues, dyn_string &exceptionInfo)
void unRecipeFunctions_displayOnlineValues (string sRecipeDpName, dyn_string &exceptionInfo)
void _unRecipeFunctions_editRecipeValuesAndShowDifferences (dyn_anytype daValues, dyn_string &exceptionInfo)
void unRecipeFunctions_writeDifferentOnlineValuesReport (dyn_int diDiffRowIndex, dyn_int diIndex, dyn_string dsDpNames, dyn_string dsAlias, dyn_anytype daRcpValues, dyn_anytype daOnlineValues)
bool _unRecipeFunctions_getRowStylesForValueComparison (dyn_anytype daValues1, dyn_anytype daValues2, dyn_int &diRowStyleIndex, dyn_int &diRowStyles, dyn_int &diDiffRowIndex)
void unRecipeFunctions_getOnlineValues (dyn_string dsDpNames, dyn_anytype &values, dyn_string &exceptionInfo)
string unRecipeFunctions_getDeviceRange (string sDpName, dyn_string &exceptionInfo)
string unRecipeFunctions_getDpeUnit (string sDpName, dyn_string &exceptionInfo)
void _unRecipeFunctions_getTypeMapping (string sRecipeType, mapping &map, dyn_string &exceptionInfo)
void _unRecipeFunctions_saveRecipeValues (dyn_dyn_mixed recipeObject, dyn_anytype &values, dyn_string &exceptionInfo)
void _unRecipeFunctions_getRangeElementFromPVSSDPE (string sDpName, string &sElement, dyn_string &exceptionInfo)
void _unRecipeFunctions_getInstanceRange (string sDpe, string sRangeElement, string &sRangeMin, string &sRangeMax, dyn_string &exceptionInfo)
synchronized bool _unRecipeFunctions_lockDevices (dyn_string dsDpNames, dyn_string &dsLockedDeviceDp, dyn_string &dsLockedDeviceAlias, dyn_string &exceptionInfo)
synchronized bool _unRecipeFunctions_unlockDevices (dyn_string dsDpNames, dyn_string &exceptionInfo)
void _unRecipeFunctions_setRecipeInstancePanelComponentsEnabled (bool value)
bool _unRecipeFunctions_handleDpGetSetError (int err, dyn_string &exceptionInfo)
void _unRecipeFunctions_getDpeAddress (string dpe, string deviceType, string &address, dyn_string &exceptionInfo)
void _unRecipeFunctions_setBit (anytype &manRegVal, int position, bool value)
void _unRecipeFunctions_getBit (anytype manRegVal, int position, int &value)
void _unRecipeFunctions_getS7AddressDBNumber (string sDpe, string sDeviceType, string &sDb, dyn_string &exceptionInfo)
void _unRecipeFunctions_getS7AddressOffset (string sDpe, string sDeviceType, string &sOffset, dyn_string &exceptionInfo)
void _unRecipeFunctions_getElementsBySystem (dyn_string elements, dyn_anytype values, mapping &systemDpes, dyn_string &exceptionInfo)
void _unRecipeFunctions_getOnlineValueDpes (dyn_string dpNames, dyn_string &outputDpes, dyn_string &exceptionInfo)
void _unRecipeFunctions_getDefaultValueDpes (dyn_string dpNames, dyn_string &outputDpes, dyn_string &exceptionInfo)
bool _unRecipeFunctions_checkRecipeOnlineValues (dyn_string dpes, dyn_string values, string &errDpe, dyn_string &exceptionInfo)
void unRecipeFunctions_getRecipeStatus (dyn_dyn_mixed recipeObject, string lastActivated, int &status, dyn_string &errMsg, dyn_string &exceptionInfo)
int unRecipeFunctions_checkRecipeStructure (string sRcpName, dyn_string dsRcpElements, dyn_string dsRcpValues, dyn_string dsRcpTypes, dyn_string &exceptionInfo)
bool unRecipeFunctions_checkRecipeValues (dyn_dyn_mixed recipeObject, dyn_anytype &values, bool bShowErrorLines, dyn_string &exceptionInfo)
void unRecipeFunctions_compareOnlineValues (dyn_string dsRcpDpList)
public void unRecipeFunctions_adoptOnlineValues (dyn_string dsRcpDps)
private bool unRecipeFunctions_lockRecipe (string sRcpDp, string sAlias)
bool _unRecipeFunctions_checkRecipeValues (dyn_string dsDps, dyn_anytype values, bool bShowErrorLines, dyn_string &exceptionInfo)
int unRecipeFunctions_checkRecipeValue (string sDpName, anytype value, dyn_string &exceptionInfo)
void _unRecipeFunctions_getRangeValues (string range, string &min, string &max, dyn_string &exceptionInfo)
void unRecipeFunctions_getPlcStatus (dyn_string recipeElements, bool &bActive, dyn_string &statusMessage, dyn_string &exceptionInfo)
void _unRecipeFunctions_plcStatusCB (string sAlarmDpe, int iSystemIntegrityAlarmValue, string sEnabledDpe, bool bSystemIntegrityAlarmEnabled)
void unRecipeFunctions_disconnectPlcStatus (string sRcpInstanceDp, dyn_string &exceptionInfo)
void unRecipeFunctions_connectPlcStatus (string sRcpInstanceDp, dyn_string &exceptionInfo)
int unRecipeFunctions_loadRecipeClasses (string sPcoAlias, dyn_string &exceptionInfo, bool bLoadFirstClass=TRUE, string sApplication="*", bool bOnlyConnectedSystems=FALSE)
int _unRecipeFunctions_loadRecipeClassesInTable (dyn_string rcpClassNames, dyn_string rcpClassDps, bool bLoadFirstClass=TRUE)
int _unRecipeFunctions_loadRecipeClassesInComboBox (dyn_string rcpClassNames)
void unRecipeFunctions_clearRecipeClassData ()
void _unRecipeFunctions_createPredefinedRecipeInstance (string sClassName, string sAppName, dyn_string &exceptionInfo)
private bool _unRecipeFunctions_deletePredefinedRecipeInstance (string sClassName)
 _unRecipeFunctions_getDeviceDefaultPrivileges (string sDpType, string &sOperatorPrivileges, string &sExpertPrivileges, string &sAdminPrivileges, dyn_string exceptionInfo)
void unRecipeFunctions_updateRecipeClassPrivileges (string sDpName)
void unRecipeFunctions_updateRecipeInstancePrivileges (string sDpName, string sClassName)
void _unRecipeFunctions_addPrivileges (dyn_string dsDefaultPrivileges, dyn_string &dsDevicePrivileges1, dyn_string dsDevicePrivileges2, dyn_string dsDevicePrivileges3)
void _unRecipeFunctions_removeObsoletePrivileges (dyn_string &dsDevicePrivileges, dyn_string dsDefaultPrivileges1, dyn_string dsDefaultPrivileges2, dyn_string dsDefaultPrivileges3)
void _unRecipeFunctions_getRecipeClassDeviceMapping (dyn_mixed rcpClassObject, mapping &rcpDeviceDpes)
void unRecipeFunctions_loadRecipeClassData (string sRcpClassDp)
bool _unRecipeFunctions_isRecipeClassDefinitionValid (string sClassDp, dyn_string &exceptionInfo)
dyn_string _unRecipeFunctions_getRcpClassDeviceOrder (string sRcpClassDp, dyn_string dsDevices, dyn_string &exceptionInfo)
void unRecipeFunctions_selectRecipeClass (string sRcpClassDp, dyn_string &exceptionInfo, bool bForceReload=FALSE)
void _unRecipeFunctions_getRecipeClassDataFromInstance (string sRcpInstanceDp, string &sRcpClassName, string &sRcpClassDp, string &sPcoLink)
bool unRecipeFunctions_selectRecipeInstance (string sRcpInstanceDp, dyn_string &exceptionInfo)
void _unRecipeFunctions_dpConnectRcpClassElementsCB (string sRcpClassElementsDp, dyn_string dsValues)
void _unRecipeFunctions_enableRecipeInstanceWarning (bool bEnable, string sMessage="")
void _unRecipeFunctions_dpConnectRcpValuesCB (string sRcpValuesDp, dyn_string dsValues)
public mapping unRecipeFunctions_getApplicationPcos (bool bLocalOnly=TRUE, bool bOnlyPcosWithRecipes=FALSE)
public dyn_string unRecipeFunctions_getApplicationPcoList (mapping mApplicationPcos, string sApplication)
void unRecipeFunctions_selectPcoRecipes (string sPcoDp, dyn_string &exceptionInfo, bool bSelectFirstInstance=true, string sApplication="*")
public bool unRecipeFunctions_selectItemInComboBox (string sShape, string sSelect, int indexOtherwise=1)
void unRecipeFunctions_animateSelectionProgressBar (string sDpName)
public void unRecipeFunctions_getPcosWithRecipes (dyn_string &dsPcoNamesWithRecipes, dyn_string &dsPcoDpsWithRecipes, bool bLocalOnly=FALSE, string sApplication="*", dyn_string dsAllPcos=makeDynString(), dyn_string dsAllPcoDps=makeDynString())
public void _unRecipeFunctions_loadPcosWithRecipes (string sApplication)
public void _unRecipeFunctions_loadRecipeClassList (string sPcoLink="*", string sApplication="*")
void unRecipeFunctions_getPcoList (dyn_string &dsPcoNames, dyn_string &dsPcoDps, bool bLocalOnly=FALSE)
public void _unRecipeFunctions_getFilteredDevices (dyn_string dsSelectedDevType, dyn_string &dsRetDpName, dyn_string &dsRetAlias, dyn_string &dsRetAppl, bool bLocalOnly=FALSE, dyn_string dsSelectedApplication=makeDynString("*"))
public void _unRecipeFunctions_getFilteredDevicesBySystemName (string sSystemName, dyn_string dsSelectedDevType, dyn_string &dsRetDpName, dyn_string &dsRetAlias, dyn_string &dsRetAppl, dyn_string dsSelectedApplication=makeDynString("*"))
void unRecipeFunctions_getRecipeClasses (dyn_string &dsRecipeClassNames, dyn_string &dsRecipeClassDps, string sPcoLink="*", bool bLocalOnly=FALSE, bool bAddSystemName=FALSE, string sApplication="*", bool bOnlyConnectedSystems=FALSE)
void _unRecipeFunctions_getVisibleApplicationsList (dyn_string &dsApplications) synchronized(g_unicosHMI_dsApplicationList)
synchronized void _unRecipeFunctions_loadRecipeInstances (string sRecipeClass="")
void _unRecipeFunctions_getRecipeInstancesOfClass (string sClassName, dyn_string &dsRcpInstanceNames, dyn_string &dsRcpInstanceDps)
void _unRecipeFunctions_sortAscDynLists (dyn_string &list1, dyn_anytype &list2, dyn_string &exceptionInfo)
synchronized void _unRecipeFunctions_loadPropertiesTableInfo (string sDpName="", dyn_dyn_mixed recipeObject=makeDynMixed())
synchronized void unRecipeFunctions_setRecipeStatusInfo (int status, dyn_string message=makeDynString())
synchronized void unRecipeFunctions_loadRecipeInstanceData ()
synchronized void _unRecipeFunctions_loadHistoryTableInfo (string sDpName="", dyn_dyn_mixed recipeObject=makeDynMixed())
synchronized void _unRecipeFunctions_clearInstanceTables ()
void unRecipeFunctions_editRecipeInstance (string sRecipeDp, dyn_string &exceptionInfo, int row=-1, string column="")
void _unRecipeFunctions_copyRecipeInstanceToHiddenTable ()
bool unRecipeFunctions_saveRecipeInstance (string sRecipeDp, dyn_string &exceptionInfo, bool bShowConfirmationMessage=TRUE)
bool _unRecipeFunctions_showValuesOutOfRange (dyn_int diErrorLines)
void unRecipeFunctions_saveAsDeviceDefaultValues (string sRecipeDp, dyn_string &exceptionInfo)
void unRecipeFunctions_saveAsInitialRecipe (string sRecipeDp, dyn_string &exceptionInfo)
int _unRecipeFunctions_getInitialRecipeOfClass (string sClassDp, string &sInitialRcpDp, dyn_string &exceptionInfo)
void _unRecipeFunctions_getPcoChildren (string sPcoDpName, dyn_string &children, dyn_string &exceptionInfo)
void unRecipeFunctions_activateInitialRecipesFromPcoHierarchy (string sPcoDp, dyn_string &exceptionInfo)
int _unRecipeFunctions_getLastActivatedRecipeDp (string sClassDp, string &sLastActivatedRcpDp, dyn_string &exceptionInfo)
void unRecipeFunctions_activateLastActivatedRecipesFromPcoHierarchy (string sPcoDp, dyn_string &exceptionInfo)
void _unRecipeFunctions_getLastActivatedPcoRecipes (string sPcoDp, dyn_string &recipeList, dyn_string &exceptionInfo)
void _unRecipeFunctions_getInitialPcoRecipes (string sPcoDp, dyn_string &recipeList, dyn_string &exceptionInfo)
void unRecipeFunctions_getLastActivatedRecipesFromPcoHierarchy (string sPcoDp, dyn_string &recipeList, dyn_string &exceptionInfo)
void unRecipeFunctions_getInitialRecipesFromPcoHierarchy (string sPcoDp, dyn_string &recipeList, dyn_string &exceptionInfo)
void _unRecipeFunctions_writeInRecipeLog (string sMessage, bool bWriteInGeneralLog=false, bool bWriteInLogViewer=false)
void unRecipeFunctions_cancelEditRecipeInstance (string sRecipeDp)
void _unRecipeFunctions_getRecipeObjectFromDp (string sRecipeDp, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo)
void _unRecipeFunctions_orderRecipeInstanceElements (dyn_string dsDeviceOrder, dyn_dyn_mixed &recipeObject)
void unRecipeFunctions_getRecipeClassObject (string sRcpClassDp, dyn_mixed &recipeClassInfo, dyn_string &exceptionInfo)
void unRecipeFunctions_addRecipeClassDevices (string sRcpClassDp)
void unRecipeFunctions_applyRecipeClassModifications (string sRcpClassDp)
void _unRecipeFunctions_setOnlineValuesForNewDpes (dyn_string dsOldDpes, dyn_string dsNewDpes, dyn_string dsRcpInstNames)
void _unRecipeFunctions_getDynPos (dyn_string dsSearch, dyn_string dsItems, dyn_int &diResult)
void _unRecipeFunctions_dynDiff (dyn_anytype daList1, dyn_anytype daList2, dyn_anytype &daResult)
void unRecipeFunctions_removeSelectedRecipeClassDevices (string sRcpClassDp)
public void _unRecipeFunctions_createRecipeClass (string sClassName, string sDescription, string sPcoLink, string &sRcpClassDp, dyn_string &exceptionInfo, dyn_string dsDeviceList=makeDynString(), string sAcDomain="", string sOperatorPrivileges="", string sExpertPrivileges="", string sAdminPrivileges="")
bool unRecipeFunctions_isRemoteSystemConnected (string sSystemName, dyn_string &exceptionInfo)
bool _unRecipeFunctions_doesRecipeClassExist (string sClassName)
 unRecipeFunctions_deviceUpdatedRcpClassCB (string sCommandDp, int iCommand, string sSystemNameDp, string sSystemName)
 unRecipeFunctions_deviceUpdatedRcpInstanceCB (string sCommandDp, int iCommand, string sSystemNameDp, string sSystemName)
bool _unRecipeFunctions_areListsEqual (dyn_string list1, dyn_string list2)
public void unRecipeFunctions_getRecipeInstancePredefinedPrivileges (string sClassName, string &sRcpInstanceDp, string &sAcDomain, string &sOperatorAction, string &sExpertAction, string &sAdminAction)
void unRecipeFunctions_editRecipeClassPrivileges (string sRcpClassDp)
void _unRecipeFunctions_getDevicePrivileges (string sDpName, string &sAcDomain, string &sOperatorAction, string &sExpertAction, string &sAdminAction)
void _unRecipeFunctions_setDevicePrivileges (string sDpName, string sAcDomain, string sOperatorAction, string sExpertAction, string sAdminAction, dyn_string &exceptionInfo)
void _unRecipeFunctions_getDefaultClassPrivileges (string sRoleType, dyn_string &dsPrivileges)
void _unRecipeFunctions_getDefaultInstancePrivileges (string sRoleType, dyn_string &dsPrivileges)
public void _unRecipeFunctions_mappingInsertValue (mapping &m, string key, string value, bool bUniqueValue=TRUE)
bool unRecipeFunctions_createRecipeFrontEnd (string sAppName, string sPrefix, bool bEvent, string sAnalog, string sBool, string sEvent, dyn_string &exceptionInfo)
void unRecipeFunctions_createRecipeInstance ()
bool _unRecipeFunctions_isLegalRecipeName (string sName)
bool _unRecipeFunctions_hasInitialRecipe (string sRecipeClass)
bool _unRecipeFunctions_hasRecipeInstance (string sClassName, string sInstanceName)
synchronized void _unRecipeFunctions_createRecipeInstance (string sClassName, string sInstanceName, string sDescription, dyn_string &exceptionInfo, string sInitial="FALSE", string sDpeValues="", string sAcDomain="", string sOperatorPrivileges="", string sExpertPrivileges="", string sAdminPrivileges="")
string _unRecipeFunctions_getDpeValueString (dyn_string dsRcpDpes, dyn_string dsRcpValues)
dyn_string _unRecipeFunctions_joinDynString (dyn_string ds1, dyn_string ds2, dyn_string &exceptionInfo)
void _unRecipeFunctions_highlightEditedValue (string sDpName)
void _unRecipeFunctions_cellEditionFinished (string sDpName, int row, string column, int iRowIndex)
void unRecipeFunctions_duplicateRecipeInstance (string sRecipeDp, dyn_string &exceptionInfo)
void unRecipeFunctions_deleteRecipeInstance (string sRecipeDp, dyn_string &exceptionInfo)
bool _unRecipeFunctions_deleteRecipeInstances (dyn_string dsRecipeDps)
public void unRecipeFunctions_deleteRecipeClass (string sRcpClassDp, dyn_string &exceptionInfo)
void unRecipeFunctions_openFaceplate (string sAlias, dyn_string &exceptionInfo)
void _unRecipeFunctions_createNewRecipeDp (string sDeviceType, string sFrontEndName, string sAppName, string &sDpName, int &iDeviceNumber)
void unRecipeFunctions_getSelectedRecipeDp (string &sSelected, dyn_string &exceptionInfo)
void _unRecipeFunctions_setTableColumnBGColor (string tableName, string columnName, string color)
void _unRecipeFunctions_setTableRowBGColor (string tableName, int rowIndex, string color)
void _unRecipeFunctions_setTableCellBGColor (string tableName, int rowIndex, string columnName, string color)
void _unRecipeFunctions_resetRecipeElementsBgColor ()
void _unRecipeFunctions_setInvalidRows (dyn_string rows, string sTableName="RecipeElements")
string _unRecipeFunctions_adjustStringToSize (shape hiddenShape, string aString, int width)
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_printDeviceList (dyn_string dsDeviceDps, string sMessage)
bool unRecipeFunctions_dpMultiSet (dyn_string dsDpNames, string sAppendStr, anytype value, dyn_string &exceptionInfo)
void _unRecipeFunctions_normalizeDp (string &sDpName)
void unRecipeFunctions_exportMultipleRecipes (dyn_string dsRcpInstList)

Detailed Description

UNICOS Copyright (C) CERN 2014 All rights reserved


Function Documentation

void _unRecipeFunctions_formatValues ( dyn_string  dpNames,
dyn_string  values,
dyn_anytype &  formattedValues,
dyn_string &  exceptionInfo 
)

Gets the formatted values of a set of DPEs.

Parameters:
dpNames - [IN] List of dp names in the UNICOS format.
values - [IN] List of values for the specified dpNames.
formattedValues - [OUT] Formatted values.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getInstanceRange(), _unRecipeFunctions_getOnlineValueDpes(), and _unRecipeFunctions_getRangeElementFromPVSSDPE().

Referenced by _unRecipeFunctions_cellEditionFinished(), _unRecipeFunctions_highlightEditedValue(), _unRecipeFunctions_saveRecipeValues(), SOFT_FE_UnRcpInstance_setConfig(), unRecipeDbFunctions_getRecipeInstanceDbValues(), unRecipeFunctions_activateRecipe(), unRecipeFunctions_getOnlineValues(), and unRecipeFunctions_loadRecipeInstanceData().

void unRecipeFunctions_displayOnlineValues ( string  sRecipeDpName,
dyn_string &  exceptionInfo 
)

Show the online values in the recipe instance panel for the specified recipe instance.

Parameters:
sRecipeDpName - [IN] String containing the recipe instance DP name.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_checkRecipeValues(), _unRecipeFunctions_editRecipeValuesAndShowDifferences(), _unRecipeFunctions_normalizeDp(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_getOnlineValues().

void _unRecipeFunctions_editRecipeValuesAndShowDifferences ( dyn_anytype  daValues,
dyn_string &  exceptionInfo 
)

Edit the values of the recipe displayed in the table and highlight the values that are different.

Parameters:
daValues - [IN] Recipe values.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getRowStylesForValueComparison(), _unRecipeFunctions_setTableColumnBGColor(), and _unRecipeFunctions_writeInRecipeLog().

Referenced by unRecipeFunctions_displayDbValues(), and unRecipeFunctions_displayOnlineValues().

bool _unRecipeFunctions_getRowStylesForValueComparison ( dyn_anytype  daValues1,
dyn_anytype  daValues2,
dyn_int &  diRowStyleIndex,
dyn_int &  diRowStyles,
dyn_int &  diDiffRowIndex 
)

Compares the value lists daValues1 and daValues2 and set:

  • Row indexes (diRowStyleIndex).
  • Row styles (diRowStyles): normal (0) if the values are the same, bold (1) if the values are different.
  • Index of rows with different values (diDiffRowIndex).
    Parameters:
    daValues1 - [IN] First list of values to compare.
    daValues2 - [IN] Second list of values to compare.
    diRowStyleIndex - [OUT] Row index for the styles.
    diRowStyles - [OUT] Styles for the table rows.
    diDiffRowIndex - [OUT] Index of the rows with different values.
    Returns:
    FALSE if the lenght of the lists is different, otherwise TRUE.

Referenced by _unRecipeFunctions_editRecipeValuesAndShowDifferences(), and unRecipeFunctions_compareOnlineValues().

void unRecipeFunctions_getOnlineValues ( dyn_string  dsDpNames,
dyn_anytype &  values,
dyn_string &  exceptionInfo 
)

Get the online values of a recipe instance.

Parameters:
dsDpNames - [IN] DP Names of the elements which online values are required.
values - [OUT] Online formatted values corresponding to the recipe class DPEs.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_formatValues(), and _unRecipeFunctions_getOnlineValueDpes().

Referenced by _unRecipeFunctions_setOnlineValuesForNewDpes(), unRecipeFunctions_adoptOnlineValues(), unRecipeFunctions_compareOnlineValues(), and unRecipeFunctions_displayOnlineValues().

string unRecipeFunctions_getDeviceRange ( string  sDpName,
dyn_string &  exceptionInfo 
)

Get the range of the specified DP.

Parameters:
sDpName - [IN] The DP which range is required.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
String containing the valid range for the specified DP (format: [min, max]).

References _unRecipeFunctions_getInstanceRange(), and _unRecipeFunctions_getRangeElementFromPVSSDPE().

Referenced by unRecipeFunctions_checkRecipeValue(), unRecipeFunctions_exportMultipleRecipes(), and unRecipeFunctions_loadRecipeInstanceData().

string unRecipeFunctions_getDpeUnit ( string  sDpName,
dyn_string &  exceptionInfo 
)

Get the measurement unit of a DP.

Parameters:
sDpName - [IN] The datapoint name.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
String containing the measurement unit of the specified DP.

References _unRecipeFunctions_getRangeElementFromPVSSDPE().

Referenced by unRecipeFunctions_exportMultipleRecipes(), and unRecipeFunctions_loadRecipeInstanceData().

void _unRecipeFunctions_getTypeMapping ( string  sRecipeType,
mapping &  map,
dyn_string &  exceptionInfo 
)

Get the DPEs associated to each device type in a recipe type.

Parameters:
sRecipeType - [IN] Recipe type name.
map - [OUT] Mapping variable where Key=Device type name, Value=List containing the DPEs included in the recipe type for the specified key (device type).
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by unRecipeFunctions_addRecipeClassDevices().

void _unRecipeFunctions_saveRecipeValues ( dyn_dyn_mixed  recipeObject,
dyn_anytype &  values,
dyn_string &  exceptionInfo 
)

Save the recipe values.

Parameters:
recipeObject - [IN] Recipe instance data.
values - [IN/OUT] Values for the recipe elements.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_formatValues().

Referenced by unRecipeFunctions_adoptOnlineValues(), and unRecipeFunctions_saveRecipeInstance().

void _unRecipeFunctions_getRangeElementFromPVSSDPE ( string  sDpName,
string &  sElement,
dyn_string &  exceptionInfo 
)

Get the element where the range is defined for a PVSS DPE

Parameters:
sDpName - DPE name in the PVSS format (e.g. dist_1:gcs-CFP_STP_CVSF18-SF18-CPC_AnalogParameter-00001.ProcessOutput.ValRq)
sElement - Variable to store the element name that contains the range (e.g. .ProcessInput.CurValSt)
exceptionInfo - Standard exception handling variable.

Referenced by _unRecipeFunctions_formatValues(), unRecipeFunctions_getDeviceRange(), and unRecipeFunctions_getDpeUnit().

void _unRecipeFunctions_getInstanceRange ( string  sDpe,
string  sRangeElement,
string &  sRangeMin,
string &  sRangeMax,
dyn_string &  exceptionInfo 
)

Get the min. and max. values defined in a range for a DPE.

Parameters:
sDpe - [IN] Data point element for whom the range values are required.
sRangeElement - [IN] DPE where the range is defined for the 'sDpe' parameter (e.g.: ".ProcessInput.CurValSt")
sRangeMin - [OUT] Minimum value of the range definition.
sRangeMax - [OUT] Maximum value of the range definition.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by _unRecipeFunctions_formatValues(), and unRecipeFunctions_getDeviceRange().

synchronized bool _unRecipeFunctions_lockDevices ( dyn_string  dsDpNames,
dyn_string &  dsLockedDeviceDp,
dyn_string &  dsLockedDeviceAlias,
dyn_string &  exceptionInfo 
)

Try to lock the devices specified.

Parameters:
dsDpNames - [IN] DP names of the devices to lock.
dsLockedDeviceDp - [OUT] DP names of the devices that are already locked.
dsLockedDeviceAlias - [OUT] Alias of the devices that are already locked.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
TRUE if the devices were locked, otherwise FALSE.

References _unRecipeFunctions_handleDpGetSetError(), _unRecipeFunctions_unlockDevices(), and _unRecipeFunctions_writeInRecipeLog().

Referenced by _unRecipeFunctions_canActivateRecipeInPlcs(), _unRecipeFunctions_saveRecipeClassToDb(), and _unRecipeFunctions_saveRecipeInstanceToDb().

synchronized bool _unRecipeFunctions_unlockDevices ( dyn_string  dsDpNames,
dyn_string &  exceptionInfo 
)

Try to unlock the devices specified.

Parameters:
dsDpNames - [IN] DP names of the devices to unlock.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
TRUE if the devices were unlocked, otherwise FALSE.

References _unRecipeFunctions_handleDpGetSetError(), and _unRecipeFunctions_writeInRecipeLog().

Referenced by _unRecipeFunctions_finalizeSaveRecipeToDb(), _unRecipeFunctions_lockDevices(), and _unRecipeFunctions_unlockRecipeBuffers().

void _unRecipeFunctions_setRecipeInstancePanelComponentsEnabled ( bool  value  ) 

Enable/disable some graphical components of the recipe instance panel (required for the recipe activation).

Parameters:
value - [IN] The value for the enabled property of the graphical components.

Referenced by _unRecipeFunctions_resetRecipeActivation(), and unRecipeFunctions_activateRecipe().

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.

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

void _unRecipeFunctions_getDpeAddress ( string  dpe,
string  deviceType,
string &  address,
dyn_string &  exceptionInfo 
)

Get the PLC address of a DPE.

Parameters:
dpe - [IN] The Datapoint element which address will be calculated.
deviceType - [IN] The device type name.
address - [OUT] The PLC address.
exceptionInfo - [OUT] tandard exception handling variable.

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

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

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.
void _unRecipeFunctions_getS7AddressDBNumber ( string  sDpe,
string  sDeviceType,
string &  sDb,
dyn_string &  exceptionInfo 
)

Gets the DB number of a S7 address for a DPE.

Parameters:
sDpe - [IN] DPE which DB number is required.
sDeviceType - [IN] Device type name of the dpe.
sDb - [OUT] DB number of the DPE S7 address.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by _unRecipeFunctions_createRecipeHeaderDBNumber().

void _unRecipeFunctions_getS7AddressOffset ( string  sDpe,
string  sDeviceType,
string &  sOffset,
dyn_string &  exceptionInfo 
)

Gets the offset of an S7 address where a DPE is located.

Parameters:
sDpe - [IN] DPE which offset is required.
sDeviceType - [IN] Device type name of the dpe.
sOffset - [OUT] Offset of the DPE S7 address.
exceptionInfo - [OUT] Standard exception handling variable.
void _unRecipeFunctions_getElementsBySystem ( dyn_string  elements,
dyn_anytype  values,
mapping &  systemDpes,
dyn_string &  exceptionInfo 
)

Gets the recipe elements according to the distributed system.

Parameters:
elements - [IN] Recipe data point elements.
values - [IN] Recipe values.
systemDpes - [OUT] Map containing the recipe elements and values for each distributed system.
exceptionInfo - [OUT] Standard exception handling variable.
void _unRecipeFunctions_getOnlineValueDpes ( dyn_string  dpNames,
dyn_string &  outputDpes,
dyn_string &  exceptionInfo 
)

Get the DPEs that contains the online values (ProcessInput) for the specified DPEs (ProcessOutput)

Parameters:
dpNames - [IN] List of DPEs which online value DPEs are required.
outputDpes - [OUT] List of online value DPEs.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by _unRecipeFunctions_checkRecipeOnlineValues(), _unRecipeFunctions_formatValues(), _unRecipeFunctions_getDpeValueString(), and unRecipeFunctions_getOnlineValues().

void _unRecipeFunctions_getDefaultValueDpes ( dyn_string  dpNames,
dyn_string &  outputDpes,
dyn_string &  exceptionInfo 
)

Get the DPEs that contains the default values for the specified DPEs

Parameters:
dpNames - [IN] List of DPEs which online value DPEs are required.
outputDpes - [OUT] List of online value DPEs.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by unRecipeFunctions_saveAsDeviceDefaultValues().

bool _unRecipeFunctions_checkRecipeOnlineValues ( dyn_string  dpes,
dyn_string  values,
string &  errDpe,
dyn_string &  exceptionInfo 
)

Check if the recipe values are the same than the online values.

Parameters:
dpes - [IN] Recipe elements data points.
values - [IN] Recipe values.
errDpe - [OUT] If the recipe values are different than the online values, this variable will contain the first dpe where the values are different.
exceptionInfo - [OUT] Standard error handling variable.
Returns:
TRUE if the recipe values are the same than the online values, otherwise FALSE.

References _unRecipeFunctions_getOnlineValueDpes().

Referenced by unRecipeFunctions_checkRecipeStatus(), and unRecipeFunctions_getRecipeStatus().

void unRecipeFunctions_getRecipeStatus ( dyn_dyn_mixed  recipeObject,
string  lastActivated,
int &  status,
dyn_string &  errMsg,
dyn_string &  exceptionInfo 
)

Get the status of the recipe instance (Activated, inactive, no plc connection,...).

Parameters:
recipeObject - [IN] Recipe instance data from fwConfigDB.
lastActivated - [IN] String containing the name of the last activated recipe of the class.
status - [OUT] Recipe status.
errMsg - [OUT] Error message for the user.
exceptionInfo - [OUT] Standard error handling variable.

References _unRecipeFunctions_checkRecipeOnlineValues(), unRecipeFunctions_checkRecipeStructure(), and unRecipeFunctions_getPlcStatus().

Referenced by _unRecipeFunctions_loadPropertiesTableInfo().

int unRecipeFunctions_checkRecipeStructure ( string  sRcpName,
dyn_string  dsRcpElements,
dyn_string  dsRcpValues,
dyn_string  dsRcpTypes,
dyn_string &  exceptionInfo 
)

Check if the recipe structure is coherent:

  • The number of DPEs and the number of values is the same
  • The values match the expected data type.
    Parameters:
    sRcpName - [IN] Recipe instance name.
    dsRcpElements - [IN] DPEs of the recipe.
    dsRcpValues - [IN] Recipe values.
    dsRcpTypes - [IN] Recipe value types.
    exceptionInfo - [OUT] Standard error handling variable.
    Returns:
    The result of the recipe structure check (bad types, bad structure ...)

Referenced by unRecipeFunctions_getRecipeStatus().

bool unRecipeFunctions_checkRecipeValues ( dyn_dyn_mixed  recipeObject,
dyn_anytype &  values,
bool  bShowErrorLines,
dyn_string &  exceptionInfo 
)

Check if the recipe values are valid according to the defined ranges.

Parameters:
recipeObject - [IN] Recipe object.
values - [IN] Recipe values.
bShowErrorLines - [IN] TRUE if the values out of range must be highlighted in the table.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
TRUE if the recipe values are Ok according to the ranges, otherwise FALSE.

References _unRecipeFunctions_checkRecipeValues().

Referenced by unRecipeFunctions_saveAsInitialRecipe(), and unRecipeFunctions_saveRecipeInstance().

void unRecipeFunctions_compareOnlineValues ( dyn_string  dsRcpDpList  ) 

Compares the recipe values and online values of a list of recipes.

Parameters:
dsRcpDpList [IN] - List of recipe instance datapoints.

References _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_getRowStylesForValueComparison(), _unRecipeFunctions_normalizeDp(), _unRecipeFunctions_setTableCellBGColor(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_getOnlineValues().

public void unRecipeFunctions_adoptOnlineValues ( dyn_string  dsRcpDps  ) 

Saves the online values of the recipe elements into the recipe.

Parameters:
dsRcpDps [IN] - Datapoint names of the recipe instances.

References _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_saveRecipeValues(), _unRecipeFunctions_setTableCellBGColor(), _unRecipeFunctions_writeInRecipeLog(), unRecipeFunctions_getOnlineValues(), and unRecipeFunctions_lockRecipe().

private bool unRecipeFunctions_lockRecipe ( string  sRcpDp,
string  sAlias 
)

Locks the recipe instance specified.

Parameters:
sRcpDp [IN] - Datapoint name of the recipe instace.
sAlias [IN] - Recipe alias.
Returns:
TRUE if and only if the recipe instance was locked.

References _unRecipeFunctions_writeInRecipeLog().

Referenced by unRecipeFunctions_adoptOnlineValues().

bool _unRecipeFunctions_checkRecipeValues ( dyn_string  dsDps,
dyn_anytype  values,
bool  bShowErrorLines,
dyn_string &  exceptionInfo 
)

Internal function to check if the recipe values are valid according to the defined ranges.

Parameters:
dsDps - [IN] Datapoint elements of the recipe values.
values - [IN] Recipe values.
bShowErrorLines - [IN] TRUE if the values out of range must be highlighted in the table.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
TRUE if the recipe values are Ok according to the ranges, otherwise FALSE.

References unRecipeFunctions_checkRecipeValue().

Referenced by unRecipeFunctions_activateRecipe(), unRecipeFunctions_checkRecipeValues(), unRecipeFunctions_displayDbValues(), unRecipeFunctions_displayOnlineValues(), unRecipeFunctions_editRecipeInstance(), unRecipeFunctions_loadRecipeInstanceData(), and unRecipeFunctions_loadRecipesFromDb().

int unRecipeFunctions_checkRecipeValue ( string  sDpName,
anytype  value,
dyn_string &  exceptionInfo 
)

Check if the recipe value is valid according to the defined range.

Parameters:
sDpName - [IN] Data point name of the recipe element.
value - [IN] Value of the recipe element.
exceptionInfo - [OUT] Standard exception handling routine.
Returns:
0 if the value is in the defined range or if no range is defined, otherwise -1.

References _unRecipeFunctions_getRangeValues(), and unRecipeFunctions_getDeviceRange().

Referenced by _unRecipeFunctions_cellEditionFinished(), and _unRecipeFunctions_checkRecipeValues().

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

void unRecipeFunctions_getPlcStatus ( dyn_string  recipeElements,
bool &  bActive,
dyn_string &  statusMessage,
dyn_string &  exceptionInfo 
)

Gets the PLC status of a recipe.

Parameters:
recipeElements - [IN] List of DPEs.
bActive - [OUT] True if the PLCs are active, otherwise false.
statusMessage - [OUT] PLC status message.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by unRecipeFunctions_activateRecipe(), unRecipeFunctions_checkRecipeStatus(), and unRecipeFunctions_getRecipeStatus().

void _unRecipeFunctions_plcStatusCB ( string  sAlarmDpe,
int  iSystemIntegrityAlarmValue,
string  sEnabledDpe,
bool  bSystemIntegrityAlarmEnabled 
)

Callback function executed when the PLC status has changed. The properties table of the recipe instance will be reloaded.

Parameters:
sAlarmDpe - [IN] DP Name of the PLC alarm state.
iSystemIntegrityAlarmValue - [IN] Value of the PLC alarm state.
sEnabledDpe - [IN] DP Name of the system integrity alarm enabled.
bSystemIntegrityAlarmEnabled - [IN] Value of the system integrity alarm enabled.

References _unRecipeFunctions_loadPropertiesTableInfo().

void unRecipeFunctions_disconnectPlcStatus ( string  sRcpInstanceDp,
dyn_string &  exceptionInfo 
)

Disconnect from the PLC status of a recipe instance.

Parameters:
sRcpInstanceDp - [IN] DP Name of the recipe instance.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getRecipeObjectFromDp().

void unRecipeFunctions_connectPlcStatus ( string  sRcpInstanceDp,
dyn_string &  exceptionInfo 
)

Establish a DP connection to the PLC status of all the PLCs containing devices of the recipe instance.

Parameters:
sRcpInstanceDp - [IN] DP Name of the recipe instance.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getRecipeObjectFromDp().

int unRecipeFunctions_loadRecipeClasses ( string  sPcoAlias,
dyn_string &  exceptionInfo,
bool  bLoadFirstClass = TRUE,
string  sApplication = "*",
bool  bOnlyConnectedSystems = FALSE 
)

Load the recipe classes linked to the PCO sPcoAlias.

Parameters:
sPcoAlias - [IN] The PCO alias which recipe classes muat be loaded.
exceptionInfo - [OUT] Standard exception handling routine.
bLoadFirstClass - [IN] TRUE if the data of the first recipe class must be loaded in the panel.
sApplication - [IN] Application name for the recipe classes to load.
bOnlyConnectedSystems - [IN] TRUE if only the devices of the connected systems must be obtained.
Returns:
The number of recipe classes added.

References _unRecipeFunctions_loadRecipeClassesInComboBox(), _unRecipeFunctions_loadRecipeClassesInTable(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_getRecipeClasses().

Referenced by unRecipeFunctions_deleteRecipeClass(), unRecipeFunctions_deviceUpdatedRcpClassCB(), and unRecipeFunctions_selectPcoRecipes().

int _unRecipeFunctions_loadRecipeClassesInTable ( dyn_string  rcpClassNames,
dyn_string  rcpClassDps,
bool  bLoadFirstClass = TRUE 
)

Load the recipe class list in a table.

Parameters:
rcpClassNames - [IN] List containing the recipe class names.
rcpClassDps - [IN] List containing the recipe class datapoints.
bLoadFirstClass - [IN] TRUE if the data of the first recipe class must be loaded in the panel.
Returns:
The number of recipe classes added.

References unRecipeFunctions_clearRecipeClassData(), and unRecipeFunctions_selectRecipeClass().

Referenced by unRecipeFunctions_loadRecipeClasses().

int _unRecipeFunctions_loadRecipeClassesInComboBox ( dyn_string  rcpClassNames  ) 

Load the recipe class list in a combo box.

Parameters:
rcpClassNames - [IN] List containing the recipe class names.
Returns:
The number of recipe classes added.

Referenced by unRecipeFunctions_loadRecipeClasses().

void unRecipeFunctions_clearRecipeClassData (  ) 

Clear all the data from the recipe class panel.

Referenced by _unRecipeFunctions_loadRecipeClassesInTable().

void _unRecipeFunctions_createPredefinedRecipeInstance ( string  sClassName,
string  sAppName,
dyn_string &  exceptionInfo 
)

Create a predefined recipe instance to store the default privileges.

Parameters:
sClassName - [IN] Recipe class name.
sAppName - [IN] Application name.
exceptionInfo - [OUT] Standar exception handling variable.

References _unRecipeFunctions_createNewRecipeDp(), _unRecipeFunctions_getDeviceDefaultPrivileges(), and unRecipeFunctions_createRecipeFrontEnd().

Referenced by SOFT_FE_UnRcpClass_setConfig().

private bool _unRecipeFunctions_deletePredefinedRecipeInstance ( string  sClassName  ) 

Delete the predefined recipe instance of a recipe class.

Parameters:
sClassName - [IN] Recipe class name.
Returns:
TRUE if the predefined recipe instance was deleted correctly, otherwise FALSE.

Referenced by unRecipeFunctions_deleteRecipeClass().

_unRecipeFunctions_getDeviceDefaultPrivileges ( string  sDpType,
string &  sOperatorPrivileges,
string &  sExpertPrivileges,
string &  sAdminPrivileges,
dyn_string  exceptionInfo 
)

Get the default privileges of a recipe device (recipe class or recipe instance).

Parameters:
sDpType - [IN] Datapoint type which default privileges are required.
sOperatorPrivileges - [OUT] Default privileges for the operator.
sExpertPrivileges - [OUT] Default privileges for the expert.
sAdminPrivileges - [OUT] Default privileges for the administrator.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by _unRecipeFunctions_createPredefinedRecipeInstance(), and _unRecipeFunctions_createRecipeClass().

void unRecipeFunctions_updateRecipeClassPrivileges ( string  sDpName  ) 

Update the recipe class privileges.

Parameters:
sDpName - [IN] Recipe class DP name.

References _unRecipeFunctions_addPrivileges(), _unRecipeFunctions_getDefaultClassPrivileges(), and _unRecipeFunctions_removeObsoletePrivileges().

Referenced by _unRecipeFunctions_createRecipeClass(), and SOFT_FE_UnRcpClass_setConfig().

void unRecipeFunctions_updateRecipeInstancePrivileges ( string  sDpName,
string  sClassName 
)

Update the recipe instances privileges.

Parameters:
sDpName - [IN] DP name of the recipe instance.
sClassName - [IN] Recipe class name.

References _unRecipeFunctions_addPrivileges(), _unRecipeFunctions_normalizeDp(), and _unRecipeFunctions_removeObsoletePrivileges().

Referenced by _unRecipeFunctions_createRecipeInstance(), and SOFT_FE_UnRcpInstance_setConfig().

void _unRecipeFunctions_addPrivileges ( dyn_string  dsDefaultPrivileges,
dyn_string &  dsDevicePrivileges1,
dyn_string  dsDevicePrivileges2,
dyn_string  dsDevicePrivileges3 
)

Auxiliary function to add the default privileges to the privileges list. If none of the dyn_strings (dsDevicePrivileges1, dsDevicePrivileges2, dsDevicePrivileges3) contains the privileges included in dsDefaultPrivileges, the privilege will be added to dsDevicePrivileges1. Otherwise (the privilege is included in any dyn_string) no actions will be done.

Parameters:
dsDefaultPrivileges - [IN] The list of privileges to add.
dsDevicePrivileges1 - [OUT] The list where add the privileges if they don't exist in any dyn_string.
dsDevicePrivileges2 - [IN] Device privileges list.
dsDevicePrivileges3 - [IN] Device privileges list.

Referenced by unRecipeFunctions_updateRecipeClassPrivileges(), and unRecipeFunctions_updateRecipeInstancePrivileges().

void _unRecipeFunctions_removeObsoletePrivileges ( dyn_string &  dsDevicePrivileges,
dyn_string  dsDefaultPrivileges1,
dyn_string  dsDefaultPrivileges2,
dyn_string  dsDefaultPrivileges3 
)

Auxiliary function to remove the obsolete privileges from the privileges list.

Parameters:
dsDevicePrivileges - [OUT] List where the obsolete parameters will be removed.
dsDefaultPrivileges1 - [IN] Default privileges list 1 (e.g. operator).
dsDefaultPrivileges2 - [IN] Default privileges list 2 (e.g. expert).
dsDefaultPrivileges3 - [IN] Default privileges list 3 (e.g. admin).

Referenced by unRecipeFunctions_updateRecipeClassPrivileges(), and unRecipeFunctions_updateRecipeInstancePrivileges().

void _unRecipeFunctions_getRecipeClassDeviceMapping ( dyn_mixed  rcpClassObject,
mapping &  rcpDeviceDpes 
)

Get the device mapping from a recipe class.

Parameters:
rcpClassObject - [IN] The recipe class object from the JCOP recipe class definition.
rcpDeviceDpes - [OUT] Mapping where: Key=device name, Value=list of device DPEs included in the recipe.

Referenced by unRecipeFunctions_loadRecipeClassData().

void unRecipeFunctions_loadRecipeClassData ( string  sRcpClassDp  ) 

Load the recipe class data in the recipe class panel.

Parameters:
sRcpClassDp - [IN] Datapoint name of the recipe class which data will be loaded in the panel.

References _unRecipeFunctions_getRecipeClassDeviceMapping(), _unRecipeFunctions_normalizeDp(), _unRecipeFunctions_setInvalidRows(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_getRecipeClassObject().

Referenced by unRecipeFunctions_applyRecipeClassModifications(), and unRecipeFunctions_selectRecipeClass().

bool _unRecipeFunctions_isRecipeClassDefinitionValid ( string  sClassDp,
dyn_string &  exceptionInfo 
)

Check if a recipe class definition is valid.

Parameters:
sClassDp - [IN] Datapoint name of the recipe class.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_normalizeDp(), and unRecipeFunctions_getRecipeClassObject().

Referenced by _unRecipeFunctions_createRecipeInstance(), _unRecipeFunctions_getRecipeClassList(), and unRecipeFunctions_saveRecipeToDb().

void unRecipeFunctions_selectRecipeClass ( string  sRcpClassDp,
dyn_string &  exceptionInfo,
bool  bForceReload = FALSE 
)

Select the specified recipe class in the recipe class panel.

Parameters:
sRcpClassDp - [IN] Datapoint name of the recipe class.
exceptionInfo - [OUT] Standard exception handling variable.
bForceReload - [IN] Boolean value to force the reload of the recipe class data.

References _unRecipeFunctions_normalizeDp(), and unRecipeFunctions_loadRecipeClassData().

Referenced by _unRecipeFunctions_loadRecipeClassesInTable(), and unRecipeFunctions_deviceUpdatedRcpClassCB().

void _unRecipeFunctions_getRecipeClassDataFromInstance ( string  sRcpInstanceDp,
string &  sRcpClassName,
string &  sRcpClassDp,
string &  sPcoLink 
)

Get the recipe class data from a recipe instance datapoint.

Parameters:
sRcpInstanceDp - [IN] Datapoint name of the recipe instance.
sRcpClassName - [OUT] Name of the recipe class related to the recipe instance.
sRcpClassDp - [OUT] Datapoint name of the recipe class related to the recipe instance.
sPcoLink - [OUT] Device link of the recipe class.

References _unRecipeFunctions_normalizeDp(), and _unRecipeFunctions_writeInRecipeLog().

Referenced by _unRecipeFunctions_getRecipeClassData(), and unRecipeFunctions_selectRecipeInstance().

bool unRecipeFunctions_selectRecipeInstance ( string  sRcpInstanceDp,
dyn_string &  exceptionInfo 
)

Selects the specified recipe instance in the recipe instance panel.

Parameters:
sRcpInstanceDp - [IN] Datapoint of the recipe instance which will be selected.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getRecipeClassDataFromInstance(), _unRecipeFunctions_loadRecipeInstances(), unRecipeFunctions_loadRecipeInstanceData(), and unRecipeFunctions_selectPcoRecipes().

Referenced by unRecipeFunctions_deviceUpdatedRcpInstanceCB(), unRecipeFunctions_editRecipeInstance(), and unRecipeFunctions_selectPcoRecipes().

void _unRecipeFunctions_dpConnectRcpClassElementsCB ( string  sRcpClassElementsDp,
dyn_string  dsValues 
)

Callback function executed when the recipe class elements have been modified. The function will enable a warning message to indicate that the recipe must be reloaded.

References _unRecipeFunctions_enableRecipeInstanceWarning().

void _unRecipeFunctions_enableRecipeInstanceWarning ( bool  bEnable,
string  sMessage = "" 
)

Function to show/hide the recipe instance warning message.

Parameters:
bEnable - [IN] Flag to specify the visibility of the warning message.
sMessage - [IN] Message to display in the WarningText label.

Referenced by _unRecipeFunctions_dpConnectRcpClassElementsCB(), _unRecipeFunctions_dpConnectRcpValuesCB(), unRecipeFunctions_loadRecipeInstanceData(), and unRecipeFunctions_saveRecipeInstance().

void _unRecipeFunctions_dpConnectRcpValuesCB ( string  sRcpValuesDp,
dyn_string  dsValues 
)

Callback function executed when the recipe values have been modified. The function will enable a warning message to indicate that the recipe must be reloaded.

References _unRecipeFunctions_enableRecipeInstanceWarning(), and _unRecipeFunctions_getRecipeObjectFromDp().

public mapping unRecipeFunctions_getApplicationPcos ( bool  bLocalOnly = TRUE,
bool  bOnlyPcosWithRecipes = FALSE 
)

Gets a mapping where the key is the application name and the value is a dyn_string containing the PCOs in that application.

Parameters:
bLocalOnly - [IN] TRUE if and only if the local applications must be included, otherwise FALSE.
bOnlyPcosWithRecipes - [IN] TRUE if and only if the PCOs with recipes must be included, otherwise FALSE.

References _unRecipeFunctions_getFilteredDevices(), _unRecipeFunctions_mappingInsertValue(), and unRecipeFunctions_getPcosWithRecipes().

void unRecipeFunctions_selectPcoRecipes ( string  sPcoDp,
dyn_string &  exceptionInfo,
bool  bSelectFirstInstance = true,
string  sApplication = "*" 
)

Function to select the PCO recipes in the recipe instance panel.

Parameters:
sPcoDp - [IN] DP Name of the PCO.
exceptionInfo - [OUT] Standard exception handling variable.
bSelectFirstInstance - [IN] Flag to specify if the first recipe must be selected (TRUE by default).
sApplication - [IN] Application name where the PCOs must be loaded.

References _unRecipeFunctions_loadPcosWithRecipes(), _unRecipeFunctions_loadRecipeInstances(), _unRecipeFunctions_normalizeDp(), unRecipeFunctions_loadRecipeClasses(), unRecipeFunctions_selectItemInComboBox(), and unRecipeFunctions_selectRecipeInstance().

Referenced by unRecipeFunctions_selectRecipeInstance().

public bool unRecipeFunctions_selectItemInComboBox ( string  sShape,
string  sSelect,
int  indexOtherwise = 1 
)

Selects an item in a combo box.

Parameters:
sShape - [IN] Combo box name.
sSelect - [IN] Item to select.
indexOtherwise - [IN] Index to select in case the selected item does not exist.

Referenced by unRecipeFunctions_selectPcoRecipes().

void unRecipeFunctions_animateSelectionProgressBar ( string  sDpName  ) 

Method used to animate the selection progress bar in the recipe instance panel.

Parameters:
sDpName - [IN] Data point name of the selected recipe instance.

Selection Progress Bar animation

References unRecipeFunctions_getSelectedRecipeDp().

public void unRecipeFunctions_getPcosWithRecipes ( dyn_string &  dsPcoNamesWithRecipes,
dyn_string &  dsPcoDpsWithRecipes,
bool  bLocalOnly = FALSE,
string  sApplication = "*",
dyn_string  dsAllPcos = makeDynString(),
dyn_string  dsAllPcoDps = makeDynString() 
)

Get the list of PCOs with recipes

Parameters:
dsPcoNamesWithRecipes - [OUT] Alias of the PCOs with recipes found.
dsPcoDpsWithRecipes - [OUT] Dp names of the PCOs with recipes found.
bLocalOnly - [IN] TRUE if and only if the PCOs on the local application must be queried, otherwise FALSE.
sApplication - [IN] Applications where to look for the PCOs with recipes.
dsAllPcos - [IN] List of PCO aliases, if not provided it will search for the PCOs in the specified applications and systems.
dsAllPcoDps - [IN] List of PCO dp names, if not provided it will search for the PCO dpnames in the specified applications and systems.

References _unRecipeFunctions_getFilteredDevices().

Referenced by _unRecipeFunctions_loadPcosWithRecipes(), and unRecipeFunctions_getApplicationPcos().

public void _unRecipeFunctions_loadPcosWithRecipes ( string  sApplication  ) 

Load the PCO List in the PcoList combo box.

Parameters:
sApplication - [IN] Application name where to load the PCOs from.

References unRecipeFunctions_getPcosWithRecipes().

Referenced by unRecipeFunctions_selectPcoRecipes().

public void _unRecipeFunctions_loadRecipeClassList ( string  sPcoLink = "*",
string  sApplication = "*" 
)

Method used to load the recipe class list associated to a PCO

Parameters:
sPcoLink Alias of the PCO which recipe classes will be loaded or "*" for all the available classes.

References unRecipeFunctions_getRecipeClasses().

void unRecipeFunctions_getPcoList ( dyn_string &  dsPcoNames,
dyn_string &  dsPcoDps,
bool  bLocalOnly = FALSE 
)

Get the list of PCO aliases.

Parameters:
dsPcoNames - [OUT] List of PCO aliases.
dsPcoDps - [OUT] List of PCO Dps.
bLocalOnly - [IN] TRUE if only the devices from the local system must be returned, otherwise FALSE.

References _unRecipeFunctions_getFilteredDevices().

public void _unRecipeFunctions_getFilteredDevices ( dyn_string  dsSelectedDevType,
dyn_string &  dsRetDpName,
dyn_string &  dsRetAlias,
dyn_string &  dsRetAppl,
bool  bLocalOnly = FALSE,
dyn_string  dsSelectedApplication = makeDynString("*") 
)

Get the list of devices filtering the applications and the device types specified.

Parameters:
dsSelectedDevType - [IN] List of selected device types.
dsRetDpName - [OUT] List of DP Names found.
dsRetAlias - [OUT] List of devices aliases found.
dsRetAppl - [OUT] List of applications of the found devices.
bLocalOnly - [IN] TRUE if only the devices from the local system must be returned, otherwise FALSE.
dsSelectedApplication - [IN] List of applications where to look for the devices.

Referenced by _unRecipeFunctions_getRecipeInstancesOfClass(), unRecipeFunctions_addRecipeClassDevices(), unRecipeFunctions_getApplicationPcos(), unRecipeFunctions_getPcoList(), unRecipeFunctions_getPcosWithRecipes(), and unRecipeFunctions_getRecipeClasses().

void unRecipeFunctions_getRecipeClasses ( dyn_string &  dsRecipeClassNames,
dyn_string &  dsRecipeClassDps,
string  sPcoLink = "*",
bool  bLocalOnly = FALSE,
bool  bAddSystemName = FALSE,
string  sApplication = "*",
bool  bOnlyConnectedSystems = FALSE 
)

Get the list of recipe class names and recipe class DPs linked to a PCO.

Parameters:
dsRecipeClassNames - [OUT] List of recipe class names.
dsRecipeClassDps - [OUT] List of recipe class DPs.
sPcoLink - [IN] PCO alias which recipe classes are requested.
bLocalOnly - [IN] TRUE if only the recipe classes of the local system must be loaded, otherwise FALSE.
bAddSystemName - [IN] TRUE if the system name must be added to the recipe class name
bOnlyConnectedSystems - [IN] TRUE if only the devices of the connected systems must be obtained.
sApplication - [IN] Name of the application for which the recipe classes are required.

References _unRecipeFunctions_getFilteredDevices(), _unRecipeFunctions_sortAscDynLists(), and unRecipeFunctions_isRemoteSystemConnected().

Referenced by _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb(), _unRecipeFunctions_getInitialPcoRecipes(), _unRecipeFunctions_getLastActivatedPcoRecipes(), _unRecipeFunctions_loadRecipeClassList(), unRecipeFunctions_deviceUpdatedRcpClassCB(), and unRecipeFunctions_loadRecipeClasses().

void _unRecipeFunctions_getVisibleApplicationsList ( dyn_string &  dsApplications  ) 

Get the list of visible applications.

Parameters:
dsApplications - [OUT] List of visible applications.
synchronized void _unRecipeFunctions_loadRecipeInstances ( string  sRecipeClass = ""  ) 

Load the recipe instances in the table (recipe instances panel).

Parameters:
sRecipeClass - [IN] Recipe class name which instances will be loaded.

References _unRecipeFunctions_getRecipeInstancesOfClass(), and _unRecipeFunctions_sortAscDynLists().

Referenced by unRecipeFunctions_deleteRecipeInstance(), unRecipeFunctions_deviceUpdatedRcpInstanceCB(), unRecipeFunctions_duplicateRecipeInstance(), unRecipeFunctions_selectPcoRecipes(), and unRecipeFunctions_selectRecipeInstance().

void _unRecipeFunctions_getRecipeInstancesOfClass ( string  sClassName,
dyn_string &  dsRcpInstanceNames,
dyn_string &  dsRcpInstanceDps 
)

Get all the recipe instances of a class.

Parameters:
sClassName - [IN] Recipe class name.
dsRcpInstanceNames - [OUT] Recipe instance names.
dsRcpInstanceDps - [OUT] Recipe instance datapoint elements.

References _unRecipeFunctions_getFilteredDevices().

Referenced by _unRecipeFunctions_getSaveOperationIds(), _unRecipeFunctions_loadRecipeInstances(), _unRecipeFunctions_saveRecipeClassAndInstancesToDb(), unRecipeFunctions_deviceUpdatedRcpInstanceCB(), unRecipeFunctions_editRecipeClassPrivileges(), and unRecipeFunctions_loadRecipeClassInstancesFromDb().

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

synchronized void _unRecipeFunctions_loadPropertiesTableInfo ( string  sDpName = "",
dyn_dyn_mixed  recipeObject = makeDynMixed() 
)
synchronized void unRecipeFunctions_setRecipeStatusInfo ( int  status,
dyn_string  message = makeDynString() 
)

Set the recipe status in the RecipeProperties table.

Parameters:
status - [IN] New status of the recipe instance.
message - [IN] Contains a message to display when there is no PLC connection.

Referenced by _unRecipeFunctions_cancelRecipeActivation(), _unRecipeFunctions_loadPropertiesTableInfo(), _unRecipeFunctions_recipeActivationStatusError(), _unRecipeFunctions_recipeActivationWrongOnlineValues(), _unRecipeFunctions_resetRecipeActivation(), and unRecipeFunctions_activateRecipe().

synchronized void unRecipeFunctions_loadRecipeInstanceData (  ) 
synchronized void _unRecipeFunctions_loadHistoryTableInfo ( string  sDpName = "",
dyn_dyn_mixed  recipeObject = makeDynMixed() 
)

Load the recipe instance data in the history table.

Parameters:
sDpName - [IN] Datapoint element of the recipe instance.
recipeObject - [IN] Contents of the recipe instance from fwConfigDB.

References _unRecipeFunctions_getRecipeObjectFromDp(), and unRecipeFunctions_getSelectedRecipeDp().

Referenced by _unRecipeFunctions_recipeActivationUpdateMetaInfo(), unRecipeFunctions_loadRecipeInstanceData(), unRecipeFunctions_saveRecipeInstance(), and unRecipeFunctions_saveRecipeToDb().

synchronized void _unRecipeFunctions_clearInstanceTables (  ) 

Remove the recipe instance data from the panel.

Referenced by unRecipeFunctions_deleteRecipeInstance(), and unRecipeFunctions_deviceUpdatedRcpInstanceCB().

void unRecipeFunctions_editRecipeInstance ( string  sRecipeDp,
dyn_string &  exceptionInfo,
int  row = -1,
string  column = "" 
)

Put the recipe instance in Edit Mode so the recipe values can be modified.

Parameters:
sRecipeDp - [IN] DataPoint name of the recipe instance.
exceptionInfo - [OUT] Standard exception handling variable.
row - [IN] Optional variable. It indicates the row number that is being edited.
column - [IN] Optional variable. It indicates the name of the column that is being edited.

References _unRecipeFunctions_checkRecipeValues(), _unRecipeFunctions_copyRecipeInstanceToHiddenTable(), _unRecipeFunctions_setTableColumnBGColor(), _unRecipeFunctions_writeInRecipeLog(), unRecipeFunctions_getSelectedRecipeDp(), and unRecipeFunctions_selectRecipeInstance().

void _unRecipeFunctions_copyRecipeInstanceToHiddenTable (  ) 
bool unRecipeFunctions_saveRecipeInstance ( string  sRecipeDp,
dyn_string &  exceptionInfo,
bool  bShowConfirmationMessage = TRUE 
)

Save the values of the recipe instance.

Parameters:
sRecipeDp - [IN] The DP of the recipe instance.
exceptionInfo - [OUT] Standard exception handling variable.
bShowConfirmationMessage - [IN] Flag to specify if the confirmation message must be displayed (TRUE by default)
Returns:
TRUE if the recipe values were saved correctly, otherwise FALSE.

References _unRecipeFunctions_areListsEqual(), _unRecipeFunctions_copyRecipeInstanceToHiddenTable(), _unRecipeFunctions_enableRecipeInstanceWarning(), _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_loadHistoryTableInfo(), _unRecipeFunctions_loadPropertiesTableInfo(), _unRecipeFunctions_resetRecipeElementsBgColor(), _unRecipeFunctions_saveRecipeValues(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_checkRecipeValues().

Referenced by unRecipeFunctions_deviceUpdatedRcpInstanceCB(), and unRecipeFunctions_saveRecipeToDb().

void unRecipeFunctions_saveAsDeviceDefaultValues ( string  sRecipeDp,
dyn_string &  exceptionInfo 
)

Save the recipe values as default values in the devices.

Parameters:
sRecipeDp - [IN] The DP of the recipe instance.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getDefaultValueDpes(), and _unRecipeFunctions_getRecipeObjectFromDp().

void unRecipeFunctions_saveAsInitialRecipe ( string  sRecipeDp,
dyn_string &  exceptionInfo 
)

Save the values of the selected recipe in the initial recipe of the class.

Parameters:
sRecipeDp - [IN] The DP of the recipe instance which values must be save in the initial recipe.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_copyRecipeInstanceToHiddenTable(), _unRecipeFunctions_getInitialRecipeOfClass(), _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_checkRecipeValues().

int _unRecipeFunctions_getInitialRecipeOfClass ( string  sClassDp,
string &  sInitialRcpDp,
dyn_string &  exceptionInfo 
)

Get the DP name of the initial recipe of the class 'sClassName'.

Parameters:
sClassDp - [IN] Datapoint name of the recipe class which initial recipe is required.
sInitialRcpDp - [OUT] DP Name of the initial recipe of the specified class.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
0 if the initial recipe was found, otherwise returns a negative value

References _unRecipeFunctions_normalizeDp().

Referenced by _unRecipeFunctions_getInitialPcoRecipes(), unRecipeFunctions_deleteRecipeClass(), and unRecipeFunctions_saveAsInitialRecipe().

void _unRecipeFunctions_getPcoChildren ( string  sPcoDpName,
dyn_string &  children,
dyn_string &  exceptionInfo 
)

Get all the PCOs that are children of the sPco device (recursive method, get all the PCOs in the hierarchy).

Parameters:
sPcoDpName - [IN] Name of the PCO which children are requested.
children - [OUT] Contains the alias of all the PCO children of the sPcoDp device.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_normalizeDp(), and cpcGenericObject_getLinkedObjects().

Referenced by unRecipeFunctions_getInitialRecipesFromPcoHierarchy(), and unRecipeFunctions_getLastActivatedRecipesFromPcoHierarchy().

void unRecipeFunctions_activateInitialRecipesFromPcoHierarchy ( string  sPcoDp,
dyn_string &  exceptionInfo 
)

Open a new window to display the initial recipes of a PCO.

Parameters:
sPcoDp - [IN] DataPoint name of the PCO which initial recipes will be displayed.
exceptionInfo - [OUT] Standard exception handling variable.
int _unRecipeFunctions_getLastActivatedRecipeDp ( string  sClassDp,
string &  sLastActivatedRcpDp,
dyn_string &  exceptionInfo 
)

Get the DP name of the last activated recipe of the class 'sClassName'.

Parameters:
sClassDp - [IN] Datapoint name of the recipe class which last activated recipe is required.
sLastActivatedRcpDp - [OUT] DP Name of the last activated recipe of the specified class.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
0 if the last activated recipe was found, otherwise returns a negative value

References _unRecipeFunctions_normalizeDp().

Referenced by _unRecipeFunctions_getLastActivatedPcoRecipes().

void unRecipeFunctions_activateLastActivatedRecipesFromPcoHierarchy ( string  sPcoDp,
dyn_string &  exceptionInfo 
)

Open a new window to display the last activated recipes of a PCO.

Parameters:
sPcoDp - [IN] DataPoint name of the PCO which initial recipes will be displayed.
exceptionInfo - [OUT] Standard exception handling variable.
void _unRecipeFunctions_getLastActivatedPcoRecipes ( string  sPcoDp,
dyn_string &  recipeList,
dyn_string &  exceptionInfo 
)

Get the last activated recipe of each recipe class for the current PCO.

Parameters:
sPcoDp - [IN] The PCO datapoint element which last activated recipes are required.
recipeList - [OUT] Datapoint elements of the last activated recipes of the PCO.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getLastActivatedRecipeDp(), _unRecipeFunctions_normalizeDp(), and unRecipeFunctions_getRecipeClasses().

Referenced by unRecipeFunctions_getLastActivatedRecipesFromPcoHierarchy().

void _unRecipeFunctions_getInitialPcoRecipes ( string  sPcoDp,
dyn_string &  recipeList,
dyn_string &  exceptionInfo 
)

Get the initial recipe of each recipe class for the current PCO.

Parameters:
sPcoDp - [IN] The PCO datapoint element which initial recipes are required.
recipeList - [OUT] Datapoint elements of the initial recipes of the PCO.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getInitialRecipeOfClass(), and unRecipeFunctions_getRecipeClasses().

Referenced by unRecipeFunctions_getInitialRecipesFromPcoHierarchy().

void unRecipeFunctions_getLastActivatedRecipesFromPcoHierarchy ( string  sPcoDp,
dyn_string &  recipeList,
dyn_string &  exceptionInfo 
)

Get the last activated recipe of each recipe class for the PCO hierarchy.

Parameters:
sPcoDp - [IN] The PCO datapoint element which last activated recipes are required.
recipeList - [OUT] Datapoint elements of the last activated recipes of the PCO hierarchy.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getLastActivatedPcoRecipes(), and _unRecipeFunctions_getPcoChildren().

void unRecipeFunctions_getInitialRecipesFromPcoHierarchy ( string  sPcoDp,
dyn_string &  recipeList,
dyn_string &  exceptionInfo 
)

Get the initial recipe of each recipe class for the PCO hierarchy.

Parameters:
sPcoDp - [IN] The PCO datapoint element which initial recipes are required.
recipeList - [OUT] Datapoint elements of the initial recipes of the PCO hierarchy.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_getInitialPcoRecipes(), and _unRecipeFunctions_getPcoChildren().

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_editRecipeValuesAndShowDifferences(), _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb(), _unRecipeFunctions_getExistingInstanceOrCreateNewInstanceFromDb(), _unRecipeFunctions_getRecipeClassDataFromInstance(), _unRecipeFunctions_getRecipeClassList(), _unRecipeFunctions_lockDevices(), _unRecipeFunctions_printDbSaveMessage(), _unRecipeFunctions_printDeviceList(), _unRecipeFunctions_recipeActivationStatusCrcOk(), _unRecipeFunctions_recipeActivationStatusDone(), _unRecipeFunctions_recipeActivationStatusError(), _unRecipeFunctions_recipeActivationStatusNewIdReceived(), _unRecipeFunctions_recipeActivationWrongOnlineValues(), _unRecipeFunctions_resetRecipeActivation(), _unRecipeFunctions_saveRecipeClassesToDb(), _unRecipeFunctions_saveRecipeClassToDb(), _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_exportMultipleRecipes(), unRecipeFunctions_getRecipeInstancesFromDatabase(), unRecipeFunctions_loadRecipeClassData(), unRecipeFunctions_loadRecipeClasses(), unRecipeFunctions_loadRecipeInstanceData(), unRecipeFunctions_loadRecipesFromDb(), unRecipeFunctions_lockRecipe(), unRecipeFunctions_removeSelectedRecipeClassDevices(), unRecipeFunctions_saveAsInitialRecipe(), unRecipeFunctions_saveRecipeInstance(), and unRecipeFunctions_saveRecipeToDb().

void unRecipeFunctions_cancelEditRecipeInstance ( string  sRecipeDp  ) 

Cancel the recipe instance edition.

Parameters:
sRecipeDp - [IN] DP Name of the recipe instance that was being edited.

References _unRecipeFunctions_resetRecipeElementsBgColor(), and unRecipeFunctions_loadRecipeInstanceData().

void _unRecipeFunctions_getRecipeObjectFromDp ( string  sRecipeDp,
dyn_dyn_mixed &  recipeObject,
dyn_string &  exceptionInfo 
)
void unRecipeFunctions_getRecipeClassObject ( string  sRcpClassDp,
dyn_mixed &  recipeClassInfo,
dyn_string &  exceptionInfo 
)

Get the recipe class object from the JCOP library.

Parameters:
sRcpClassDp - [IN] Recipe class name.
recipeClassInfo - [OUT] Recipe class object returned from the JCOP library.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_normalizeDp().

Referenced by _unRecipeFunctions_createRecipeInstance(), _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb(), _unRecipeFunctions_isRecipeClassDefinitionValid(), _unRecipeFunctions_loadPropertiesTableInfo(), SOFT_FE_UnRcpClass_ExportConfig(), SOFT_FE_UnRcpInstance_setConfig(), unRecipeFunctions_applyRecipeClassModifications(), unRecipeFunctions_checkRecipeStatus(), and unRecipeFunctions_loadRecipeClassData().

void unRecipeFunctions_addRecipeClassDevices ( string  sRcpClassDp  ) 

Add new devices to the recipe class that is being displayed in the recipe class panel.

Parameters:
sRcpClassDp - [IN] Datapoint element of the recipe class that will be modified.

References _unRecipeFunctions_getFilteredDevices(), _unRecipeFunctions_getTypeMapping(), and _unRecipeFunctions_writeInRecipeLog().

void unRecipeFunctions_applyRecipeClassModifications ( string  sRcpClassDp  ) 

Apply the modifications done in the recipe class elements.

Parameters:
sRcpClassDp - [IN] DataPoint name of the recipe class where the changes must be applied.

References _unRecipeFunctions_setOnlineValuesForNewDpes(), _unRecipeFunctions_writeInRecipeLog(), unRecipeFunctions_getRecipeClassObject(), and unRecipeFunctions_loadRecipeClassData().

Referenced by unRecipeFunctions_deviceUpdatedRcpClassCB().

void _unRecipeFunctions_setOnlineValuesForNewDpes ( dyn_string  dsOldDpes,
dyn_string  dsNewDpes,
dyn_string  dsRcpInstNames 
)

When a recipe class is modified to include new DPEs the method sets the online values in all the recipe instances for the new DPEs.

Parameters:
dsOldDpes - [IN] Old DPEs of the recipe class.
dsNewDpes - [IN] New DPEs of the recipe class.
dsRcpInstNames - [IN] Recipe instance names.

References _unRecipeFunctions_dynDiff(), _unRecipeFunctions_getDynPos(), and unRecipeFunctions_getOnlineValues().

Referenced by unRecipeFunctions_applyRecipeClassModifications().

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

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

void unRecipeFunctions_removeSelectedRecipeClassDevices ( string  sRcpClassDp  ) 

Remove the selected recipe class devices from the table.

Parameters:
sRcpClassDp - [IN] Datapoint element of the recipe class to be modified.

References _unRecipeFunctions_writeInRecipeLog().

public void _unRecipeFunctions_createRecipeClass ( string  sClassName,
string  sDescription,
string  sPcoLink,
string &  sRcpClassDp,
dyn_string &  exceptionInfo,
dyn_string  dsDeviceList = makeDynString(),
string  sAcDomain = "",
string  sOperatorPrivileges = "",
string  sExpertPrivileges = "",
string  sAdminPrivileges = "" 
)

Create the recipe class device.

Parameters:
sClassName - [IN] Recipe class name.
sDescription - [IN] Recipe class description.
sPcoLink - [IN] Alias of the PCO where the recipe class will be linked.
sRcpClassDp - [OUT] Datapoint of the new recipe class.
exceptionInfo - [OUT] Standard exception handling variable.
dsDeviceList - [IN] List of recipe elements (optional).
sAcDomain - [IN] Access control domain (optional).
sOperatorPrivileges - [IN] Operator privileges (optional).
sExpertPrivileges - [IN] Expert privileges (optional).
sAdminPrivileges - [IN] Admin privileges (optional).

References _unRecipeFunctions_createNewRecipeDp(), _unRecipeFunctions_doesRecipeClassExist(), _unRecipeFunctions_getDeviceDefaultPrivileges(), _unRecipeFunctions_writeInRecipeLog(), unRecipeFunctions_createRecipeFrontEnd(), and unRecipeFunctions_updateRecipeClassPrivileges().

Referenced by _unRecipeFunctions_createRecipeClassFromDbInternal().

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

bool _unRecipeFunctions_doesRecipeClassExist ( string  sClassName  ) 

Function used to know if a recipe class already exists in any system.

Parameters:
sClassName - [IN] Recipe class name.
Returns:
TRUE if the recipe class already exists, otherwise FALSE.

References _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_isRemoteSystemConnected().

Referenced by _unRecipeFunctions_createRecipeClass().

unRecipeFunctions_deviceUpdatedRcpClassCB ( string  sCommandDp,
int  iCommand,
string  sSystemNameDp,
string  sSystemName 
)

Callback function from the recipe class panel. The function is called when the devices list has been updated.

Parameters:
sCommandDp - [IN] DP Name of the command over the list of devices.
iCommand - [IN] Command value over the list of devices.
sSystemNameDp - [IN] DP Name of the system.
sSystemName - [IN] System name.

References _unRecipeFunctions_areListsEqual(), unRecipeFunctions_applyRecipeClassModifications(), unRecipeFunctions_getRecipeClasses(), unRecipeFunctions_loadRecipeClasses(), and unRecipeFunctions_selectRecipeClass().

unRecipeFunctions_deviceUpdatedRcpInstanceCB ( string  sCommandDp,
int  iCommand,
string  sSystemNameDp,
string  sSystemName 
)

Callback function from the recipe instance panel. The function is called when the devices list has been updated.

Parameters:
sCommandDp - [IN] DP Name of the command over the list of devices.
iCommand - [IN] Command value over the list of devices.
sSystemNameDp - [IN] DP Name of the system.
sSystemName - [IN] System name.

References _unRecipeFunctions_areListsEqual(), _unRecipeFunctions_clearInstanceTables(), _unRecipeFunctions_getRecipeInstancesOfClass(), _unRecipeFunctions_loadRecipeInstances(), _unRecipeFunctions_writeInRecipeLog(), unRecipeFunctions_saveRecipeInstance(), and unRecipeFunctions_selectRecipeInstance().

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

void unRecipeFunctions_editRecipeClassPrivileges ( string  sRcpClassDp  ) 

Open a new window to edit the recipe class privileges and parameters.

Parameters:
sRcpClassDp - [IN] The recipe class DP.

References _unRecipeFunctions_getDevicePrivileges(), _unRecipeFunctions_getRecipeInstancesOfClass(), _unRecipeFunctions_setDevicePrivileges(), and _unRecipeFunctions_writeInRecipeLog().

void _unRecipeFunctions_getDevicePrivileges ( string  sDpName,
string &  sAcDomain,
string &  sOperatorAction,
string &  sExpertAction,
string &  sAdminAction 
)

Auxiliary function to get the device privileges.

Parameters:
sDpName - [IN] Datapoint name of the device.
sAcDomain - [OUT] Access control domain for the device.
sOperatorAction - [OUT] Privileged actions for the operator.
sExpertAction - [OUT] Privileged actions for the expert.
sAdminAction - [OUT] Privileged actions for the admin.

References _unRecipeFunctions_normalizeDp().

Referenced by unRecipeFunctions_editRecipeClassPrivileges().

void _unRecipeFunctions_setDevicePrivileges ( string  sDpName,
string  sAcDomain,
string  sOperatorAction,
string  sExpertAction,
string  sAdminAction,
dyn_string &  exceptionInfo 
)

Auxiliary function to set the device privileges.

Parameters:
sDpName - [IN] Datapoint name of the device.
sAcDomain - [IN] Access control domain for the device.
sOperatorAction - [IN] Privileged actions for the operator.
sExpertAction - [IN] Privileged actions for the expert.
sAdminAction - [IN] Privileged actions for the admin.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_normalizeDp().

Referenced by unRecipeFunctions_editRecipeClassPrivileges().

void _unRecipeFunctions_getDefaultClassPrivileges ( string  sRoleType,
dyn_string &  dsPrivileges 
)

Function used to get the default privileges for the recipe class actions.

Parameters:
sRoleType - [IN] Role type (operator, expert or admin).
dsPrivileges - [OUT] List of default privileged actions for the specified role.

Referenced by unRecipeFunctions_updateRecipeClassPrivileges(), and unUnRcpClass_ButtonUserAccess().

void _unRecipeFunctions_getDefaultInstancePrivileges ( string  sRoleType,
dyn_string &  dsPrivileges 
)

Function used to get the default privileges for the recipe instance actions.

Parameters:
sRoleType - [IN] Role type (operator, expert or admin).
dsPrivileges - [OUT] List of default privileged actions for the specified role.

Referenced by unUnRcpInstance_ButtonUserAccess().

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

bool unRecipeFunctions_createRecipeFrontEnd ( string  sAppName,
string  sPrefix,
bool  bEvent,
string  sAnalog,
string  sBool,
string  sEvent,
dyn_string &  exceptionInfo 
)

Create the SOFT_FE for the recipes.

Parameters:
sAppName - [IN] Application name.
sPrefix - [IN] Application prefix.
bEvent - [IN] TRUE=16 bit event type, FALSE=32 bit event type
sAnalog - [IN] Name of the analog archive file.
sBool - [IN] Name of the boolean archive file.
sEvent - [IN] Name of the event archive file.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by _unRecipeFunctions_createPredefinedRecipeInstance(), and _unRecipeFunctions_createRecipeClass().

void unRecipeFunctions_createRecipeInstance (  ) 
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().

bool _unRecipeFunctions_hasInitialRecipe ( string  sRecipeClass  ) 

Check if an initial recipe instance exists for the specified class.

Parameters:
sRecipeClass - [IN] Recipe class name.
Returns:
TRUE if the specified recipe class has an initial recipe, otherwise FALSE.

Referenced by _unRecipeFunctions_createRecipeInstance(), _unRecipeFunctions_createRecipeInstanceFromDbInternal(), and unRecipeFunctions_createRecipeInstance().

bool _unRecipeFunctions_hasRecipeInstance ( string  sClassName,
string  sInstanceName 
)

Check if a recipe class has an instance with the specified name.

Parameters:
sClassName - [IN] Recipe class name.
sInstanceName - [IN] Recipe instance name.
Returns:
TRUE if the recipe class has an instance with the specified name, otherwise FALSE.

Referenced by _unRecipeFunctions_createRecipeInstance(), and _unRecipeFunctions_getExistingInstanceOrCreateNewInstanceFromDb().

synchronized void _unRecipeFunctions_createRecipeInstance ( string  sClassName,
string  sInstanceName,
string  sDescription,
dyn_string &  exceptionInfo,
string  sInitial = "FALSE",
string  sDpeValues = "",
string  sAcDomain = "",
string  sOperatorPrivileges = "",
string  sExpertPrivileges = "",
string  sAdminPrivileges = "" 
)

Create a new recipe instance.

Parameters:
sClassName - [IN] Name of the recipe class.
sInstanceName - [IN] Name of the new recipe instance.
sDescription - [IN] Description for the new recipe instance.
exceptionInfo - [OUT] Standard exception handling variable.
sInitial - [IN] Flag to define if the new recipe is the initial recipe of the class
sDpeValues - [IN] Recipe DPE|Values string. If the parameter is not specified the recipe elements will have the online values.
sAcDomain - [IN] Access control domain (optional).
sOperatorPrivileges - [IN] Operator privileges (optional).
sExpertPrivileges - [IN] Expert privileges (optional).
sAdminPrivileges - [IN] Admin privileges (optional).

References _unRecipeFunctions_createNewRecipeDp(), _unRecipeFunctions_getDpeValueString(), _unRecipeFunctions_hasInitialRecipe(), _unRecipeFunctions_hasRecipeInstance(), _unRecipeFunctions_isRecipeClassDefinitionValid(), unRecipeFunctions_getRecipeClassObject(), and unRecipeFunctions_updateRecipeInstancePrivileges().

Referenced by _unRecipeFunctions_createRecipeInstanceFromDbInternal(), unRecipeFunctions_createRecipeInstance(), and unRecipeFunctions_duplicateRecipeInstance().

string _unRecipeFunctions_getDpeValueString ( dyn_string  dsRcpDpes,
dyn_string  dsRcpValues 
)

Get a string containing the list of DPEs and values with the format DPName|Value[,DPName|Value]*

Parameters:
dsRcpDpes - [IN] List of recipe elements (e.g. Device1.ProcessOutput.ManReg01);
dsRcpValues - [IN] List of recipe values for the dsRecipeDpes.
Returns:
String containing the list of DPEs and values with the format DPName|Value[,DPName|Value]*

References _unRecipeFunctions_getOnlineValueDpes().

Referenced by _unRecipeFunctions_createRecipeInstance(), and unRecipeFunctions_duplicateRecipeInstance().

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

void _unRecipeFunctions_highlightEditedValue ( string  sDpName  ) 

Modify the font type of the edited rows to Bold.

Parameters:
sDpName - [IN] The data point name of the edited row.

References _unRecipeFunctions_formatValues(), and _unRecipeFunctions_getRecipeObjectFromDp().

void _unRecipeFunctions_cellEditionFinished ( string  sDpName,
int  row,
string  column,
int  iRowIndex 
)

The edition of a cell value has been completed.

Parameters:
sDpName - [IN] The data point name of the recipe instance.
row - [IN] Row number of the edited cell.
column - [IN] Column name of the edited cell.
iRowIndex - [IN] Row index in the "Index" column of the table (proper order in the JCOP recipe definition).

References _unRecipeFunctions_formatValues(), _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_checkRecipeValue().

void unRecipeFunctions_duplicateRecipeInstance ( string  sRecipeDp,
dyn_string &  exceptionInfo 
)

Duplicate the selected recipe instance.

Parameters:
sRecipeDp - [IN] DP name of the recipe instance to duplicate.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_createRecipeInstance(), _unRecipeFunctions_getDpeValueString(), _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_isLegalRecipeName(), _unRecipeFunctions_joinDynString(), _unRecipeFunctions_loadRecipeInstances(), _unRecipeFunctions_normalizeDp(), and _unRecipeFunctions_writeInRecipeLog().

void unRecipeFunctions_deleteRecipeInstance ( string  sRecipeDp,
dyn_string &  exceptionInfo 
)

Delete a recipe instance.

Parameters:
sRecipeDp - [IN] Data point name of the recipe instance to delete.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_clearInstanceTables(), _unRecipeFunctions_deleteRecipeInstances(), _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_loadRecipeInstances(), and _unRecipeFunctions_writeInRecipeLog().

bool _unRecipeFunctions_deleteRecipeInstances ( dyn_string  dsRecipeDps  ) 

Delete a list of recipe instances.

Parameters:
dsRecipeDps - [IN] Data point names of the recipes to delete.

References _unRecipeFunctions_getRecipeObjectFromDp(), and _unRecipeFunctions_writeInRecipeLog().

Referenced by unRecipeFunctions_deleteRecipeInstance().

public void unRecipeFunctions_deleteRecipeClass ( string  sRcpClassDp,
dyn_string &  exceptionInfo 
)

Delete a recipe class and all its recipe instances. Note: The recipe class and its instances will be deleted ONLY if there are no initial recipes of the class.

Parameters:
sRcpClassDp - [IN] Data point name of the recipe instance to delete.
exceptionInfo - [OUT] Standard exception handling variable.

References _unRecipeFunctions_deletePredefinedRecipeInstance(), _unRecipeFunctions_getInitialRecipeOfClass(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_loadRecipeClasses().

void unRecipeFunctions_openFaceplate ( string  sAlias,
dyn_string &  exceptionInfo 
)

Open the faceplate of a device provided the device alias.

Parameters:
sAlias - [IN] Device alias
exceptionInfo - [OUT] Standard exception handling variable.
void _unRecipeFunctions_createNewRecipeDp ( string  sDeviceType,
string  sFrontEndName,
string  sAppName,
string &  sDpName,
int &  iDeviceNumber 
)

Creates a dp name that is not existing already

Parameters:
sDeviceType - [IN] Recipe device type name.
sFrontEndName - [IN] Front end name where the recipe will be linked.
sAppName - [IN] Application name.
sDpName - [OUT] Data point name for the recipe instance.
iDeviceNumber - [OUT] Device number for the recipe.

Referenced by _unRecipeFunctions_createPredefinedRecipeInstance(), _unRecipeFunctions_createRecipeClass(), and _unRecipeFunctions_createRecipeInstance().

void unRecipeFunctions_getSelectedRecipeDp ( string &  sSelected,
dyn_string &  exceptionInfo 
)

Get the data point name of the recipe instance selected in the panel.

Parameters:
sSelected - [OUT] DP name of the recipe instance selected in the panel.
exceptionInfo - [OUT] Standard exception handling variable.

Referenced by _unRecipeFunctions_loadHistoryTableInfo(), _unRecipeFunctions_loadPropertiesTableInfo(), unRecipeFunctions_animateSelectionProgressBar(), unRecipeFunctions_editRecipeInstance(), and unRecipeFunctions_loadRecipeInstanceData().

void _unRecipeFunctions_setTableColumnBGColor ( string  tableName,
string  columnName,
string  color 
)

Set the background color of a column in a table.

Parameters:
tableName - [IN] The name of the table.
columnName - [IN] The name of the column.
color - [IN] The new color for the column.

Referenced by _unRecipeFunctions_editRecipeValuesAndShowDifferences(), and unRecipeFunctions_editRecipeInstance().

void _unRecipeFunctions_setTableRowBGColor ( string  tableName,
int  rowIndex,
string  color 
)

Set the background color of a row in a table.

Parameters:
tableName - [IN] The name of the table.
rowIndex - [IN] The row index.
color - [IN] The new color for the row.

Referenced by _unRecipeFunctions_resetRecipeElementsBgColor(), and _unRecipeFunctions_setInvalidRows().

void _unRecipeFunctions_setTableCellBGColor ( string  tableName,
int  rowIndex,
string  columnName,
string  color 
)

Set the background color of a cell in a table.

Parameters:
tableName - [IN] The name of the table.
rowIndex - [IN] The row index.
columnName - [IN] The name of the column.
color - [IN] The new color for the row.

Referenced by unRecipeFunctions_activateRecipes(), unRecipeFunctions_adoptOnlineValues(), unRecipeFunctions_checkRecipeStatus(), and unRecipeFunctions_compareOnlineValues().

void _unRecipeFunctions_resetRecipeElementsBgColor (  ) 

Restore the original colors in the recipe elements table (recipe instance panel).

References _unRecipeFunctions_setTableRowBGColor().

Referenced by unRecipeFunctions_cancelEditRecipeInstance(), unRecipeFunctions_loadRecipeInstanceData(), and unRecipeFunctions_saveRecipeInstance().

void _unRecipeFunctions_setInvalidRows ( dyn_string  rows,
string  sTableName = "RecipeElements" 
)

Set the background color of the rows in the RecipeElements table that contains invalid values.

Parameters:
rows - [IN] Indices of the invalid rows.
sTableName - [IN] Name of the table where the invalid rows must be set.

References _unRecipeFunctions_setTableRowBGColor().

Referenced by unRecipeFunctions_loadRecipeClassData(), and unRecipeFunctions_loadRecipeInstanceData().

string _unRecipeFunctions_adjustStringToSize ( shape  hiddenShape,
string  aString,
int  width 
)

Method used to trim a label to the appropriate size.

Parameters:
hiddenShape - [IN] Hidden shape (label) to calculate the width of the string.
aString - [IN] String to be trimmed if its width is bigger than the size specified.
width - [IN] Width of the shape where the label will be placed.
Returns:
A new string that fits in the specified width.

Referenced by unUnRcpClass_WidgetCB(), and unUnRcpInstance_WidgetCB().

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.
Returns:
TRUE if the lists contain the same elements, otherwise FALSE.

Referenced by unRecipeFunctions_displayDbValues().

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

bool unRecipeFunctions_dpMultiSet ( dyn_string  dsDpNames,
string  sAppendStr,
anytype  value,
dyn_string &  exceptionInfo 
)

Function used to set a value in a list of DPEs.

Parameters:
dsDpNames - [IN] List of DP names where to set the values.
sAppendStr - [IN] String to append to the DP names.
value - [IN] Value to set the the DPEs.
exceptionInfo - [OUT] Standard exception handling variable.
Returns:
TRUE if the values were set successfully, otherwise FALSE.

References _unRecipeFunctions_handleDpGetSetError().

Referenced by unRecipeFunctions_unlockDevicesLockedBySaveToDb().

void _unRecipeFunctions_normalizeDp ( string &  sDpName  ) 
void unRecipeFunctions_exportMultipleRecipes ( dyn_string  dsRcpInstList  ) 

Export multiple recipes to a file (comma separated)

Parameters:
dsRcpInstList [IN] List of recipe names to export.

References _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_writeInRecipeLog(), unRecipeFunctions_getDeviceRange(), and unRecipeFunctions_getDpeUnit().


Generated on 18 Jun 2018 for unCPC6 by  doxygen 1.6.1