fwConfigurationDB  8.4.0
fwConfigurationDB_Recipes.ctl File Reference

Functions

void fwConfigurationDB_GetRecipeFromSystem (dyn_dyn_mixed &recipeObject, dyn_string deviceList, string hierarchyType, dyn_string &exceptionInfo, dyn_string deviceSystems="")
 
void fwConfigurationDB_ApplyRecipe (dyn_dyn_mixed recipeObject, string hierarchyType, dyn_string &exceptionInfo, bool allowApplyRemote=FALSE)
 
string fwConfigurationDB_createRecipeCache (string recipeName, dyn_string &exceptionInfo, string recipeComment="", string hierarchyType="")
 
void fwConfigurationDB_storeRecipeInCache (dyn_dyn_mixed recipeObject, string cacheName, string hierarchyType, dyn_string &exceptionInfo)
 
void fwConfigurationDB_getRecipeFromCache (string cacheName, dyn_string deviceList, string hierarchyType, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo, string systemName="")
 
void fwConfigurationDB_storeDiffRecipeInDB (dyn_dyn_mixed recipeObject, string hierarchyType, string versionDescription, dyn_string &exceptionInfo, string tag, string systemName="", bool autoSaveDevices=FALSE)
 
void fwConfigurationDB_storeRecipeInDB (dyn_dyn_mixed recipeObject, string hierarchyType, string versionDescription, dyn_string &exceptionInfo, string tag)
 
void fwConfigurationDB_resetRecipeInDB (string recipeName, dyn_string &exceptionInfo, dyn_string deviceList="")
 
void fwConfigurationDB_getRecipeFromDB (string topDevice, dyn_string deviceList, string hierarchyType, string tag, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo, string systemName="", time validAt=0)
 
dyn_string fwConfigurationDB_getRTValues (string dataPointType, dyn_string &exceptionInfo)
 
dyn_string fwConfigurationDB_getRTAlerts (string dataPointType, dyn_string &exceptionInfo)
 
bool _fwConfigurationDB_HandleMissingRT (string dataPoint, string dpType, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_ClearRecipeObject (dyn_dyn_mixed &recipeObject)
 
void fwConfigurationDB_adoptRecipeObjectToSystem (dyn_dyn_mixed &recipeObject, string systemName, dyn_string &exceptionInfo)
 
bool fwConfigurationDB_compareRecipes (dyn_dyn_mixed recipeObject1, dyn_dyn_mixed recipeObject2, dyn_dyn_mixed &diffRecipeObject, string hierarchyType, dyn_string &exceptionInfo)
 
int fwConfigurationDB_getRecipeMetaInfo (dyn_dyn_mixed &recipeObject, int idx, mixed &info, dyn_string &exceptionInfo)
 
void fwConfigurationDB_makeRecipe (dyn_string deviceElements, dyn_mixed settings, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo, bool checkExists=TRUE)
 
void fwConfigurationDB_extractSettingFromRecipe (dyn_dyn_mixed recipeObject, dyn_string &deviceElements, dyn_mixed &values, dyn_mixed &exceptionInfo)
 
string _fwConfigurationDB_getRecipeClassDP (string className, bool &exists, dyn_string &exceptionInfo)
 
void fwConfigurationDB_createRecipeClass (string recipeClass, string recipeType, string description, bool editable, dyn_string elements, dyn_string &exceptionInfo)
 
void fwConfigurationDB_deleteRecipeClass (string recipeClass, bool deleteRecipes, dyn_string &exceptionInfo)
 
void fwConfigurationDB_instantiateRecipeOfClass (string recipeName, string className, dyn_string &exceptionInfo)
 
void fwConfigurationDB_deleteRecipeOfClass (string recipeName, string className, dyn_string &exceptionInfo)
 
dyn_string fwConfigurationDB_getRecipeClassInstances (string recipeClass, bool scanAll, dyn_string &exceptionInfo)
 
void fwConfigurationDB_getRecipeClasses (dyn_string &recipeClassNames, dyn_string &recipeClassComments, dyn_string &exceptionInfo, string systemName="")
 
void fwConfigurationDB_modifyRecipeClass (string recipeClass, dyn_string newDeviceList, string newRecipeType, string newDescription, dyn_string &exceptionInfo, bool updateInstances=TRUE)
 
void _fwConfigurationDB_updateRecipeClass (string recipeClass, dyn_mixed recipeClassInfo, dyn_string &exceptionInfo, bool updateInstances=TRUE)
 
void _fwConfigurationDB_activateRecipeUpdateMetaInfo (dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo)
 
Public Functions for Recipe Handling

Naming conventions:

  • operations:
    • load/save From/To Cache/DB
    • extract/apply
    • get Recipes In DB/Cache
    • get/set Description In Cache/DB
  • parameters:
    • recipeObject , recipeObject1, recipeObject2, diffRecipeObject, templateRecipeObject deviceName, deviceList, hierarchyType, recipeName, recipeList

Note that the functions used in version 3.0.X will still be supported in 3.1.X, yet their use is deprecated.

void fwConfigurationDB_loadRecipeFromCache (string recipeName, dyn_string deviceList, string hierarchyType, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo, string systemName="")
 
void fwConfigurationDB_loadRecipeFromDB (string recipeName, dyn_string deviceList, string hierarchyType, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo, string systemName="", string topDevice="", time validAt=0)
 
void fwConfigurationDB_saveRecipeToDB (dyn_dyn_mixed recipeObject, string hierarchyType, string recipeName, dyn_string &exceptionInfo, string versionDescription="", bool autoSaveDevices=FALSE)
 
void fwConfigurationDB_saveRecipeToCache (dyn_dyn_mixed recipeObject, string hierarchyType, string recipeName, dyn_string &exceptionInfo)
 
void fwConfigurationDB_saveDiffRecipeToDB (dyn_dyn_mixed recipeObject, string hierarchyType, string recipeName, dyn_string &exceptionInfo, string versionDescription="", bool autoSaveDevices=FALSE)
 
synchronized void fwConfigurationDB_extractRecipe (dyn_string deviceList, string hierarchyType, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo, string recipeType="", dyn_string deviceSystems="", string recipeTypeSystem="")
 
void fwConfigurationDB_applyRecipe (dyn_dyn_mixed recipeObject, string hierarchyType, dyn_string &exceptionInfo, bool allowApplyRemote=FALSE)
 
void fwConfigurationDB_getRecipeDescriptionInCache (string recipeName, string &recipeDescription, dyn_string &exceptionInfo)
 
void fwConfigurationDB_getRecipeDescriptionInDB (string recipeName, string &recipeDescription, dyn_string &exceptionInfo)
 
void fwConfigurationDB_setRecipeDescriptionInCache (string recipeName, string recipeDescription, dyn_string &exceptionInfo)
 
void fwConfigurationDB_setRecipeDescriptionInDB (string recipeName, string recipeDescription, dyn_string &exceptionInfo)
 
void fwConfigurationDB_setRecipeTypeInfoInDB (string recipeName, string recipeTypeName, dyn_string &exceptionInfo)
 
void fwConfigurationDB_getRecipesInDB (dyn_string &recipeList, dyn_string &exceptionInfo, string deviceName="")
 
void fwConfigurationDB_getRecipesInCache (dyn_string &recipeList, dyn_string &exceptionInfo, string deviceName="", string systemName="")
 
void fwConfigurationDB_getRecipeMetaInfoInCache (string recipeName, dyn_string &exceptionInfo, string &hierarchyType, string &recipeComment, string &recipeType)
 
void fwConfigurationDB_getRecipeMetaInfoInDB (string recipeName, dyn_string &exceptionInfo, string &hierarchyType, string &recipeComment, string &recipeType)
 
int fwConfigurationDB_findRecipesInCache (dyn_string &recipeNames, dyn_string &exceptionInfo, string recipeName="*", string hierarchyType="*", string recipeComment="*", string recipeType="*", string deviceName="*", string recipeClass="*")
 
int fwConfigurationDB_findRecipesInDB (dyn_string &recipeNames, dyn_string &exceptionInfo, string recipeName="*", string hierarchyType="", string recipeComment="*", string recipeType="*", string deviceName="*")
 
bool fwConfigurationDB_editRecipe (dyn_dyn_mixed &recipeObject, bool readOnly=FALSE, string description="")
 
void fwConfigurationDB_makeRecipeFromTemplate (dyn_string deviceNames, string hierarchyType, dyn_dyn_mixed templRecipeObject, dyn_dyn_mixed &recipeObject, dyn_string &exceptionInfo)
 
void fwConfigurationDB_setRecipeType (string recipeType, dyn_string &exceptionInfo, string systemName="")
 
void fwConfigurationDB_combineRecipes (dyn_dyn_mixed &dstRecipeObject, dyn_dyn_mixed srcRecipeObject1, dyn_dyn_mixed srcRecipeObject2, dyn_string &exceptionInfo, string mergeMode="")
 

Variables

global string fwConfigurationDB_defaultRecipeMergeMode ="ELEMENT"
 
global int fwConfigurationDB_handleMissingDevices =4
 
Error Codes in Recipes package

see also Error Codes overview module.

const int fwConfigurationDB_ERROR_CantLoadPartOfRecipeType = -51
 
const int fwConfigurationDB_ERROR_NoValuesDataInRT = -52
 
const int fwConfigurationDB_ERROR_NoAlertsDataInRT = -53
 
const int fwConfigurationDB_ERROR_NoRecipeType = -103
 
const int fwConfigurationDB_ERROR_CantLoadRecipeType = -104
 
const int fwConfigurationDB_ERROR_InvalidDataPointName = -105
 
const int fwConfigurationDB_ERROR_StoreRecipeDataToCache = -106
 
const int fwConfigurationDB_ERROR_NoRecipeCache = -107
 
const int fwConfigurationDB_ERROR_GetRecipeFromCache = -108
 
const int fwConfigurationDB_ERROR_CreateRecipeCache = -109
 
const int fwConfigurationDB_ERROR_RecipeCacheExists = -110
 
const int fwConfigurationDB_ERROR_DPENotInRecipe = -111
 
Indexing constants for recipeObject variables

The following constants are used to refer to the data in a single row of a recipeObject variable (a recipeRow).

const int fwConfigurationDB_RO_DPE_NAME = 1
 
const int fwConfigurationDB_RO_DP_NAME = 2
 
const int fwConfigurationDB_RO_DP_TYPE = 3
 
const int fwConfigurationDB_RO_ELEMENT_NAME = 4
 
const int fwConfigurationDB_RO_ELEMENT_TYPE = 5
 
const int fwConfigurationDB_RO_HIERARCHY = 6
 
const int fwConfigurationDB_RO_HAS_VALUE = 7
 
const int fwConfigurationDB_RO_HAS_ALERT = 8
 
const int fwConfigurationDB_RO_VALUE = 9
 
const int fwConfigurationDB_RO_ALERT_ACTIVE = 10
 
const int fwConfigurationDB_RO_ALERT_TEXTS = 11
 
const int fwConfigurationDB_RO_ALERT_LIMITS = 12
 
const int fwConfigurationDB_RO_ALERT_CLASSES = 13
 
const int fwConfigurationDB_RO_ALERT_TYPE = 14
 
const int fwConfigurationDB_RO_ALERT_MINIDX = 10
 
const int fwConfigurationDB_RO_ALERT_MAXIDX = 14
 
const int fwConfigurationDB_RO_REC_VERSIONID = 15
 
const int fwConfigurationDB_RO_RECDATA_PROPID = 16
 
const int fwConfigurationDB_RO_DATECREATED = 17
 
const int fwConfigurationDB_RO_MAXIDX = 17
 
const int fwConfigurationDB_RO_METAINFO_START = 18
 
const int fwConfigurationDB_RO_META_ORIGNAME = 18
 
const int fwConfigurationDB_RO_META_COMMENT = 19
 
const int fwConfigurationDB_RO_META_RECIPETYPE = 20
 
const int fwConfigurationDB_RO_META_CLASSNAME = 21
 
const int fwConfigurationDB_RO_META_AUTHOR = 22
 
const int fwConfigurationDB_RO_META_CREATIONTIME = 23
 
const int fwConfigurationDB_RO_META_LASTACTIVATIONTIME = 24
 
const int fwConfigurationDB_RO_META_LASTACTIVATIONUSER = 25
 
const int fwConfigurationDB_RO_META_LASTMODIFICATIONTIME = 26
 
const int fwConfigurationDB_RO_META_LASTMODIFICATIONUSER = 27
 
const int fwConfigurationDB_RO_META_LASTMODIFICATIONCOMMENT = 28
 
const int fwConfigurationDB_RO_META_PREDEFINED = 29
 
const int fwConfigurationDB_RO_META_RECIPEVERSION = 30
 
const int fwConfigurationDB_RO_METAINFO_END = 30
 
Indexing constants for recipeClassInfo variables

The following constants are used to refer to the elements of the recipeClassInfo objects

const int fwConfigurationDB_RCL_CLASSNAME =1
 
const int fwConfigurationDB_RCL_RECIPETYPE =2
 
const int fwConfigurationDB_RCL_DESCRIPTION =3
 
const int fwConfigurationDB_RCL_ELEMENTS =4
 
const int fwConfigurationDB_RCL_DEVICES =5
 
const int fwConfigurationDB_RCL_DEVICE_DPTYPES =6
 
const int fwConfigurationDB_RCL_INSTANCES =7
 
const int fwConfigurationDB_RCL_EDITABLE =8
 
const int fwConfigurationDB_RCL_LAST_ACTIVATED_RECIPE =9
 
const int fwConfigurationDB_RCL_LAST_ACTIVATED_TIME =10
 
const int fwConfigurationDB_RCL_LAST_ACTIVATED_USER =11
 
const int fwConfigurationDB_RCL_LAST_MODIFIED_TIME =12
 
const int fwConfigurationDB_RCL_LAST_MODIFIED_USER =13
 
const int fwConfigurationDB_RCL_INVALID_DEVICES =14
 
const int fwConfigurationDB_RCL_MAXIDX =14
 

Detailed Description

This package contains recipes-related functions of the Configuration Database tool

Author
Piotr Golonka (BE/ICS-FD)
Date
August 2019 (c) Copyright CERN, All Rights Reserved

Function Documentation

void fwConfigurationDB_resetRecipeInDB ( string  recipeName,
dyn_string &  exceptionInfo,
dyn_string  deviceList = "" 
)

Resets a recipe in database

The function could be used to reset (ie. close the interval-of-validity) for a specified recipe. In effect, the current content of the recipe becomes empty, yet still the data is kept in the database and may still be retrieved (by specifying the validAt parameter pointing to the time before invalidation). Optionally, one may choose to reset the data only for specified devices

Parameters
recipeName: the name of the recipe in DB to be invalidated
exceptionInfo: standard exception handling variable
deviceList: (optional, default empty) contains the list of devices to be reset in the recipe; if empty, then the whole content of recipe (all devices) are reset.
dyn_string fwConfigurationDB_getRTValues ( string  dataPointType,
dyn_string &  exceptionInfo 
)
gets the properties (DPEs) to be saved, according to the current recipeType
Parameters
dataPointTypethe data point type for which properties are queried
exceptionInfostandard exception handling variable
Returns
the list of data point elements for specified dataPointType
dyn_string fwConfigurationDB_getRTAlerts ( string  dataPointType,
dyn_string &  exceptionInfo 
)
gets the properties (DPEs) for which alert settings shoul be saved, according to the current recipeType
Parameters
dataPointTypethe data point type for which properties are queried
exceptionInfostandard exception handling variable
Returns
the list of data point elements for specified dataPointType
bool _fwConfigurationDB_HandleMissingRT ( string  dataPoint,
string  dpType,
dyn_string &  exceptionInfo 
)
Handles the situation where the Recipe Type is missing

This function handles the situation when missing Recipe Type data for some device type is encountered, which is signaled by the fwConfigurationDB_ERROR_NoValuesDataInRT exception.

It displays the dialog that allows to edit the properties to be stored, etc.

Parameters
dataPointthe name of the data point that causes the problem
dpTypethe data point type for dataPoint
exceptionInfostandard exception handling variable
Returns
FALSE if the situation could not be recovered (i.e. user cancelled the dialog), TRUE otherwise.
void _fwConfigurationDB_ClearRecipeObject ( dyn_dyn_mixed &  recipeObject)
Returns an empty recipe object.

This function creates (or clears) the variable passed as the argument, and sets its structure appropriately, so all the columns are defined.

  • recipeObject the recipe object variable to be (re-)initialized.
void fwConfigurationDB_adoptRecipeObjectToSystem ( dyn_dyn_mixed &  recipeObject,
string  systemName,
dyn_string &  exceptionInfo 
)

Adjusts the recipe data to be applicable to specified system

The function allows to post-process the data in the recipeObject param so that the system names in all referred datapoint names are replaced with the provided systemName.

This way, one may use a recipe saved on a system with different name, on a different system. For instance, a recipe might have been prepared using a lab system, and saved into DB, and then it may need to be used on the production system which holds a different name.

Reviewed:
2018-06-22 API
bool fwConfigurationDB_compareRecipes ( dyn_dyn_mixed  recipeObject1,
dyn_dyn_mixed  recipeObject2,
dyn_dyn_mixed &  diffRecipeObject,
string  hierarchyType,
dyn_string &  exceptionInfo 
)
Produces differential recipe

This function compares two recipeObject's and creates a recipe which contains differences between them. The differences are calculated in the (recipe2 - recipe1) manner, i.e.:

  • the diffRecipe will contain all items that differ between recipe2 and recipe1. The values from recipe2 will be used
  • the diffRecipe will contain all items that are present in recipe2 and not present in recipe1
  • the diffRecipw will NOT contain the items that are present in recipe1 and not present in recipe2
Parameters
recipeObject1- first of the compared recipe objects
recipeObject2- second of the compared recipe objects
diffRecipeObject- on return will contain the difference between the two recipes
exceptionInfo- standard exception handling variable.
hierarchyType- dummy now
Returns
TRUE if recipes differ, FALSE if they are the same
int fwConfigurationDB_getRecipeMetaInfo ( dyn_dyn_mixed &  recipeObject,
int  idx,
mixed &  info,
dyn_string &  exceptionInfo 
)
Return values
0if recipe comment was present in the recipeObject
1if meta information was not present in the recipeObject
-1if recipeObject structure was incorrect...
-2if data idx was wrong
void fwConfigurationDB_extractSettingFromRecipe ( dyn_dyn_mixed  recipeObject,
dyn_string &  deviceElements,
dyn_mixed &  values,
dyn_mixed &  exceptionInfo 
)
Extracts value(s) from a recipe

The function extracts a value ("setting") from an exising recipe, for a set of dp-elements.

Parameters
[in]recipeObjectcontains the recipe data, from which the values are to be extracted
[in,out]deviceElementson entry, it should contain the list of dp-elements for which the values are queried; note that these deviceElemets may contain wildcard characters, so that, for instance, all elements for a device could be specified, without actually naming them explicitely, or a list of devices matching some naming convention may be specified. Note that if element is not specified (i.e. only the dp name is passed, not followed by a dot and the element name, all elements for matching device will be returned as well.
on exit, the original contents will be replaced by the expanded list of identified data point elements, for which the corresponding settings will be stored in the settings parameter.
[out]settingson return i'th row will contain the settings (values) for i'th deviceElement of deviceElements
[in]exceptionInfostandard exception handling variable

Example: extract all settings for a device with alias "myDevice", that are stored in a recipeObject. Note that alias "myDevice" is not resolved to hardware name, but kept as is in the name (unlike when reading directly from the recipeObject's column fwConfigurationDB_RO_DPE_NAME)

dyn_string deviceElements=makeDynString("myDevice.*");
dyn_string exceptionInfo;
dyn_mixed values;
fwConfigurationDB_extractSettingFromRecipe(deviceElements, values, exceptionInfo);
// on return one would get a data such as
// deviceElements[1]="myDevice.settings.v0"; settings[1]=10.0;
// deviceElements[2]="myDevice.settings.i0"; settings[2]=20.0;
// deviceElements[3]="myDevice.commands.OnOff"; settings[3]=30.0;

Example: extract the voltages for all channels in board01 and board13 of crate1 and board05 of crate2. Note the use of wildcard characters: "*" replacing any part of name, "?" replacing one character, and "[,]" specifying a set of values.

dyn_string deviceElements;
dyn_string exceptionInfo;
dyn_mixed values;
deviceElements[1] = "dist_1:CAEN/crate1/board[01,13]/channel*.settings.v?";
deviceElements[2] = "dist_1:CAEN/crate2/board05/channel*.settings.v?";
fwConfigurationDB_extractSettingFromRecipe(deviceElements, values, exceptionInfo);
// on return one would get a data such as
// deviceElements[1] = "dist_1:CAEN/crate1/board01/channel001.settings.v0"; settings[1] =10.0;
// deviceElements[2] = "dist_1:CAEN/crate1/board01/channel001.settings.v0"; settings[2] =20.0;
// deviceElements[3] = "dist_1:CAEN/crate1/board01/channel002.settings.v0"; settings[3] =10.0;
// deviceElements[4] = "dist_1:CAEN/crate1/board01/channel002.settings.v0"; settings[4] =20.0;
// ...
// deviceElements[n-1]= "dist_1:CAEN/crate1/board13/channel005.settings.v0"; settings[n-1]=90.0;
// deviceElements[n] = "dist_1:CAEN/crate1/board13/channel006.settings.v0"; settings[n] =90.0;
// ...
// deviceElements[k-1]= "dist_1:CAEN/crate2/board05/channel005.settings.v0"; settings[k-1]=90.0;
// deviceElements[k] = "dist_1:CAEN/crate2/board05/channel006.settings.v0"; settings[k] =99.0;
// ... etc
Reviewed:
2018-06-22 API
string _fwConfigurationDB_getRecipeClassDP ( string  className,
bool &  exists,
dyn_string &  exceptionInfo 
)

Returns the DPName of a DP that holds the recipe class definition, checks if it exists, and checks if remote system is available as well

Parameters
className[IN] the name of the recipe class; could be specified as a recipe class in a remote system, by prefixing the name of the class with system name and colon, e.g. "RemoteSys1:MyRecipeClass"
exists[IN,OUT] defined how the check/handling for non-existing recipe classes is handled. when TRUE on input and the recipe class does not exist, an error is dropped into exceptionInfo when FALSE on input, then no error is generated; in any case, on return the variable will tell whether recipe class exists or not.
exceptionInfo[OUT] standard exception handling variables
Returns
the name of the datapoint.
void fwConfigurationDB_createRecipeClass ( string  recipeClass,
string  recipeType,
string  description,
bool  editable,
dyn_string  elements,
dyn_string &  exceptionInfo 
)

Creates a new recipe class.

Parameters
recipeClass- [IN] Name of the new recipe class.(could be remote!)
recipeType- [IN] Name of the recipe type used by the new recipe class.
description- [IN] Comment for the new recipe class.
editable- [IN] "editable" flag for the new recipe class
elements- [IN] the list of device elements or devices (hardware, logical)
exceptionInfo- [OUT] Standard exception handling variable.
void fwConfigurationDB_deleteRecipeClass ( string  recipeClass,
bool  deleteRecipes,
dyn_string &  exceptionInfo 
)

Deletes a recipe class

Parameters
recipeClass- [IN] Name of the recipe class to be deleted.
deleteRecipes- [IN] If set to TRUE, all the recipes (instances) belonging to this class will also be deleted from recipe caches; deleting from the DB needs to be done separately!
exceptionInfo- [OUT] Standard exception handling variable.
void fwConfigurationDB_instantiateRecipeOfClass ( string  recipeName,
string  className,
dyn_string &  exceptionInfo 
)

Creates a new instance of recipe class, with current only values and saves it in a cache

Note that the recipe cache that is created will be of form RecipeClass/RecipeName

Parameters
recipeNamethe name for the new recipe instance; may be prepended by system name and colon to create the instance on the remote system (e.g. dist_2:MyRecipe)
classNamethe name of recipe class
exceptionInfostandard exception handling variable
void fwConfigurationDB_deleteRecipeOfClass ( string  recipeName,
string  className,
dyn_string &  exceptionInfo 
)

Deletes an instance of recipe class

dyn_string fwConfigurationDB_getRecipeClassInstances ( string  recipeClass,
bool  scanAll,
dyn_string &  exceptionInfo 
)

Gets the list of instances of a recipe class.

Parameters
recipeClass- [IN] Recipe class name.
scanAll- [IN], if set to TRUE, the function will scan all the recipe caches (on the local system) to see if their "recipe class" match, and return the available ones; otherwise it will return the "official" list that is declared in the recipeClass
exceptionInfo- [OUT] Standard exception handling variable.
Returns
List containing the name of the recipe class instances.
void fwConfigurationDB_getRecipeClasses ( dyn_string &  recipeClassNames,
dyn_string &  recipeClassComments,
dyn_string &  exceptionInfo,
string  systemName = "" 
)

Gets the list of recipe classes and their comments.

Parameters
recipeClassNames- [OUT] List containing the recipe class names.
recipeClassComments- [OUT] List containing the recipe class comments.
exceptionInfo- [OUT] Standard exception handling variable.
systemName- [IN] System name where to look for the recipe classes. By default it will look in the local system; passing "*:" as the argument will cause a lookup in all the systems.
void fwConfigurationDB_modifyRecipeClass ( string  recipeClass,
dyn_string  newDeviceList,
string  newRecipeType,
string  newDescription,
dyn_string &  exceptionInfo,
bool  updateInstances = TRUE 
)

Modify recipe class

This functions modifies the recipe class: based on the list of devices and recipe type, it re-calculates the list of dp elements, and does some sanity checks.

Parameters
recipeClassthe name of the class
newDeviceListthe list of devices; their types are checked for compatibility with recipeType; note that a mixture of LOGICAL ("alias") and HARDWARE ("datapoints") may be specified; note also that you could specify device elements (rather than devices); in such case they are not checked against recipeType, and they are only checked if they exist; for instance one may pass: makeDynString("PUMP1","dist_1:Pumps/PumpAAA0002","ENGINE.settings.speed"); which contains a LOGICAL device name, then a hardware device name, then a complete device element (with device being specified through alias); for the first two, the expansion of devices to elements according to recipe type will be performed.
newRecipeTypethe new recipe type; empty string means keep the existing recipe type
newDescriptionthe new description text
exceptionInfostandard exception handling variable
updateInstances(optional, default TRUE) - update all the instances of the recipes of this class, so that they have an up-to-date list of elements.
void _fwConfigurationDB_updateRecipeClass ( string  recipeClass,
dyn_mixed  recipeClassInfo,
dyn_string &  exceptionInfo,
bool  updateInstances = TRUE 
)

Internal function to modify recipe class: does not check the content passed in recipeClassInfo

void _fwConfigurationDB_activateRecipeUpdateMetaInfo ( dyn_dyn_mixed &  recipeObject,
dyn_string &  exceptionInfo 
)

Internal function updates various meta info (of recipe instance, of a class), when recipe gets activated.

Variable Documentation

global string fwConfigurationDB_defaultRecipeMergeMode ="ELEMENT"

Determines the default mode for recipe merge...

  • "DEVICE" - for device that is in both recipeObjects, all the elements from recipeObject2 are taken, and nothing from recipeObject1 *li "ELEMENT" - for device that is in both recipeObjects, all the elements from both recipeObject are used, and when the elements are in both then the settiings from recipeObject2 are taken
    See Also
    fwConfigurationDB_combineRecipes
global int fwConfigurationDB_handleMissingDevices =4

Determines how to handle non-existing devices in recipes

  • 0 report exception and abort execution
  • 1 ignore missing devices silently (don't include them in recipeObject)
  • 2 ignore missing devices and put a WARNING message in the log (don't include them in recipeObject)
  • 3 load unresolved devices silently (devices will be skipped silently when applying recipe)
  • 4 load unresolved devices and put a INFO message in the log (devices will be skipped silently when applying recipe)
fwConfigurationDB_ERROR_CantLoadPartOfRecipeType = -51

part of specified recipe type (refering to some device type) cannot be loaded (warning)

This a warning (i.e. processing is not aborted); a part of recipe type could not be retrieved, either because corresponding data point does not exist, or it exists, but the data cannot be loaded. This usually means that the recipe type should be re-viewed/edited in the fwConfigurationDB/EditRecipeType panel.

fwConfigurationDB_ERROR_NoAlertsDataInRT = -53

in the current recipe, there is no information about alerts to be stored for queried DPT (warning)

fwConfigurationDB_ERROR_NoRecipeType = -103

specified recipe type does not exist (critical)

fwConfigurationDB_ERROR_CantLoadRecipeType = -104

specified recipe type cannot be loaded (critical)

fwConfigurationDB_ERROR_InvalidDataPointName = -105

invalid data point name specified

fwConfigurationDB_ERROR_StoreRecipeDataToCache = -106

cannot store recipe data in recipe cache

fwConfigurationDB_ERROR_NoRecipeCache = -107

recipe cache does not exist

fwConfigurationDB_ERROR_GetRecipeFromCache = -108

error getting recipe data from the cache

fwConfigurationDB_ERROR_CreateRecipeCache = -109

error while creating recipe cache datapoint

fwConfigurationDB_ERROR_RecipeCacheExists = -110

recipe cache with the same name already exists

fwConfigurationDB_ERROR_DPENotInRecipe = -111

specified DPE is not defined in the recipe...