unRecipe 9.1.0
|
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) |
UNICOS Copyright (C) CERN 2017 All rights reserved
unRcpFunctions_privileges.ctl This file contains functions related to the recipes instances.
|
private |
Save the recipe values.
recipeObject | - [IN] Recipe instance data. |
values | - [IN/OUT] Values for the recipe elements. |
exceptionInfo | - [OUT] Standard exception handling variable. |
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.
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. |
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,...).
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. |
|
private |
Check if the recipe structure is coherent:
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. |
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.
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. |
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
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. |
void unRecipeFunctions_compareOnlineValues | ( | dyn_string | dsRcpDpList | ) |
Compares the recipe values and online values of a list of recipes.
dsRcpDpList | [IN] - List of recipe instance datapoints. |
void unRecipeFunctions_adoptOnlineValues | ( | dyn_string | dsRcpDps | ) |
Saves the online values of the recipe elements into the recipe.
dsRcpDps | [IN] - Datapoint names of the recipe instances. |
|
private |
Locks the recipe instance specified.
sRcpDp | [IN] - Datapoint name of the recipe instace. |
sAlias | [IN] - Recipe alias. |
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.
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. |
void _unRecipeFunctions_createPredefinedRecipeInstance | ( | string | sClassName, |
string | sDeviceLink, | ||
string | sAppName, | ||
dyn_string & | exceptionInfo | ||
) |
Create a predefined recipe instance to store the default privileges.
sClassName | - [IN] Recipe class name. |
sDeviceLink | - [IN] PCO link for the recipe class. |
sAppName | - [IN] Application name. |
exceptionInfo | - [OUT] Standar exception handling variable. |
void unRecipeFunctions_updatePredefinedRecipeInstancePrivileges | ( | string | sClassName, |
dyn_string & | exceptionInfo | ||
) |
Updates the privileges on the predefined recipe instance.
sClassName | - [IN] Recipe class name. |
exceptionInfo | - [OUT] Standar exception handling variable. |
void _unRecipeFunctions_dpConnectRcpValuesCB | ( | string | sRcpValuesDp, |
dyn_string | dsValues | ||
) |
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.
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. |
|
private |
Copy the RecipeElements table (Recipe instance) to a hidden table.
bool unRecipeFunctions_saveRecipeInstance | ( | string | sRecipeDp, |
dyn_string & | exceptionInfo, | ||
bool | bShowConfirmationMessage = TRUE |
||
) |
Save the values of the recipe instance.
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) |
void unRecipeFunctions_saveAsDeviceDefaultValues | ( | string | sRecipeDp, |
dyn_string & | exceptionInfo | ||
) |
Save the recipe values as default values in the devices.
sRecipeDp | - [IN] The DP of the recipe instance. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_saveAsInitialRecipe | ( | string | sRecipeDp, |
dyn_string & | exceptionInfo | ||
) |
Save the values of the selected recipe in the initial recipe of the class.
sRecipeDp | - [IN] The DP of the recipe instance which values must be save in the initial recipe. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_cancelEditRecipeInstance | ( | string | sRecipeDp | ) |
Cancel the recipe instance edition.
sRecipeDp | - [IN] DP Name of the recipe instance that was being edited. |
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.
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. |
void unRecipeFunctions_createRecipeInstance | ( | ) |
Create a new recipe instance of the selected recipe class.
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.
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). |
bool unRecipeFunctions_hasRecipeInstance | ( | string | sClassName, |
string | sInstanceName | ||
) |
Check if a recipe class has an instance with the specified name.
sClassName | - [IN] Recipe class name. |
sInstanceName | - [IN] Recipe instance name. |
void unRecipeFunctions_duplicateRecipeInstance | ( | string | sRecipeDp, |
dyn_string & | exceptionInfo | ||
) |
Duplicate the selected recipe instance.
sRecipeDp | - [IN] DP name of the recipe instance to duplicate. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_deleteRecipeInstance | ( | string | sRecipeDp, |
dyn_string & | exceptionInfo | ||
) |
Delete a recipe instance.
sRecipeDp | - [IN] Data point name of the recipe instance to delete. |
exceptionInfo | - [OUT] Standard exception handling variable. |
bool _unRecipeFunctions_deleteRecipeInstances | ( | dyn_string | dsRecipeDps | ) |
Delete a list of recipe instances.
dsRecipeDps | - [IN] Data point names of the recipes to delete. |
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.
sRecipeDpName | - [IN] String containing the recipe instance DP name. |
exceptionInfo | - [OUT] Standard exception handling variable. |
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.
daValues | - [IN] Recipe values. |
exceptionInfo | - [OUT] Standard exception handling variable. |
bool unRecipeFunctions_selectRecipeInstance | ( | string | sRcpInstanceDp, |
dyn_string & | exceptionInfo | ||
) |
Selects the specified recipe instance in the recipe instance panel.
sRcpInstanceDp | - [IN] Datapoint of the recipe instance which will be selected. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_selectPcoRecipes | ( | string | sPcoDp, |
dyn_string & | exceptionInfo, | ||
bool | bSelectFirstInstance = true , |
||
string | sApplication = "*" |
||
) |
Function to select the PCO recipes in the recipe instance panel.
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. |
synchronized void _unRecipeFunctions_loadRecipeInstances | ( | string | sRecipeClass = "" | ) |
Load the recipe instances in the table (recipe instances panel).
sRecipeClass | - [IN] Recipe class name which instances will be loaded. |
synchronized void _unRecipeFunctions_loadPropertiesTableInfo | ( | string | sDpName = "" , |
dyn_dyn_mixed | recipeObject = makeDynMixed() |
||
) |
Load the data of the recipe instance properties table.
sDpName | - [IN] Datapoint element of the recipe instance. |
recipeObject | - [IN] Recipe instance data from fwConfigDB. |
synchronized void unRecipeFunctions_setRecipeStatusInfo | ( | int | status, |
dyn_string | message = makeDynString() |
||
) |
Set the recipe status in the RecipeProperties table.
status | - [IN] New status of the recipe instance. |
message | - [IN] Contains a message to display when there is no PLC connection. |
synchronized void unRecipeFunctions_loadRecipeInstanceData | ( | ) |
Load the recipe instance data in the panel.
synchronized void _unRecipeFunctions_loadHistoryTableInfo | ( | string | sDpName = "" , |
dyn_dyn_mixed | recipeObject = makeDynMixed() |
||
) |
Load the recipe instance data in the history table.
sDpName | - [IN] Datapoint element of the recipe instance. |
recipeObject | - [IN] Contents of the recipe instance from fwConfigDB. |
synchronized void _unRecipeFunctions_clearInstanceTables | ( | ) |
Remove the recipe instance data from the panel.
void _unRecipeFunctions_cellEditionFinished | ( | string | sDpName, |
int | row, | ||
string | column, | ||
int | iRowIndex | ||
) |
The edition of a cell value has been completed.
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). |
void _unRecipeFunctions_highlightEditedValue | ( | string | sDpName | ) |
Modify the font type of the edited rows to Bold.
sDpName | - [IN] The data point name of the edited row. |
void unRecipeFunctions_disconnectPlcStatus | ( | string | sRcpInstanceDp, |
dyn_string & | exceptionInfo | ||
) |
Disconnect from the PLC status of a recipe instance.
sRcpInstanceDp | - [IN] DP Name of the recipe instance. |
exceptionInfo | - [OUT] Standard exception handling variable. |
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.
sRcpInstanceDp | - [IN] DP Name of the recipe instance. |
exceptionInfo | - [OUT] Standard exception handling variable. |
void unRecipeFunctions_exportMultipleRecipes | ( | dyn_string | dsRcpInstList | ) |
Export multiple recipes to a file (comma separated)
dsRcpInstList | [IN] List of recipe names to export. |
|
private |
Saves the recipe elements to a file.
sFileName | [IN] The file name where to save the recipe elements. |
recipeObject | [IN] Recipe object to be saved. |