unRecipe 9.1.0
unRcpFunctions_class.ctl File Reference

Functions

void _unRecipeFunctions_getRecipeClassDeviceMapping (dyn_mixed rcpClassObject, mapping &rcpDeviceDpes)
 
bool _unRecipeFunctions_isRecipeClassDefinitionValid (string sClassDp, dyn_string &exceptionInfo)
 
void _unRecipeFunctions_getRecipeClassDataFromInstance (string sRcpInstanceDp, string &sRcpClassName, string &sRcpClassDp, string &sPcoLink)
 
void _unRecipeFunctions_dpConnectRcpClassElementsCB (string sRcpClassElementsDp, dyn_string dsValues)
 
void _unRecipeFunctions_getRecipeInstancesOfClass (string sClassName, dyn_string &dsRcpInstanceNames, dyn_string &dsRcpInstanceDps)
 
int _unRecipeFunctions_getCountOfRecipeInstancesOfClass (string sClassName)
 
int _unRecipeFunctions_getInitialRecipeOfClass (string sClassDp, string &sInitialRcpDp, dyn_string &exceptionInfo)
 
int _unRecipeFunctions_getLastActivatedRecipeDp (string sClassDp, string &sLastActivatedRcpDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_getLastActivatedPcoRecipes (dyn_string dsPcoDps, dyn_string &recipeList, dyn_string &exceptionInfo)
 
void unRecipeFunctions_getInitialPcoRecipes (dyn_string dsPcoDps, 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_addRecipeClassDevices (string sRcpClassDp)
 
void unRecipeFunctions_applyRecipeClassModifications (string sRcpClassDp)
 
void _unRecipeFunctions_setOnlineValuesForNewDpes (dyn_string dsOldDpes, dyn_string dsNewDpes, dyn_string dsRcpInstNames)
 
void unRecipeFunctions_removeSelectedRecipeClassDevices (string sRcpClassDp)
 
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_doesRecipeClassExist (string sClassName)
 
void unRecipeFunctions_deviceUpdatedRcpClassCB (string sCommandDp, int iCommand, string sSystemNameDp, string sSystemName)
 
bool _unRecipeFunctions_hasInitialRecipe (string sRecipeClass)
 
void unRecipeFunctions_deleteRecipeClass (string sRcpClassDp, dyn_string &exceptionInfo)
 
void unRecipeFunctions_getRecipeClasses (dyn_string &dsRecipeClassNames, dyn_string &dsRecipeClassDps, string sPcoLink="*", bool bLocalOnly=FALSE, bool bAddSystemName=FALSE, string sApplication="*", bool bOnlyConnectedSystems=FALSE)
 
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_loadRecipeClassData (string sRcpClassDp)
 
void unRecipeFunctions_selectRecipeClass (string sRcpClassDp, dyn_string &exceptionInfo, bool bForceReload=FALSE)
 
void _unRecipeFunctions_loadRecipeClassList (string sPcoLink="*", string sApplication="*")
 
void unRecipeFunctions_filterRecipeClasses (dyn_string dsPcoAlias, dyn_string dsApplication, dyn_string &dsRecipeClassNames, dyn_string &dsRecipeClassDps)
 

Detailed Description

UNICOS Copyright (C) CERN 2017 All rights reserved

unRcpFunctions_class.ctl This file contains functions related to the recipes classes.

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

Function Documentation

◆ _unRecipeFunctions_getRecipeClassDeviceMapping()

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.

◆ _unRecipeFunctions_isRecipeClassDefinitionValid()

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.

◆ _unRecipeFunctions_getRecipeClassDataFromInstance()

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.

◆ _unRecipeFunctions_dpConnectRcpClassElementsCB()

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.

Reviewed:
2018-09-12 Callback

◆ _unRecipeFunctions_getRecipeInstancesOfClass()

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.

◆ _unRecipeFunctions_getCountOfRecipeInstancesOfClass()

int _unRecipeFunctions_getCountOfRecipeInstancesOfClass ( string  sClassName)

Get all the number of recipe instances of a class.

Parameters
sClassName- [IN] Recipe class name.

◆ _unRecipeFunctions_getInitialRecipeOfClass()

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

◆ _unRecipeFunctions_getLastActivatedRecipeDp()

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

◆ unRecipeFunctions_getLastActivatedPcoRecipes()

void unRecipeFunctions_getLastActivatedPcoRecipes ( dyn_string  dsPcoDps,
dyn_string &  recipeList,
dyn_string &  exceptionInfo 
)

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

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

◆ unRecipeFunctions_getInitialPcoRecipes()

void unRecipeFunctions_getInitialPcoRecipes ( dyn_string  dsPcoDps,
dyn_string &  recipeList,
dyn_string &  exceptionInfo 
)

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

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

◆ unRecipeFunctions_getLastActivatedRecipesFromPcoHierarchy()

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.

◆ unRecipeFunctions_getInitialRecipesFromPcoHierarchy()

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.

◆ unRecipeFunctions_addRecipeClassDevices()

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.

◆ unRecipeFunctions_applyRecipeClassModifications()

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.

◆ _unRecipeFunctions_setOnlineValuesForNewDpes()

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

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.

◆ unRecipeFunctions_removeSelectedRecipeClassDevices()

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.

◆ _unRecipeFunctions_createRecipeClass()

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

◆ _unRecipeFunctions_doesRecipeClassExist()

bool _unRecipeFunctions_doesRecipeClassExist ( string  sClassName)
private

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.

◆ unRecipeFunctions_deviceUpdatedRcpClassCB()

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

◆ _unRecipeFunctions_hasInitialRecipe()

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.

◆ unRecipeFunctions_deleteRecipeClass()

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.

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

◆ unRecipeFunctions_loadRecipeClasses()

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.

◆ _unRecipeFunctions_loadRecipeClassesInTable()

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

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.

◆ _unRecipeFunctions_loadRecipeClassesInComboBox()

int _unRecipeFunctions_loadRecipeClassesInComboBox ( dyn_string  rcpClassNames)
private

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.

◆ unRecipeFunctions_clearRecipeClassData()

void unRecipeFunctions_clearRecipeClassData ( )

Clear all the data from the recipe class panel.

◆ unRecipeFunctions_loadRecipeClassData()

void unRecipeFunctions_loadRecipeClassData ( string  sRcpClassDp)
private

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.

◆ unRecipeFunctions_selectRecipeClass()

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.

◆ _unRecipeFunctions_loadRecipeClassList()

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

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

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

◆ unRecipeFunctions_filterRecipeClasses()

void unRecipeFunctions_filterRecipeClasses ( dyn_string  dsPcoAlias,
dyn_string  dsApplication,
dyn_string &  dsRecipeClassNames,
dyn_string &  dsRecipeClassDps 
)

Filters a list of recipe class names & recipe class dps. Removes from the lists the recipes that don't belong to the specified applications or are not linked to the specified PCOs.

Parameters
dsPcoAlias- [IN] List of PCO aliases for the filter.
dsApplication- [IN] List of applications for the filter.
dsRecipeClassNames- [IN/OUT] List of recipe class names.
dsRecipeClassDps- [IN/OUT] List of recipe class dps.