API function definitions for querying the recipe store. More...
Macros | |
| #define | MV_RecipeList_foreach(list, recipe) |
| Macro for iterating over the recipes in a list. More... | |
| #define | MV_Recipe_InputParam_foreach(recipe, param) |
| Macro for iterating over the input parameters in a recipe. More... | |
| #define | MV_Recipe_OutputParam_foreach(recipe, param) |
| Macro for iterating over the output parameters in a recipe. More... | |
| #define | MV_Recipe_OutputDataInfo_foreach(recipe, info) |
| Macro for iterating over the output data information in a recipe. More... | |
Functions | |
| MVLibExport MVCode_t | MV_GetRecipeList (MVPlugin_t handle, MVRecipeList_t *pList) |
| Obtains the list of available recipes from the vision system. More... | |
| MVLibExport MVCode_t | MV_RecipeList_GetRecipeById (MVRecipeList_t list, MVValue_t recipeId, MVRecipe_t *pRecipe) |
| Looks up a recipe with the given recipe ID and copies it if one is found. More... | |
| MVLibExport void | MV_RecipeList_Clear (MVRecipeList_t *pList) |
| Destroys a recipe list. More... | |
| MVLibExport size_t | MV_RecipeList_GetSize (MVRecipeList_t list) |
| Gets the number of recipes in a recipe list. More... | |
| MVLibExport MVCode_t | MV_RecipeList_SetFilter (MVRecipeList_t list, uint32_t filter, MVValue_t value) |
| Filters a given recipe list according to predefined criteria. More... | |
| MVLibExport MVRecipe_t | MV_RecipeList_Next (MVRecipeList_t list) |
| Iterates over a recipe list. More... | |
| MVLibExport MVCode_t | MV_RecipeList_Rewind (MVRecipeList_t list) |
| Resets the built-in pointer to the beginning of a recipe list. More... | |
| MVLibExport MVCode_t | MV_Recipe_GetParameter (MVRecipe_t recipe, uint32_t parameter, MVValue_t *pValue) |
| Gets a parameter value of a given recipe. More... | |
| MVLibExport void | MV_Recipe_Clear (MVRecipe_t *pRecipe) |
| Destroys a recipe. More... | |
| MVLibExport MVRecipeParam_t | MV_Recipe_InputParam_Next (MVRecipe_t recipe) |
| Iterates over the input parameters of a given recipe. More... | |
| MVLibExport MVRecipeParam_t | MV_Recipe_OutputParam_Next (MVRecipe_t recipe) |
| Iterates over the output parameters of a given recipe. More... | |
| MVLibExport MVDataInfo_t | MV_Recipe_OutputDataInfo_Next (MVRecipe_t recipe) |
| Iterates over the output data information of a given recipe. More... | |
| MVLibExport MVCode_t | MV_Recipe_InputParam_Rewind (MVRecipe_t recipe) |
| Resets the built-in pointer to the beginning of a recipe input parameter list. More... | |
| MVLibExport MVCode_t | MV_Recipe_OutputParam_Rewind (MVRecipe_t recipe) |
| Resets the built-in pointer to the beginning of a recipe output parameter list. More... | |
| MVLibExport MVCode_t | MV_Recipe_OutputDataInfo_Rewind (MVRecipe_t recipe) |
| Resets the built-in pointer to the beginning of a recipe's output data info. More... | |
| MVLibExport size_t | MV_Recipe_InputParam_GetSize (MVRecipe_t recipe) |
| Gets the number of input parameters of a given recipe. More... | |
| MVLibExport size_t | MV_Recipe_OutputParam_GetSize (MVRecipe_t recipe) |
| Gets the number of output parameters of a given recipe. More... | |
| MVLibExport size_t | MV_Recipe_OutputDataInfo_GetSize (MVRecipe_t recipe) |
| Gets the number of output data components of a given recipe. More... | |
| MVLibExport MVCode_t | MV_RecipeParam_GetParameter (MVRecipeParam_t recipeParam, uint32_t parameter, MVValue_t *pValue) |
| Gets a parameter value of a given recipe input or output parameter. More... | |
| MVLibExport MVCode_t | MV_DataInfo_GetParameter (MVDataInfo_t dataInfo, uint32_t parameter, MVValue_t *pValue) |
| Gets a parameter value of a given recipe data component information. More... | |
API function definitions for querying the recipe store.
| #define MV_Recipe_InputParam_foreach | ( | recipe, | |
| param | |||
| ) |
Macro for iterating over the input parameters in a recipe.
| #define MV_Recipe_OutputDataInfo_foreach | ( | recipe, | |
| info | |||
| ) |
Macro for iterating over the output data information in a recipe.
| #define MV_Recipe_OutputParam_foreach | ( | recipe, | |
| param | |||
| ) |
Macro for iterating over the output parameters in a recipe.
| #define MV_RecipeList_foreach | ( | list, | |
| recipe | |||
| ) |
Macro for iterating over the recipes in a list.
| MVLibExport MVCode_t MV_DataInfo_GetParameter | ( | MVDataInfo_t | dataInfo, |
| uint32_t | parameter, | ||
| MVValue_t * | pValue | ||
| ) |
Gets a parameter value of a given recipe data component information.
Initializes a new MVValue_t with a copy of the requested parameter. It is the caller's responsibility to destroy this copy by way of MV_Value_Clear().
The following parameters are available (followed by the type of the correspondingly retrieved MVValue_t):
| dataInfo | is a handle to the recipe output data component information that is queried. |
| parameter | is one of the above MV_PARAM_DATA_* defines. |
| pValue | points to the value handle that is initialized with a copy of the value of the queried parameter. |
parameter key was successfully used to initialize the value pointed to by pValue. dataInfo is not valid. parameter key does not match any parameters which apply to output data components. | MVLibExport MVCode_t MV_GetRecipeList | ( | MVPlugin_t | handle, |
| MVRecipeList_t * | pList | ||
| ) |
Obtains the list of available recipes from the vision system.
| [in] | handle | is the Communicator handle for the plug-in instance. |
| [out] | pList | points to the uninitialized recipe list handle that is initialized with the current recipe list. |
pList has been initialized with it. handle is not valid. pList is NULL. MV_GetRecipeList has been called from a self-spawned thread and outside of its allowed plug-in lifetime. | MVLibExport void MV_Recipe_Clear | ( | MVRecipe_t * | pRecipe | ) |
Destroys a recipe.
Each copy of a recipe made using MV_RecipeList_GetRecipeById() must be balanced by a call to MV_Recipe_Clear().
| [in,out] | pRecipe | points to the handle to the recipe that is destroyed. |
| MVLibExport MVCode_t MV_Recipe_GetParameter | ( | MVRecipe_t | recipe, |
| uint32_t | parameter, | ||
| MVValue_t * | pValue | ||
| ) |
Gets a parameter value of a given recipe.
Initializes a new MVValue_t with a copy of the requested parameter. It is the caller's responsibility to destroy this copy by way of MV_Value_Clear().
The following parameters are available (followed by the type of the correspondingly retrieved MVValue_t):
| [in] | recipe | is the handle to the recipe that is queried. |
| [in] | parameter | is one of the above MV_PARAM_RECIPE_* defines. |
| [out] | pValue | points to the value handle that is initialized with a copy of the value of the queried parameter. |
parameter key was successfully used to initialize the value pointed to by pValue. recipe is not valid.pValue is NULL. parameter key does not match any parameters which apply to recipes. | MVLibExport size_t MV_Recipe_InputParam_GetSize | ( | MVRecipe_t | recipe | ) |
Gets the number of input parameters of a given recipe.
| [in] | recipe | is the handle to the recipe that is queried. |
| MVLibExport MVRecipeParam_t MV_Recipe_InputParam_Next | ( | MVRecipe_t | recipe | ) |
Iterates over the input parameters of a given recipe.
Recipes have a built-in pointer to the "current" recipe input and output parameters. This function returns a handle to the currently pointed-to recipe input parameter and advances the corresponding pointer by one. If the end of the recipe's input parameters is reached, the returned recipe parameter handle will evaluate to false if coerced in a boolean context such as the conditional expression of an if or while statement.
| [in] | recipe | is the handle to the recipe that is iterated over. |
| MVLibExport MVCode_t MV_Recipe_InputParam_Rewind | ( | MVRecipe_t | recipe | ) |
Resets the built-in pointer to the beginning of a recipe input parameter list.
| [in] | recipe | is the handle to the recipe whose internal input parameter pointer should be reset. |
recipe is not valid. | MVLibExport size_t MV_Recipe_OutputDataInfo_GetSize | ( | MVRecipe_t | recipe | ) |
Gets the number of output data components of a given recipe.
| [in] | recipe | is the handle to the recipe that is queried. |
| MVLibExport MVDataInfo_t MV_Recipe_OutputDataInfo_Next | ( | MVRecipe_t | recipe | ) |
Iterates over the output data information of a given recipe.
Recipes have a built-in pointer to the "current" recipe output data information. This function returns a handle to the currently pointed-to recipe output data information and advances the corresponding pointer by one. If the end of the recipe's data information is reached, the returned recipe data information handle will evaluate to false if coerced in a boolean context such as the conditional expression of an if or while statement.
Note that the handles returned by the function are non-owning. They remain valid only until their corresponding recipe is destroyed.
| [in] | recipe | is the handle to the recipe that is iterated over. |
| MVLibExport MVCode_t MV_Recipe_OutputDataInfo_Rewind | ( | MVRecipe_t | recipe | ) |
Resets the built-in pointer to the beginning of a recipe's output data info.
| [in] | recipe | is the handle to the recipe whose internal data info pointer should be reset. |
recipe is not valid. | MVLibExport size_t MV_Recipe_OutputParam_GetSize | ( | MVRecipe_t | recipe | ) |
Gets the number of output parameters of a given recipe.
| [in] | recipe | is the handle to the recipe that is queried. |
| MVLibExport MVRecipeParam_t MV_Recipe_OutputParam_Next | ( | MVRecipe_t | recipe | ) |
Iterates over the output parameters of a given recipe.
Recipes have a built-in pointer to the "current" recipe input and output parameters. This function returns a handle to the currently pointed-to recipe output parameter and advances the corresponding pointer by one. If the end of the recipe's output parameters is reached, the returned recipe parameter handle will evaluate to false if coerced in a boolean context such as the conditional expression of an if or while statement.
Note that the handles returned by the function are non-owning. They remain valid only until their corresponding recipe is destroyed.
| [in] | recipe | is the handle to the recipe that is iterated over. |
| MVLibExport MVCode_t MV_Recipe_OutputParam_Rewind | ( | MVRecipe_t | recipe | ) |
Resets the built-in pointer to the beginning of a recipe output parameter list.
| [in] | recipe | is the handle to the recipe whose internal output parameter pointer should be reset. |
recipe is not valid. | MVLibExport void MV_RecipeList_Clear | ( | MVRecipeList_t * | pList | ) |
Destroys a recipe list.
Each call to MV_GetRecipeList() has to be balanced by a call to MV_RecipeList_Clear().
| [in,out] | pList | points to the recipe list handle that is destroyed. |
| MVLibExport MVCode_t MV_RecipeList_GetRecipeById | ( | MVRecipeList_t | list, |
| MVValue_t | recipeId, | ||
| MVRecipe_t * | pRecipe | ||
| ) |
Looks up a recipe with the given recipe ID and copies it if one is found.
| [in] | list | is the handle to the recipe list in which the recipe is looked up. |
| [in] | recipeId | is the handle to the value holding the recipeId that is looked up. The value should be of scalar String type. |
| [out] | pRecipe | points to the uninitialized recipe handle that is initialized with the looked up recipe. |
recipeId has been found in the list and *pRecipe has been successfully initialized with a copy. list is not valid. pRecipe is NULL. list does not contain any recipe with the specified recipeId or the value and data type of recipeId may not be correct. Presently, recipe ID are limited to scalar String values. | MVLibExport size_t MV_RecipeList_GetSize | ( | MVRecipeList_t | list | ) |
Gets the number of recipes in a recipe list.
| [in] | list | is the handle to the recipe list that is queried. |
| MVLibExport MVRecipe_t MV_RecipeList_Next | ( | MVRecipeList_t | list | ) |
Iterates over a recipe list.
Recipe lists have a built-in pointer to the "current" recipe. This function returns a handle to the currently pointed-to recipe and advances the pointer by one. If the end of the recipe list is reached, the returned recipe handle will evaluate to false if coerced in a boolean context such as the conditional expression of an if or while statement.
| [in] | list | is the handle to the recipe list that is iterated over. |
| MVLibExport MVCode_t MV_RecipeList_Rewind | ( | MVRecipeList_t | list | ) |
Resets the built-in pointer to the beginning of a recipe list.
| [in] | list | is the handle to the recipe list whose internal pointer should be reset. |
list is not valid. | MVLibExport MVCode_t MV_RecipeList_SetFilter | ( | MVRecipeList_t | list, |
| uint32_t | filter, | ||
| MVValue_t | value | ||
| ) |
Filters a given recipe list according to predefined criteria.
The following three options are available for the filter argument:
value is a scalar UInt32, keep recipes from that index forward;value is an UInt32 array with two elements, keep recipes in the range [value[0], value[1]).Set a filter using this function actually removes the recipes which don't match it from the recipe list. Thus, calling this function repeatedly compounds the applied filters.
| [in] | list | is the handle to the recipe list that is filtered. |
| [in] | filter | is one of the MV_FILTER_RECIPELIST_* defines. |
| [in] | value | is a handle to the scalar or array UInt32 value that is used to specify the index range for MV_FILTER_RECIPELIST_RANGE_IDXS. |
list is not valid. value is NULL or its value or data type do not match the requirements or the specified range is itself invalid, i.e. valid[0] > valid[1]. filter that has been specified is unknown. | MVLibExport MVCode_t MV_RecipeParam_GetParameter | ( | MVRecipeParam_t | recipeParam, |
| uint32_t | parameter, | ||
| MVValue_t * | pValue | ||
| ) |
Gets a parameter value of a given recipe input or output parameter.
Initializes a new MVValue_t with a copy of the requested parameter. It is the caller's responsibility to destroy this copy by way of MV_Value_Clear().
The following parameters are available (followed by the type of the correspondingly retrieved MVValue_t):
| recipeParam | is a handle to the recipe input or output parameter that is queried. |
| parameter | is one of the above MV_PARAM_RECIPEPARAM_* defines. |
| pValue | points to the value handle that is initialized with a copy of the value of the queried parameter. |
parameter key was successfully used to initialize the value pointed to by pValue. recipeParam is not valid. parameter key does not match any parameters which apply to recipe parameters.