unRecipe 9.1.0
unRcpFunctions_instance.ctl File Reference

Functions

void _unRecipeFunctions_saveRecipeValues (dyn_dyn_mixed recipeObject, dyn_anytype &values, 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)
 
bool unRecipeFunctions_checkRecipeThresholds (dyn_dyn_mixed recipeObject, dyn_anytype &values, bool bShowErrorLines, dyn_string &exceptionInfo)
 
void unRecipeFunctions_compareOnlineValues (dyn_string dsRcpDpList)
 
void unRecipeFunctions_adoptOnlineValues (dyn_string dsRcpDps)
 
bool unRecipeFunctions_lockRecipe (string sRcpDp, string sAlias)
 
void _unRecipeFunctions_plcStatusCB (string sAlarmDpe, int iSystemIntegrityAlarmValue, string sEnabledDpe, bool bSystemIntegrityAlarmEnabled)
 
void _unRecipeFunctions_createPredefinedRecipeInstance (string sClassName, string sDeviceLink, string sAppName, dyn_string &exceptionInfo)
 
void unRecipeFunctions_updatePredefinedRecipeInstancePrivileges (string sClassName, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_dpConnectRcpValuesCB (string sRcpValuesDp, dyn_string dsValues)
 
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)
 
void unRecipeFunctions_saveAsDeviceDefaultValues (string sRecipeDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_saveAsInitialRecipe (string sRecipeDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_cancelEditRecipeInstance (string sRecipeDp)
 
void unRecipeFunctions_deviceUpdatedRcpInstanceCB (string sCommandDp, int iCommand, string sSystemNameDp, string sSystemName)
 
void unRecipeFunctions_createRecipeInstance ()
 
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="")
 
bool unRecipeFunctions_hasRecipeInstance (string sClassName, string sInstanceName)
 
void unRecipeFunctions_duplicateRecipeInstance (string sRecipeDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_deleteRecipeInstance (string sRecipeDp, dyn_string &exceptionInfo)
 
bool _unRecipeFunctions_deleteRecipeInstances (dyn_string dsRecipeDps)
 
void unRecipeFunctions_displayOnlineValues (string sRecipeDpName, dyn_string &exceptionInfo, time t=0)
 
void unRecipeFunctions_editRecipeValuesAndShowDifferences (dyn_anytype daValues, dyn_string &exceptionInfo)
 
bool unRecipeFunctions_selectRecipeInstance (string sRcpInstanceDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_selectPcoRecipes (string sPcoDp, dyn_string &exceptionInfo, bool bSelectFirstInstance=true, string sApplication="*")
 
synchronized void _unRecipeFunctions_loadRecipeInstances (string sRecipeClass="")
 
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_cellEditionFinished (string sDpName, int row, string column, int iRowIndex)
 
void _unRecipeFunctions_highlightEditedValue (string sDpName)
 
void unRecipeFunctions_disconnectPlcStatus (string sRcpInstanceDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_connectPlcStatus (string sRcpInstanceDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_exportMultipleRecipes (dyn_string dsRcpInstList)
 
void _unRecipeFunctions_saveRecipeElementsToFile (string sFileName, string sRcpName, dyn_dyn_mixed recipeObject)
 

Detailed Description

UNICOS Copyright (C) CERN 2017 All rights reserved

unRcpFunctions_privileges.ctl This file contains functions related to the recipes instances.

Creation Date
15/03/2017
Modification History
Constraints
None
Usage
Public
PVSS managers
Ui, CTRL
Author
Ivan Prieto Barreiro (BE-ICS)

Function Documentation

◆ _unRecipeFunctions_saveRecipeValues()

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

Save the recipe values.

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

◆ _unRecipeFunctions_checkRecipeOnlineValues()

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.

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

◆ unRecipeFunctions_checkRecipeStructure()

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

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

◆ unRecipeFunctions_checkRecipeValues()

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.

◆ unRecipeFunctions_checkRecipeThresholds()

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

Check if the recipe thresholds are valid according to HH >= H >= L >= LL

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.

◆ unRecipeFunctions_compareOnlineValues()

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.

◆ unRecipeFunctions_adoptOnlineValues()

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.

◆ unRecipeFunctions_lockRecipe()

bool unRecipeFunctions_lockRecipe ( string  sRcpDp,
string  sAlias 
)
private

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.

◆ _unRecipeFunctions_plcStatusCB()

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.
Reviewed:
2018-09-12 Callback

◆ _unRecipeFunctions_createPredefinedRecipeInstance()

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

Create a predefined recipe instance to store the default privileges.

Parameters
sClassName- [IN] Recipe class name.
sDeviceLink- [IN] PCO link for the recipe class.
sAppName- [IN] Application name.
exceptionInfo- [OUT] Standar exception handling variable.

◆ unRecipeFunctions_updatePredefinedRecipeInstancePrivileges()

void unRecipeFunctions_updatePredefinedRecipeInstancePrivileges ( string  sClassName,
dyn_string &  exceptionInfo 
)

Updates the privileges on the predefined recipe instance.

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

◆ _unRecipeFunctions_dpConnectRcpValuesCB()

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.

Reviewed:
2018-09-12 Callback

◆ unRecipeFunctions_editRecipeInstance()

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.

◆ _unRecipeFunctions_copyRecipeInstanceToHiddenTable()

void _unRecipeFunctions_copyRecipeInstanceToHiddenTable ( )
private

Copy the RecipeElements table (Recipe instance) to a hidden table.

◆ unRecipeFunctions_saveRecipeInstance()

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.

◆ unRecipeFunctions_saveAsDeviceDefaultValues()

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.

◆ unRecipeFunctions_saveAsInitialRecipe()

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.

◆ unRecipeFunctions_cancelEditRecipeInstance()

void unRecipeFunctions_cancelEditRecipeInstance ( string  sRecipeDp)

Cancel the recipe instance edition.

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

◆ unRecipeFunctions_deviceUpdatedRcpInstanceCB()

void 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.
Reviewed:
2018-09-12 Callback

◆ unRecipeFunctions_createRecipeInstance()

void unRecipeFunctions_createRecipeInstance ( )

Create a new recipe instance of the selected recipe class.

◆ _unRecipeFunctions_createRecipeInstance()

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

◆ unRecipeFunctions_hasRecipeInstance()

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.

◆ unRecipeFunctions_duplicateRecipeInstance()

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.

◆ unRecipeFunctions_deleteRecipeInstance()

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.

◆ _unRecipeFunctions_deleteRecipeInstances()

bool _unRecipeFunctions_deleteRecipeInstances ( dyn_string  dsRecipeDps)

Delete a list of recipe instances.

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

◆ unRecipeFunctions_displayOnlineValues()

void unRecipeFunctions_displayOnlineValues ( string  sRecipeDpName,
dyn_string &  exceptionInfo,
time  t = 0 
)

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.

◆ unRecipeFunctions_editRecipeValuesAndShowDifferences()

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.

◆ 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.
Returns
True if the recipe instance was selected, otherwise False.

◆ unRecipeFunctions_selectPcoRecipes()

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.

◆ _unRecipeFunctions_loadRecipeInstances()

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.

◆ _unRecipeFunctions_loadPropertiesTableInfo()

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

Load the data of the recipe instance properties table.

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

◆ unRecipeFunctions_setRecipeStatusInfo()

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.

◆ unRecipeFunctions_loadRecipeInstanceData()

synchronized void unRecipeFunctions_loadRecipeInstanceData ( )

Load the recipe instance data in the panel.

◆ _unRecipeFunctions_loadHistoryTableInfo()

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.

◆ _unRecipeFunctions_clearInstanceTables()

synchronized void _unRecipeFunctions_clearInstanceTables ( )

Remove the recipe instance data from the panel.

◆ _unRecipeFunctions_cellEditionFinished()

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

◆ _unRecipeFunctions_highlightEditedValue()

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.

◆ unRecipeFunctions_disconnectPlcStatus()

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.

◆ unRecipeFunctions_connectPlcStatus()

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.

◆ unRecipeFunctions_exportMultipleRecipes()

void unRecipeFunctions_exportMultipleRecipes ( dyn_string  dsRcpInstList)

Export multiple recipes to a file (comma separated)

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

◆ _unRecipeFunctions_saveRecipeElementsToFile()

void _unRecipeFunctions_saveRecipeElementsToFile ( string  sFileName,
string  sRcpName,
dyn_dyn_mixed  recipeObject 
)
private

Saves the recipe elements to a file.

Parameters
sFileName[IN] The file name where to save the recipe elements.
recipeObject[IN] Recipe object to be saved.