RecipeManCommands.RegisterDatasourceRecipeDefinition
(METH)
METHOD RegisterDatasourceRecipeDefinition : DWORD
Helper method that can be used to preregister variable lists for a recipe definition within devices connected via datasources. The intention of this function is to speedup reading/writing of recipes at the cost of an initial registration process after each connection setup of the affected datasources. If a recipe is read or written several times then this initial effort is necessary only once and each read or write operation is executed faster.
Important
This functionality does not automatically update the created variable list in case of online changes (eg. affecting the recipe definition). Therefore if online changes modify a recipe definition or locations of variables within a recipe definition, the according list has to be setup again! This can be done by searching and deleting it using the methodes of |IDatasources.IDatasourcesMgr2|
Important
This function might block until it is possible to access the datasources.
Note
If there is no performance flaw when reading/writing recipe definitions over datasources then it’s not necessary to call this method.
Note
The error code |CmpErrors.Errors.ERR_NOT_SUPPORTED| signals that one of the affected datasources does not support this feature and so it cannot be used at all. The error code |IDatasources.Errors.ERR_DS_READONLY_ITEM| signals that at least one of the variables of the recipe definition is reaonly and therefore the feature of preregistering according variable lists is not supported.
- InOut:
Scope
Name
Type
Comment
Return
RegisterDatasourceRecipeDefinition
DWORD
An error code representing the result of this operation. See ReturnValues (GVL) for a description of all possible errors.
Inout Const
RecipeDefinitionName
STRING
Name of the recipe definition.
Input
datasourcesMgr
IDatasources.IDatasourcesMgr
The global instance of the datasources manager. Typically pass g_Datasources