LIBRARY: unRecipeDbFunctions.ctl | |
Creation Date: September 2014 version 1.4.0 Modification History: 09/09/2014: Ivan
External Functions: Internal Functions: | |
global bool | g_bCancelSaveRecipeToDb |
global bool | g_bSaveRecipeToDbFinished |
global dyn_string | g_dsLockedDevicesBySaveToDb |
global bool | g_bCloseProgressDialog |
global dyn_int | g_iProgressOperationIds |
global int | g_iCurrentOperation |
global dyn_string | g_dsProgressOperationNames |
global mapping | g_mProgressOperationStatus |
global float | g_fProgressValue |
const int | PROGRESS_OPERATION_ON_PROGRESS = 0 |
const int | PROGRESS_OPERATION_COMPLETED = 1 |
const int | PROGRESS_OPERATION_FAILED = -1 |
const int | PROGRESS_OPERATION_SKIPPED = -2 |
const int | DB_SAVE_RCP_CLASS_SAVED = 1 |
const int | DB_SAVE_RCP_INSTANCE_SAVED = 2 |
const int | DB_SAVE_RCP_CLASS_AND_INSTANCES_COMPLETED = 3 |
const int | DB_SAVE_ERROR_CANNOT_LOCK_CLASS = -1 |
const int | DB_SAVE_ERROR_CANNOT_LOCK_INSTANCE = -2 |
const int | DB_SAVE_ERROR_BAD_RCP_CLASS_STATE = -3 |
const int | DB_SAVE_ERROR_BAD_RCP_INSTANCE_STATE = -4 |
const int | DB_SAVE_ERROR_CANNOT_LOAD_INSTANCE = -5 |
const int | DB_SAVE_ERROR_CANNOT_SAVE_CLASS = -6 |
const int | DB_SAVE_ERROR_CANNOT_SAVE_INSTANCE = -7 |
const int | DB_SAVE_ERROR_CANNOT_RESET_INSTANCE = -8 |
const int | DB_SAVE_SKIP_RCP_INSTANCE = -9 |
const string | RCP_CLASS_INTERNAL_SUFFIX = ".internalClass" |
const string | RCP_INST_INTERNAL_SUFFIX = ".internalInstance" |
const int | RCP_CLASS_INTERNAL_DESC = 1 |
const int | RCP_CLASS_INTERNAL_EDITABLE = 2 |
const int | RCP_CLASS_INTERNAL_ELEMENTS = 3 |
const int | RCP_CLASS_INTERNAL_TYPE = 4 |
const int | RCP_CLASS_INTERNAL_DEVICE_ORDER = 5 |
const int | RCP_CLASS_INTERNAL_ACDOMAIN = 6 |
const int | RCP_CLASS_INTERNAL_ADMIN = 7 |
const int | RCP_CLASS_INTERNAL_EXPERT = 8 |
const int | RCP_CLASS_INTERNAL_OPERATOR = 9 |
const int | RCP_CLASS_INTERNAL_DEVICE_LINK = 10 |
const int | RCP_INST_INTERNAL_INITIAL = 1 |
const int | RCP_INST_INTERNAL_DESC = 2 |
const int | RCP_INST_INTERNAL_ACDOMAIN = 3 |
const int | RCP_INST_INTERNAL_ADMIN = 4 |
const int | RCP_INST_INTERNAL_EXPERT = 5 |
const int | RCP_INST_INTERNAL_OPERATOR = 6 |
void | unRecipeFunctions_displayDbValues (string sRecipeDpName, time validAt, dyn_string &exceptionInfo) |
void | unRecipeDbFunctions_getRecipeInstanceDbValues (string sRcpDp, dyn_string &dsDpNames, dyn_anytype &daFormattedValues, time validAt, dyn_string &exceptionInfo) |
void | unRecipeFunctions_saveRecipeToDb (string sRecipeDp, dyn_string &exceptionInfo) |
bool | _unRecipeFunctions_getRecipeClassData (string sRecipeDp, string &sRcpClassName, string &sRcpClassDp, bool &bDpIsRcpClass) |
bool | _unRecipeFunctions_getSaveOperationIds (dyn_string dsRcpClassDps, dyn_int &diOperationIds, dyn_string &dsOperationNames, dyn_string &exceptionInfo) |
void | _unRecipeFunctions_saveRecipeClassesToDb (dyn_string dsRcpClassDps, dyn_string dsRcpClassNames, string sComment) |
void | unRecipeFunctions_cancelSaveRecipeToDb () synchronized(g_bCancelSaveRecipeToDb) |
void | _unRecipeFunctions_removeLockedDeviceBySaveToDb (string sDeviceDp) |
void | unRecipeFunctions_unlockDevicesLockedBySaveToDb () |
void | _unRecipeFunctions_saveRecipeClassAndInstancesToDb (string sRcpClassDp, string sRcpClassName, string sComment, dyn_string dsRcpDbList) |
void | _unRecipeFunctions_skipSaveRecipeInstancesToDb (string sClassName, dyn_string dsInstanceNames, dyn_string dsInstanceDps) |
bool | _unRecipeFunctions_saveRecipeClassToDb (string sRcpClassDp, string sRcpClassName, dyn_string dsRcpDbList) |
bool | _unRecipeFunctions_saveRecipeInstanceToDb (string sRcpDp, string sRcpClassName, string sRcpInstName, string sComment, dyn_string dsRcpDbList) |
bool | _unRecipeFunctions_saveRecipeClassInternalToDb (string sClassDp, string sClassName, dyn_string dsRcpDbList, dyn_string &exceptionInfo) |
bool | _unRecipeFunctions_saveRecipeInstanceInternalToDb (string sRcpDp, string sRcpName, dyn_string dsRcpDbList, dyn_string &exceptionInfo) |
bool | _unRecipeFunctions_saveInternalRecipeToDb (string sInternalRcpName, string sDomainNature, dyn_string dsDeviceElements, dyn_string dsRcpDbList, dyn_string &exceptionInfo) |
int | _unRecipeFunctions_saveRecipeToDb (dyn_dyn_mixed recipeObject, string hierarchyType, string recipeName, dyn_string &exceptionInfo, string versionDescription="", bool autoSaveDevices=FALSE, bool updateDevices=FALSE) |
void | _unRecipeFunctions_createRecipeClassFromDbInternal (string sSystemName, string sClassName, dyn_string &exceptionInfo) |
void | _unRecipeDbFunctions_getRecipeClassObjectFromDbInternal (string sRcpClassDp, dyn_mixed &recipeClassObject, dyn_string &exceptionInfo) |
void | _unRecipeFunctions_createRecipeInstanceFromDbInternal (string sSystemName, string sClassName, string sInstName, dyn_string &exceptionInfo) |
void | unRecipeFunctions_loadRecipeClassInstancesFromDb (string sRcpClassDp, time tValidAt=0) |
public void | unRecipeFunctions_loadRecipeMetadataFromDb (string sRcpDp, string &lastSavedBy, string &lastSavedTime) |
void | unRecipeFunctions_loadRecipesFromDb (dyn_string dsSelectedRecipes, time tValidAt=0) |
bool | _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb (string sSystemName, string sRcpClassName, dyn_dyn_mixed &recipeObject) |
bool | _unRecipeFunctions_getExistingInstanceOrCreateNewInstanceFromDb (string sSystemName, string sRcpClassName, string sRcpInstanceName, dyn_dyn_mixed &recipeObject) |
void | _unRecipeFunctions_finalizeSaveRecipeToDb (int iCode, string sDeviceName, string sDeviceDp, string sState, dyn_string &exceptionInfo) |
void | _unRecipeFunctions_printDbSaveMessage (int iCode, string sDeviceName, string sState, dyn_string exceptionInfo) |
void | unRecipeFunctions_saveRecipesToDb (dyn_string dsRcpDps, string sComment) |
void | _unRecipeFunctions_getRecipeClassList (dyn_string dsRcpDps, dyn_string &dsRcpClassDps, dyn_string &dsRcpClassNames) |
bool | _unRecipeFunctions_saveRecipeObjectToDb (dyn_dyn_mixed recipeObject, string sComment, dyn_string &exceptionInfo) |
bool | unRecipeFunctions_getRecipeInstancesFromDatabase (dyn_string &dsRcpInstanceNames, dyn_string &exceptionInfo) |
void | unRecipeFunctions_deleteRecipeInstancesFromDb (dyn_string dsRecipeNames) |
void | _unRecipeFunctions_dropRecipeInDb (string sRecipeName, bool bShowMessage=TRUE) |
void | _unRecipeFunctions_openProgressDialog (dyn_int diOperationIds, dyn_string dsOperationNames) |
void | _unRecipeFunctions_startProgressDialog () |
void | _unRecipeFunctions_closeProgressDialog () |
string | _unRecipeFunctions_getCurrentOperationId () |
void | _unRecipeFunctions_setOperationStatus (int status, int iOperationId, string sOperationName) |
UNICOS Copyright (C) CERN 2014 All rights reserved
void unRecipeFunctions_displayDbValues | ( | string | sRecipeDpName, | |
time | validAt, | |||
dyn_string & | exceptionInfo | |||
) |
Load the recipe values from the database in the recipe instance panel.
sRecipeDpName | - [IN] String containing the recipe instance DP name. | |
validAt | - [IN] The recipe values are requested for the specified time in the database. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_checkRecipeValues(), _unRecipeFunctions_editRecipeValuesAndShowDifferences(), _unRecipeFunctions_printDeviceList(), _unRecipeFunctions_writeInRecipeLog(), unRecipeDbFunctions_getRecipeInstanceDbValues(), and unRecipeFunctions_compareListElements().
void unRecipeDbFunctions_getRecipeInstanceDbValues | ( | string | sRcpDp, | |
dyn_string & | dsDpNames, | |||
dyn_anytype & | daFormattedValues, | |||
time | validAt, | |||
dyn_string & | exceptionInfo | |||
) |
Get the database values of a recipe instance.
sRcpDp | - [IN] DP Names of the recipe instance. | |
dsDpNames | - [OUT] DP Names of the recipe elements. | |
daFormattedValues | - [OUT] Online formatted values corresponding to the recipe class DPEs. | |
validAt | - [IN] The recipe values are requested for the specified time in the database. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_formatValues(), _unRecipeFunctions_normalizeDp(), and _unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_displayDbValues().
void unRecipeFunctions_saveRecipeToDb | ( | string | sRecipeDp, | |
dyn_string & | exceptionInfo | |||
) |
Save a recipe class and all its instances to the database. The function is called from the recipe class/instance panel when the 'Save to DB ...' button is pressed.
sRecipeDp | - [IN] The DP of the recipe instance. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_getRecipeClassData(), _unRecipeFunctions_getSaveOperationIds(), _unRecipeFunctions_isRecipeClassDefinitionValid(), _unRecipeFunctions_loadHistoryTableInfo(), _unRecipeFunctions_normalizeDp(), _unRecipeFunctions_saveRecipeClassesToDb(), _unRecipeFunctions_writeInRecipeLog(), and unRecipeFunctions_saveRecipeInstance().
bool _unRecipeFunctions_getRecipeClassData | ( | string | sRecipeDp, | |
string & | sRcpClassName, | |||
string & | sRcpClassDp, | |||
bool & | bDpIsRcpClass | |||
) |
Get the recipe class data from a datapoint (recipe class/recipe instance).
sRecipeDp | - [IN] Datapoint element of a recipe class or recipe instance. | |
sRcpClassName | - [OUT] Recipe class name associated to the sRecipeDp parameter. | |
sRcpClassDp | - [OUT] Recipe class datapoint associated to the sRecipeDp parameter. | |
bDpIsRcpClass | - [OUT] TRUE if the sRecipeDp belongs to a recipe class, otherwise FALSE. |
References _unRecipeFunctions_getRecipeClassDataFromInstance(), and _unRecipeFunctions_normalizeDp().
Referenced by unRecipeFunctions_saveRecipeToDb().
bool _unRecipeFunctions_getSaveOperationIds | ( | dyn_string | dsRcpClassDps, | |
dyn_int & | diOperationIds, | |||
dyn_string & | dsOperationNames, | |||
dyn_string & | exceptionInfo | |||
) |
Get the operation IDs and names for the progress dialog when a recipe class (and all its instances) will be saved.
dsRcpClassDps | - [IN] DPEs of the recipe classes to save in the database. | |
diOperationIds | - [OUT] List of operation IDs for the progress dialog. | |
dsOperationNames | - [OUT] List of operation names for the progress dialog. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_getRecipeInstancesOfClass(), and _unRecipeFunctions_normalizeDp().
Referenced by unRecipeFunctions_saveRecipesToDb(), and unRecipeFunctions_saveRecipeToDb().
void _unRecipeFunctions_saveRecipeClassesToDb | ( | dyn_string | dsRcpClassDps, | |
dyn_string | dsRcpClassNames, | |||
string | sComment | |||
) |
Save a list of recipe classes to the ORACLE database.
dsRcpClassDps | - [IN] Recipe class DP names. | |
dsRcpClassNames | - [IN] Recipe class names. | |
sComment | - [IN] Comment for the DB history. |
References _unRecipeFunctions_saveRecipeClassAndInstancesToDb(), and _unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_saveRecipesToDb(), and unRecipeFunctions_saveRecipeToDb().
void unRecipeFunctions_cancelSaveRecipeToDb | ( | ) |
Trigger the cancel of a save to db operation.
References _unRecipeFunctions_writeInRecipeLog().
void _unRecipeFunctions_removeLockedDeviceBySaveToDb | ( | string | sDeviceDp | ) |
Remove a device from the list of locked devices by a save to db operation.
sDeviceDp | - [IN] The DP name of the device. |
Referenced by _unRecipeFunctions_finalizeSaveRecipeToDb().
void unRecipeFunctions_unlockDevicesLockedBySaveToDb | ( | ) |
Unlock the devices currently locked by a save to db operation.
References unRecipeFunctions_dpMultiSet().
void _unRecipeFunctions_saveRecipeClassAndInstancesToDb | ( | string | sRcpClassDp, | |
string | sRcpClassName, | |||
string | sComment, | |||
dyn_string | dsRcpDbList | |||
) |
Save a recipe class and all its instances to the ORACLE database.
sRcpClassDp | - [IN] Recipe class DP name. | |
sRcpClassName | - [IN] Recipe class name. | |
sComment | - [IN] Comment for the DB history. | |
dsRcpDbList | - [IN] List of recipes saved in the ORACLE database. |
References _unRecipeFunctions_finalizeSaveRecipeToDb(), _unRecipeFunctions_getRecipeInstancesOfClass(), _unRecipeFunctions_normalizeDp(), _unRecipeFunctions_saveRecipeClassToDb(), _unRecipeFunctions_saveRecipeInstanceToDb(), and _unRecipeFunctions_skipSaveRecipeInstancesToDb().
Referenced by _unRecipeFunctions_saveRecipeClassesToDb().
void _unRecipeFunctions_skipSaveRecipeInstancesToDb | ( | string | sClassName, | |
dyn_string | dsInstanceNames, | |||
dyn_string | dsInstanceDps | |||
) |
Skip saving the recipe instances after a failure saving the recipe class.
sClassName | - [IN] Recipe class name. | |
dsInstanceNames | - [IN] Recipe instance names. | |
dsInstanceDps | - [IN] Recipe instance datapoint names. |
References _unRecipeFunctions_finalizeSaveRecipeToDb().
Referenced by _unRecipeFunctions_saveRecipeClassAndInstancesToDb().
bool _unRecipeFunctions_saveRecipeClassToDb | ( | string | sRcpClassDp, | |
string | sRcpClassName, | |||
dyn_string | dsRcpDbList | |||
) |
Internal function to save a recipe class to the ORACLE database.
sRcpClassDp | - [IN] Datapoint name of the recipe class. | |
sRcpClassName | - [IN] Recipe class name. | |
dsRcpDbList | - [IN] List of recipes saved in the database. |
References _unRecipeFunctions_finalizeSaveRecipeToDb(), _unRecipeFunctions_lockDevices(), _unRecipeFunctions_saveRecipeClassInternalToDb(), and _unRecipeFunctions_writeInRecipeLog().
Referenced by _unRecipeFunctions_saveRecipeClassAndInstancesToDb().
bool _unRecipeFunctions_saveRecipeInstanceToDb | ( | string | sRcpDp, | |
string | sRcpClassName, | |||
string | sRcpInstName, | |||
string | sComment, | |||
dyn_string | dsRcpDbList | |||
) |
Internal function to save a recipe instance to the ORACLE database.
sRcpDp | - [IN] Datapoint name of the recipe instance. | |
sRcpClassName | - [IN] Recipe class name. | |
sRcpInstName | - [IN] Recipe instance name. | |
sComment | - [IN] Comment for the DB history. | |
dsRcpDbList | - [IN] List of recipes already saved in the ORACLE database. |
References _unRecipeFunctions_finalizeSaveRecipeToDb(), _unRecipeFunctions_getRecipeObjectFromDp(), _unRecipeFunctions_lockDevices(), _unRecipeFunctions_saveRecipeInstanceInternalToDb(), and _unRecipeFunctions_saveRecipeObjectToDb().
Referenced by _unRecipeFunctions_saveRecipeClassAndInstancesToDb().
bool _unRecipeFunctions_saveRecipeClassInternalToDb | ( | string | sClassDp, | |
string | sClassName, | |||
dyn_string | dsRcpDbList, | |||
dyn_string & | exceptionInfo | |||
) |
Create an internal recipe from the recipe class. This recipe contains required DPEs from the recipe class definition.
sClassDp | - [IN] Datapoint name of the recipe class. | |
sClassName | - [IN] Recipe class name. | |
dsRcpDbList | - [IN] List of recipes available in the Oracle database. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_saveInternalRecipeToDb().
Referenced by _unRecipeFunctions_saveRecipeClassToDb().
bool _unRecipeFunctions_saveRecipeInstanceInternalToDb | ( | string | sRcpDp, | |
string | sRcpName, | |||
dyn_string | dsRcpDbList, | |||
dyn_string & | exceptionInfo | |||
) |
Create an internal recipe from the recipe instance. This recipe contains required DPEs from the recipe instance definition.
sRcpDp | - [IN] Datapoint name of the recipe instance. | |
sRcpName | - [IN] Recipe instance name. | |
dsRcpDbList | - [IN] List of recipes available in the Oracle database. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_saveInternalRecipeToDb().
Referenced by _unRecipeFunctions_saveRecipeInstanceToDb().
bool _unRecipeFunctions_saveInternalRecipeToDb | ( | string | sInternalRcpName, | |
string | sDomainNature, | |||
dyn_string | dsDeviceElements, | |||
dyn_string | dsRcpDbList, | |||
dyn_string & | exceptionInfo | |||
) |
Creates and saves an internal recipe to the Oracle database.
sInternalRcpName | - [IN] Name of the internal recipe. | |
sDomainNature | - [IN] Domain and nature of the recipe. | |
dsDeviceElements | - [IN] List of devices to include in the recipe. | |
dsRcpDbList | - [IN] List of recipes available in the Oracle database. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_saveRecipeToDb().
Referenced by _unRecipeFunctions_saveRecipeClassInternalToDb(), and _unRecipeFunctions_saveRecipeInstanceInternalToDb().
int _unRecipeFunctions_saveRecipeToDb | ( | dyn_dyn_mixed | recipeObject, | |
string | hierarchyType, | |||
string | recipeName, | |||
dyn_string & | exceptionInfo, | |||
string | versionDescription = "" , |
|||
bool | autoSaveDevices = FALSE , |
|||
bool | updateDevices = FALSE | |||
) |
TODO: This function is used to replace fwConfigurationDB_saveRecipeToDB and be able to update the devices in the call to _fwConfigurationDB_saveItemsToDB
Referenced by _unRecipeFunctions_saveInternalRecipeToDb().
void _unRecipeFunctions_createRecipeClassFromDbInternal | ( | string | sSystemName, | |
string | sClassName, | |||
dyn_string & | exceptionInfo | |||
) |
Create a recipe class in the system from an internal recipe class saved in the Oracle database.
sSystemName | - [IN] System name. | |
sClassName | - [IN] Name of the recipe class to create. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_createRecipeClass().
Referenced by _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb().
void _unRecipeFunctions_createRecipeInstanceFromDbInternal | ( | string | sSystemName, | |
string | sClassName, | |||
string | sInstName, | |||
dyn_string & | exceptionInfo | |||
) |
Create a recipe instance in the system from an internal recipe instance saved in the Oracle database.
sSystemName | - [IN] System name. | |
sClassName | - [IN] Name of the recipe class. | |
sInstName | - [IN] Name of the recipe instance. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_createRecipeInstance(), _unRecipeFunctions_hasInitialRecipe(), and _unRecipeFunctions_writeInRecipeLog().
Referenced by _unRecipeFunctions_getExistingInstanceOrCreateNewInstanceFromDb().
void unRecipeFunctions_loadRecipeClassInstancesFromDb | ( | string | sRcpClassDp, | |
time | tValidAt = 0 | |||
) |
Load the instances of a recipe class from the ORACLE database.
sRcpClassDp | - [IN] Datapoint name of the recipe class. | |
tValidAt | - [IN] Time when the recipe was valid. |
References _unRecipeFunctions_getRecipeInstancesOfClass(), and unRecipeFunctions_loadRecipesFromDb().
void unRecipeFunctions_loadRecipesFromDb | ( | dyn_string | dsSelectedRecipes, | |
time | tValidAt = 0 | |||
) |
Load a list of recipe instances from the Oracle database. If the recipe class or recipe instance don't exist in the system they will be created.
dsSelectedRecipes | - [IN] List of recipes to load from the Oracle database. | |
tValidAt | - [IN] Time when the recipes were valid. |
References _unRecipeFunctions_checkRecipeValues(), _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb(), _unRecipeFunctions_getExistingInstanceOrCreateNewInstanceFromDb(), and _unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_loadRecipeClassInstancesFromDb().
bool _unRecipeFunctions_getExistingClassOrCreateNewClassFromDb | ( | string | sSystemName, | |
string | sRcpClassName, | |||
dyn_dyn_mixed & | recipeObject | |||
) |
Internal function to load the recipe class data or to create a new recipe class if it doesn't exist.
sSystemName | - [IN] System name. | |
sRcpClassName | - [IN] Recipe class name. | |
recipeObject | - [OUT] Recipe class data. |
References _unRecipeFunctions_createRecipeClassFromDbInternal(), _unRecipeFunctions_writeInRecipeLog(), unRecipeFunctions_getRecipeClasses(), and unRecipeFunctions_getRecipeClassObject().
Referenced by unRecipeFunctions_loadRecipesFromDb().
bool _unRecipeFunctions_getExistingInstanceOrCreateNewInstanceFromDb | ( | string | sSystemName, | |
string | sRcpClassName, | |||
string | sRcpInstanceName, | |||
dyn_dyn_mixed & | recipeObject | |||
) |
Internal function to load the recipe instance data or to create a new recipe instance if it doesn't exist.
sSystemName | - [IN] System name. | |
sRcpClassName | - [IN] Recipe class name. | |
sRcpInstanceName | - [IN] Recipe instance name. | |
recipeObject | - [OUT] Recipe instance data. |
References _unRecipeFunctions_createRecipeInstanceFromDbInternal(), _unRecipeFunctions_hasRecipeInstance(), and _unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_loadRecipesFromDb().
void _unRecipeFunctions_finalizeSaveRecipeToDb | ( | int | iCode, | |
string | sDeviceName, | |||
string | sDeviceDp, | |||
string | sState, | |||
dyn_string & | exceptionInfo | |||
) |
Finalize the operation of saving a recipe device to the Oracle database.
iCode | - [IN] Return code of the save operation. | |
sDeviceName | - [IN] Name of the recipe device saved to the database. | |
sDeviceDp | - [IN] Datapoint name of the recipe device saved to the database. | |
sState | - [IN] State of the recipe device. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_printDbSaveMessage(), _unRecipeFunctions_removeLockedDeviceBySaveToDb(), and _unRecipeFunctions_unlockDevices().
Referenced by _unRecipeFunctions_saveRecipeClassAndInstancesToDb(), _unRecipeFunctions_saveRecipeClassToDb(), _unRecipeFunctions_saveRecipeInstanceToDb(), and _unRecipeFunctions_skipSaveRecipeInstancesToDb().
void _unRecipeFunctions_printDbSaveMessage | ( | int | iCode, | |
string | sDeviceName, | |||
string | sState, | |||
dyn_string | exceptionInfo | |||
) |
Print a message in the recipe log window after trying to save a recipe in the Oracle database.
iCode | - [IN] Return code of the save operation. | |
sDeviceName | - [IN] Name of the recipe device saved to the database. | |
sState | - [IN] State of the recipe device. | |
exceptionInfo | - [IN] Standard exception handling variable. |
References _unRecipeFunctions_writeInRecipeLog().
Referenced by _unRecipeFunctions_finalizeSaveRecipeToDb().
void unRecipeFunctions_saveRecipesToDb | ( | dyn_string | dsRcpDps, | |
string | sComment | |||
) |
Save a list of recipes to the database.
dsRcpDps | - [IN] List of recipe DPs to save to the database. | |
sComment | - [IN] Comment for the DB history. |
References _unRecipeFunctions_getRecipeClassList(), _unRecipeFunctions_getSaveOperationIds(), and _unRecipeFunctions_saveRecipeClassesToDb().
void _unRecipeFunctions_getRecipeClassList | ( | dyn_string | dsRcpDps, | |
dyn_string & | dsRcpClassDps, | |||
dyn_string & | dsRcpClassNames | |||
) |
Get the list of recipe classes from a list of recipes.
dsRcpDps | - [IN] List of recipe DPs. | |
dsRcpClassDps | - [OUT] List of recipe class DPs. | |
dsRcpClassNames | - [OUT] List of recipe class Names. |
References _unRecipeFunctions_isRecipeClassDefinitionValid(), and _unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_saveRecipesToDb().
bool _unRecipeFunctions_saveRecipeObjectToDb | ( | dyn_dyn_mixed | recipeObject, | |
string | sComment, | |||
dyn_string & | exceptionInfo | |||
) |
Internal function to save a recipe object to the database.
recipeObject | - [IN] Recipe object to be saved in the database. | |
sComment | - [IN] Comment for the DB history. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_writeInRecipeLog().
Referenced by _unRecipeFunctions_saveRecipeInstanceToDb().
bool unRecipeFunctions_getRecipeInstancesFromDatabase | ( | dyn_string & | dsRcpInstanceNames, | |
dyn_string & | exceptionInfo | |||
) |
Get the list of recipe instances from the Oracle database.
dsRcpInstanceNames | - [OUT] Names of the recipe instances saved in the database. | |
exceptionInfo | - [OUT] Standard exception handling variable. |
References _unRecipeFunctions_writeInRecipeLog().
void unRecipeFunctions_deleteRecipeInstancesFromDb | ( | dyn_string | dsRecipeNames | ) |
Delete a list of recipe instances from the ORACLE database.
dsRecipeNames | - [IN] List of the recipe instances to delete from the ORACLE database. |
References _unRecipeFunctions_dropRecipeInDb().
void _unRecipeFunctions_dropRecipeInDb | ( | string | sRecipeName, | |
bool | bShowMessage = TRUE | |||
) |
Internal function to delete a recipe from the ORACLE database.
sRecipeName | - [IN] Name of the recipe to delete. | |
bShowMessage | - [IN] TRUE if a confirmation message must be added to the log window, otherwise FALSE. |
References _unRecipeFunctions_writeInRecipeLog().
Referenced by unRecipeFunctions_deleteRecipeInstancesFromDb().