fwFSMConfDB
8.4.0
|
Functions | |
int | fwFSMConfDB_initialize (string sDomain, string sConfigurator) |
bool | fwFSMConfDB_getUseConfDB (string sConfigurator) |
void | fwFSMConfDB_updateDeviceList (string sDomain, string sConfigurator) |
dyn_string | fwFSMConfDB_getDomainDevices (string sDomain) |
void | fwFSMConfDB_getAllDevices (string domain, string lunit, dyn_string &devices, int ignore_disabled=0, bool excludeMajority=true) |
bool | fwFSMConfDB_isConfigurator (string sDevice) |
string | fwFSMConfDB_getDomainConfigurator (string sDomain) |
string | fwFSMConfDB_removeSystemName (string sDpName) |
bool | fwFSMConfDB_waitForStateChange (string sDomain, string sConfigurator, time timeout) |
int | fwFSMConfDB_initConfDBConnection () |
dyn_string | fwFSMConfDB_getConfiguratorDevices (string sConfigurator) |
int | fwFSMConfDB_cacheExists (string sCache) |
int | fwFSMConfDB_cacheAllRecipesForMode (string sDomain, string sMode="") |
int | fwFSMConfDB_setState (string sDevice, string sState) |
int | fwFSMConfDB_setCurrentMode (string sConfigurator, string sMode) |
string | fwFSMConfDB_getCurrentMode (string sConfigurator) |
int | fwFSMConfDB_applyRecipe (string sDomain, string sDevice, string sCommand, string sMode="") |
int | fwFSMConfDB_ApplyRecipe (string sDomain, string sDevice, string sCommand, string sMode="") |
int | fwFSMConfDB_applyUserRecipe (string recipeName, dyn_string devices="") |
int | fwFSMConfDB_getAllTreeCUs (string fsmTree, dyn_string &CUlist) |
string | fwFSMConfDB_getConfiguratorName (string sDomain) |
int | fwFSMConfDB_addConfigurator (string sDomain, string type="") |
int | fwFSMConfDB_removeConfigurator (string sDomain, string sConfigurator) |
int | fwFSMConfDB_getApplyRecipeUsingConfigurator (string sDomain) |
int | fwFSMConfDB_waitForDevices (string sDomain, string sConfigurator) |
int | fwFSMConfDB_applyAllRecipesFromCache (string sDomain, string sConfigurator, string sMode="") |
int | fwFSMConfDB_applyRecipeFromCache (string sDomain, string sDevice, string sCommand, string sMode="") |
int | fwFSMConfDB_ApplyRecipeFromCache (string sDomain, string sDevice, string sCommand, string sMode="") |
int | fwFSMConfDB_findDeviceNumber (string sDomain, string sDevice) |
int | fwFSMConfDB_requestApplyRecipes (string sDomain, string sDevice, string sCommand, string sMode="") |
int | fwFSMConfDB_getCache (string sDomain, string sDevice, string sCommand, string sMode, string &sCache) |
void | fwFSMConfDB_combineRecipes (dyn_dyn_mixed &dstRecipeObject, dyn_dyn_mixed srcRecipeObject1, dyn_dyn_mixed srcRecipeObject2, dyn_string &exceptionInfo, string mergeMode="") |
Variables | |
FSM-ConfDB Interface: Definition of constants | |
The following constants are used by the FSM - ConfDB Interface | |
global string | fwFSMConfDB_gConfigurationName = "FsmConfDB" |
global string | fwFSMConfDB_gConfigurationDescription = "FSM-ConDB Device Configuration" |
global string | fwFSMConfDB_defaultRecipeMergeMode ="DEVICE" |
const string | g_csErrorState = "ERROR" |
const string | g_csReadyState = "READY" |
const string | g_csNotReadyState = "NOT_READY" |
const int | fwFSMConfDB_OK = 0 |
const int | fwFSMConfDB_ERROR = -1 |
const string | g_csFSMConfDBDPT = "FwFSMConfDB" |
const string | g_csFwFSMConfDBDelimiter = "/" |
const string | g_csFwFSMConfDBSetup = "FwFSMConfDB" |
const string | g_csModeDelimiter = "|" |
const string | g_csDevicesDPE = ".devices" |
const string | g_csCommandsDPE = ".commands" |
const string | g_csCachesDPE = ".caches" |
const string | g_csRecipesDPE = ".recipes" |
const string | g_csUseConfDBDPE = ".useConfDB" |
const int | g_maxCmdNr = 10 |
const string | g_CachePrefix = "FwFSMConfDB" |
const string | g_csSplitAtDpe = "FwFSMConfDBParametrization.splitCachesAt" |
const string | g_csForceUpdate = "FwFSMConfDBParametrization.forceUpdateFromDB" |
const string | g_csStopOnError = "FwFSMConfDBParametrization.stopOnError" |
const string | g_csStopNoRecipes = "FwFSMConfDBParametrization.stopNoRecipes" |
const string | g_csClearCaches = "FwFSMConfDBParametrization.clearCaches" |
const string | g_csDUTypesDPE = ".duTypes" |
const string | g_csConfiguratorDUType = "FwFSMConfDBDUT" |
const string | g_csDelayInterval = "FwFSMConfDBParametrization.delayInterval" |
const string | g_csApplyRecipesTimeout = ".applyRecipes.timeout" |
const string | g_csApplyRecipeUsingConfigurator = ".applyRecipes.usingConfigurator" |
const string | g_csApplyRecipeSimplified = ".applyRecipes.simplifiedAR" |
const string | g_csRecipePattern = ".recipePattern" |
const string | g_csIgnoreDeviceList = ".ignoreDeviceList" |
FSM-ConfDB Interface: Definition of variables | |
The following variables are used by the FSM - ConfDB Interface | |
global string | g_sFwDevice_HIERARCHY |
This package contains the functions used by the interface between the Finite State Machine and the Configuration DB.
int fwFSMConfDB_initialize | ( | string | sDomain, |
string | sConfigurator | ||
) |
Initializes the FSMConfDB configurator. In addition, it also initializes the connection to the Configuration DB and the internal list of devices to be configured in the SMI++ domain. If connection to ConfDB cannot be established, the configurator goes to an ERROR state, otherwise to NOT_READY state.
sDomain | Name of the SMI++ domain |
sConfigurator | name of the configurator |
bool fwFSMConfDB_getUseConfDB | ( | string | sConfigurator | ) |
Gets the UseConfDB flag
sConfigurator | name of the configurator |
void fwFSMConfDB_updateDeviceList | ( | string | sDomain, |
string | sConfigurator | ||
) |
Updates the internal list of devices handled by a FSMConfDB configurator
sDomain | Name of the SMI++ domain as a string |
sConfigurator | name of the domain configurator |
dyn_string fwFSMConfDB_getDomainDevices | ( | string | sDomain | ) |
Retrives the list of devices to be handle by a FSMConfDB configurator
sDomain | Name of the SMI++ domain as a string |
void fwFSMConfDB_getAllDevices | ( | string | domain, |
string | lunit, | ||
dyn_string & | devices, | ||
int | ignore_disabled = 0 , |
||
bool | excludeMajority = true |
||
) |
Gets all Device Units in a SMI++ domain recursively
domain | Name of the SMI++ domain as a string |
lunit | logical unit |
devices | list of devices as a dyn_string |
ignore_disabled | optional flag to indicate whether the disabled devices must be included in the list or not. The default value is 0 |
bool fwFSMConfDB_isConfigurator | ( | string | sDevice | ) |
Function to check whether a device is a configurator or not
sDevice | name of the device to be checked |
string fwFSMConfDB_getDomainConfigurator | ( | string | sDomain | ) |
Retrieves the name of the configurator object in an SMI++ domain
sDomain | name of the SMI++ domain |
string fwFSMConfDB_removeSystemName | ( | string | sDpName | ) |
Removes the system name from a dp-name
sDpName | name of the dp |
bool fwFSMConfDB_waitForStateChange | ( | string | sDomain, |
string | sConfigurator, | ||
time | timeout | ||
) |
This function connects to the state of the FSMConfDB configurator. Should the state of the configurator is set to READY after the time given by the timeout value the function returns TRUE, otherwise FALSE. This function is intended to be called from the DU in the hierarchy to pause their transitions while the configurator object loads all recipes from the ConfDB.
sDomain | Name of the SMI++ object |
sConfigurator | Name of the FSMConfDB Configurator |
timeout | time interval to wait before the state of the configurator is set to ERROR |
int fwFSMConfDB_initConfDBConnection | ( | ) |
Initializes the connection to the ConfDB for a given setup
setupName | name of the setup in the configuration DB |
dyn_string fwFSMConfDB_getConfiguratorDevices | ( | string | sConfigurator | ) |
Gets the list of device units to be configured by a FSMConfDB configurator
sConfigurator | name of the configurator |
int fwFSMConfDB_cacheExists | ( | string | sCache | ) |
Checks if a recipe cache exists
sCache | recipe cache name |
int fwFSMConfDB_cacheAllRecipesForMode | ( | string | sDomain, |
string | sMode = "" |
||
) |
Synchronizes the contents (i.e. recipes) of the configuration DB and the internal PVSS caches used by the Configuration DB tool, for a given running mode of the experiment. This function also sets up the internal data-points which hold the so-called "Recipe Dictionary". The recipe dictionary is an internal table which holds the cache names for the different devices and recipes in a SMI++ control domain.
sDomain | name of the SMI++ control domain |
sMode | running mode of the experiment to load the recipes for. This is an optional parameter. If left empty, the current running mode of the experiment is resolved by the FWFSMConfDB Interface |
int fwFSMConfDB_setState | ( | string | sDevice, |
string | sState | ||
) |
Sets the state of the FSMConfDB Configurator
sDevice | name of the device to set the device to |
sState | desired state |
int fwFSMConfDB_setCurrentMode | ( | string | sConfigurator, |
string | sMode | ||
) |
Sets the running mode to the FSMConfDB Configurator
sConfigurator | name of the FSMConfDB configurator |
sMode | experiment's running mode |
string fwFSMConfDB_getCurrentMode | ( | string | sConfigurator | ) |
Gets the running mode(PHYSICS,COSMICS,...) to the FSMConfDB Configurator
sConfigurator | name of the FSMConfDB configurator |
int fwFSMConfDB_applyRecipe | ( | string | sDomain, |
string | sDevice, | ||
string | sCommand, | ||
string | sMode = "" |
||
) |
Applies a recipe cache associated to a FSM command to a device
sDomain | name of the SMI++ domain |
sDevice | name of the device to apply the recipe to |
sCommand | SMI++ command |
sMode | running mode. This parameter is optional. If empty, it is current running mode resolved by the function |
int fwFSMConfDB_ApplyRecipe | ( | string | sDomain, |
string | sDevice, | ||
string | sCommand, | ||
string | sMode = "" |
||
) |
Applies a recipe cache associated to a FSM command to a device
sDomain | name of the SMI++ domain |
sDevice | name of the device to apply the recipe to |
sCommand | SMI++ command |
sMode | running mode. This parameter is optional. If empty, it is current running mode resolved by the function |
int fwFSMConfDB_applyUserRecipe | ( | string | recipeName, |
dyn_string | devices = "" |
||
) |
Applies a user recipe cache associated to a device or group of devices
sDomain | name of the SMI++ domain |
devices | list of devices to apply the recipe to |
int fwFSMConfDB_getAllTreeCUs | ( | string | fsmTree, |
dyn_string & | CUlist | ||
) |
Get all CU's belonging to a Tree.
fsmTree | name of the Tree |
CUlist | list of CUs in the tree |
string fwFSMConfDB_getConfiguratorName | ( | string | sDomain | ) |
The function returns the name of the configurator to an SMI++ domain
sDomain | name of the SMI++ domain |
int fwFSMConfDB_addConfigurator | ( | string | sDomain, |
string | type = "" |
||
) |
The function adds a configurator to a SMI++ domain.
sDomain | name of the SMI++ domain |
type | configurator DU type |
int fwFSMConfDB_removeConfigurator | ( | string | sDomain, |
string | sConfigurator | ||
) |
Removes a configurator of an SMI++ domain.
sDomain | name of the SMI++ domain |
sConfigurator | name of the configurator |
int fwFSMConfDB_getApplyRecipeUsingConfigurator | ( | string | sDomain | ) |
Gets the flag value that indicates the mode to be used to apply recipes
sConfigurator | name of the configurator |
int fwFSMConfDB_waitForDevices | ( | string | sDomain, |
string | sConfigurator | ||
) |
Waits for the requests of all the enabled devices that are executing an action
sDomain | name of the SMI++ domain |
sConfigurator | name of the configurator |
int fwFSMConfDB_applyAllRecipesFromCache | ( | string | sDomain, |
string | sConfigurator, | ||
string | sMode = "" |
||
) |
Fuction used by the configurator to apply the recipes to all enabled devices in a CU
sDomain | name of the SMI++ domain |
sConfigurator | name of the configurator |
sMode | running mode. This parameter is optional. If empty, it is current running mode resolved by the function |
int fwFSMConfDB_applyRecipeFromCache | ( | string | sDomain, |
string | sDevice, | ||
string | sCommand, | ||
string | sMode = "" |
||
) |
Checks if it's either the configurator or the device to apply the recipe and calls respectively the function fwFSMConfDB_requestApplyRecipes()or fwFSMConfDB_applyRecipe().
sDomain | name of the SMI++ domain |
sDevice | name of the device to apply the recipe to |
sCommand | SMI++ command |
sMode | running mode. This parameter is optional. If empty, it is current running mode |
int fwFSMConfDB_ApplyRecipeFromCache | ( | string | sDomain, |
string | sDevice, | ||
string | sCommand, | ||
string | sMode = "" |
||
) |
Checks if it's either the configurator or the device to apply the recipe and calls respectively the function fwFSMConfDB_requestApplyRecipes()or fwFSMConfDB_ApplyRecipe().
sDomain | name of the SMI++ domain |
sDevice | name of the device to apply the recipe to |
sCommand | SMI++ command |
sMode | running mode. This parameter is optional. If empty, it is current running mode |
int fwFSMConfDB_findDeviceNumber | ( | string | sDomain, |
string | sDevice | ||
) |
Finds the index number of the sDevice in the list of devices handle by a FSMConfDB configurator
sDomain | Name of the SMI++ domain as a string |
sDevice | name of the SMI++ device |
int fwFSMConfDB_requestApplyRecipes | ( | string | sDomain, |
string | sDevice, | ||
string | sCommand, | ||
string | sMode = "" |
||
) |
Request configurator to apply recipe(populate configurator's variables)if command comes from a parent, otherwise apply recipe to current device
sDomain | Name of the SMI++ domain as a string |
sDevice | name of the SMI++ device |
sCommand | SMI++ command |
sMode | running mode. This parameter is optional. If empty, it is current running mode resolved by the function |
int fwFSMConfDB_getCache | ( | string | sDomain, |
string | sDevice, | ||
string | sCommand, | ||
string | sMode, | ||
string & | sCache | ||
) |
Retrieves the cache name where the configuration information is stored for a given mode and command in a SMI++ domain
sDomain | name of the SMI++ control domain |
sDevice | name of the device to be configured |
sCommand | name of the command associated with the cache |
sMode | running mode of the experiment to load the recipes for |
sCache | name of the cache holding the configuration information |
void fwFSMConfDB_combineRecipes | ( | dyn_dyn_mixed & | dstRecipeObject, |
dyn_dyn_mixed | srcRecipeObject1, | ||
dyn_dyn_mixed | srcRecipeObject2, | ||
dyn_string & | exceptionInfo, | ||
string | mergeMode = "" |
||
) |
combines two recipe objects This function combines two recipe object into third object. For the entries that exist in both source recipes, the one in the second recipe have precedence, and will be used.
The meta-information is treated in the following way: if there is no meta information yet in the first recipe, the meta information from srcRecipeObject2 is taken; otherwise, if there is already a meta-information in the srcRecipeObject1, it is discarded except the recipe type name - this one will be set in the dstRecipeObject if it is set in both srcRecipeObjects to equal values.
dstRecipeObject | on return will contain the combined recipe |
srcRecipeObject1 | first recipe to combine |
srcRecipeObject2 | second recipe to combine |
exceptionInfo | standard exception handling variable |
mergeMode | (optional, default="") determines the mode in which the merge is performed; "DEVICE" - the mode is per device "ELEMENT" - the mode is per element "" - take the global setting |
const string g_csErrorState = "ERROR" |
Name of the ERROR state of the configurator
const string g_csReadyState = "READY" |
Name of the READY state of the configurator
const string g_csNotReadyState = "NOT_READY" |
Name of the NOT_READY state of the configurator
const int fwFSMConfDB_OK = 0 |
FSMConfDB return OK
const int fwFSMConfDB_ERROR = -1 |
general FSMCOnfDB error code
global string g_sFwDevice_HIERARCHY |
Name of the FW Hierarchy to be used