API function definitions for querying the vision system's status. More...
Functions | |
| MVLibExport MVCode_t | MV_GetSystemStatus (MVPlugin_t handle, MVSystemStatus_t *pStatus) |
| Gets the current status of the vision system. More... | |
| MVLibExport MVCode_t | MV_SystemStatus_GetParameter (MVSystemStatus_t status, uint32_t parameter, MVValue_t *pValue) |
| Gets a parameter value from the current status. More... | |
| MVLibExport void | MV_SystemStatus_Clear (MVSystemStatus_t *pStatus) |
| Destroys a status. More... | |
API function definitions for querying the vision system's status.
| MVLibExport MVCode_t MV_GetSystemStatus | ( | MVPlugin_t | handle, |
| MVSystemStatus_t * | pStatus | ||
| ) |
Gets the current status of the vision system.
This function initializes a variable of type MVSystemStatus_t which may subsequently be queried using the MV_SystemStatus_GetParameter() function to obtain values for several parameters characterizing the current status of the vision system. This may be used to synchronize the plug-in's internal state to the vision system's state when the plug-in is started. This internal state can then be updated through the appropriate events (e.g., StateChanged, RecipePrepared, or JobStarted).
| [in] | handle | is the Communicator handle for the plug-in instance. |
| [out] | pStatus | points to the uninitialized handle which is initialized with the current status. |
pStatus has been initialized with it. handle is not valid. pStatus is NULL. MV_GetSystemStatus has been called from a self-spawned thread and outside of its allowed plug-in lifetime. | MVLibExport void MV_SystemStatus_Clear | ( | MVSystemStatus_t * | pStatus | ) |
Destroys a status.
Each copy of a status obtained through using MV_GetSystemStatus() must be balanced by a call to MV_SystemStatus_Clear().
| [in,out] | pStatus | points to the handle to the status that is destroyed. |
| MVLibExport MVCode_t MV_SystemStatus_GetParameter | ( | MVSystemStatus_t | status, |
| uint32_t | parameter, | ||
| MVValue_t * | pValue | ||
| ) |
Gets a parameter value from the current status.
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):
The recipe ID of the currently prepared recipe is only applicable if a recipe is currently prepared, i.e., in the Ready state or either one of *Execution states. Likewise, the job ID of the currently running job is only applicable during either SingleExecution or ContinuousExecution. If either of these is queried while not applicable, the function returns MV_CODE_INV_PARAM.
| [in] | status | is the handle to the current status that is queried. |
| [in] | parameter | is one of the above MV_PARAM_* defines. |
| [out] | pValue | points to the value handle that is to be initialized with a copy of the value of the queried parameter. |
parameter key was successfully used to initialize the value pointed to by pValue. status is not valid. pValue is NULL. parameter key does not match any of the parameters listed above. parameter is not applicable in the current vision state.