mv_event_def.h File Reference

Type definitions for events. More...

Typedefs

typedef enum MVEventType_t MVEventType_t
 
typedef enum MVResultState_t MVResultState_t
 

Enumerations

enum  MVEventType_t {
  eMVEvent_Null = 0x0001,
  eMVEvent_StateChanged = 0x0002,
  eMVEvent_RecipePrepared = 0x0004,
  eMVEvent_RecipeUnprepared = 0x0008,
  eMVEvent_ResultReady = 0x0010,
  eMVEvent_Ready = 0x0020,
  eMVEvent_JobStarted = 0x0080,
  eMVEvent_Error = 0x0100,
  eMVEvent_AcquisitionDone = 0x0200,
  eMVEvent_Shutdown = 0x8000
}
 Enumeration of the types of events which may be received from the vision system. More...
 
enum  MVResultState_t {
  eMVResultState_Null = 0x00,
  eMVResultState_Completed = 0x01,
  eMVResultState_Processing = 0x02,
  eMVResultState_Aborted = 0x03,
  eMVResultState_Failed = 0x04
}
 Enumeration of the possible states of a result.
 

Timeout duration

These macro constants and function-like macros are used in the timeout parameter of MV_TryGetEvent() to specify for how long the function should block in case no event from the vision system is received.

#define MV_TIME_NONE   0
 No timeout: function returns immediately in case there are no pending events.
 
#define MV_TIME_INFINITE   -1
 Infinite timeout: function blocks indefinitely until an event is received. More...
 
#define MV_TIME_SECOND(X)   (X * 1000)
 Function-like macro to express a finite timeout duration in seconds.
 
#define MV_TIME_MILLISECOND(X)   (X)
 Function-like macro to express a finite timeout duration in milliseconds.
 
typedef struct _MVEvent_t * MVEvent_t
 Opaque data type which holds all information related to a single event. More...
 

Detailed Description

Type definitions for events.

Event Reference Table

EventParametersParameter TypeSemantics
commonMV_PARAM_ACTION_IDUInt32action ID
MV_PARAM_PLUGIN_IDUInt32plug-in ID
MV_PARAM_ACTION_USER_IDVariantuser action ID, may be unset
StateChangedMV_PARAM_STATE_FROM_STATEUInt32state enum value
MV_PARAM_STATE_TO_STATEUInt32state enum value
MV_PARAM_STATE_ACTION_CAUSEUInt32action type enum value
RecipePreparedMV_PARAM_RECIPE_IDStringrecipe ID
RecipeUnpreparedMV_PARAM_RECIPE_IDStringrecipe ID
ResultReadyMV_PARAM_RECIPE_IDStringrecipe ID
MV_PARAM_JOB_IDUInt32job ID
MV_PARAM_RESULT_IDUInt32result ID
MV_PARAM_MEAS_IDStringmeasurement ID, may be unset
MV_PARAM_PART_IDStringpart ID, may be unset
MV_PARAM_RESULT_STATEUInt32MVResultState_t enum value
MV_PARAM_RESULT_CONTENTTupledetermined by MVApp results
MV_PARAM_RESULT_TIMESTAMPStringcreation time in ISO-8601
MV_PARAM_EXEC_START_TIMESTAMPStringexecution start time in ISO-8601
MV_PARAM_EXEC_END_TIMESTAMPStringexecution end time in ISO-8601
MV_PARAM_ACQ_DURATION_MILLISDoubleacquisition duration in milliseconds
MV_PARAM_PROC_DURATION_MILLISDoubleprocessing duration in milliseconds
MV_PARAM_CONFIGURATION_IDreserved for future use
ReadyMV_PARAM_JOB_IDUInt32job ID
JobStartedMV_PARAM_JOB_IDUInt32job ID
MV_PARAM_RECIPE_IDStringrecipe ID
MV_PARAM_MEAS_IDStringmeasurement ID, may be unset
MV_PARAM_PART_IDStringpart ID, may be unset
MV_PARAM_IS_CONTINUOUS_JOBBooltrue for continuous jobs, false for single jobs
MV_PARAM_START_PARAMSTupledetermined by MVApp parameters
ErrorMV_PARAM_ERROR_MESSAGEString
MV_PARAM_ERROR_CODEUInt32
MV_PARAM_ERROR_CAUSEUInt32action type enum value
AcquisitionDoneMV_PARAM_JOB_IDUInt32job ID
MV_PARAM_ACQ_DURATION_MILLISDoubleacquisition duration in milliseconds
Shutdown

Notation for column "Parameter Type":

  • Int32: parameter holds a scalar value of type eMVType_Int32
  • Variant: parameter holds a scalar value of arbitrary type
  • [Int32]: parameter holds an array value of (homogeneous) type eMVType_In32
  • Tuple: parameter holds a tuple of values

Macro Definition Documentation

◆ MV_TIME_INFINITE

#define MV_TIME_INFINITE   -1

Infinite timeout: function blocks indefinitely until an event is received.

It is still safe for a plug-in to choose to use a finite timeout as it is guaranteed that a Shutdown event will be send when the plug-in is stopped. Do not call MV_TryGetEvent() after receiving Shutdown, though.

Typedef Documentation

◆ MVEvent_t

typedef struct _MVEvent_t* MVEvent_t

Opaque data type which holds all information related to a single event.

MVEvent_t is a pointer to an opaque data structure. The data structure is initialized by MV_TryGetEvent() when it returns successfully and information about the event can be queried from it using MV_Event_GetParameter() and MV_Event_Tuple_GetParameter(). MV_Action_SetParameter(). Only plug-ins with the "monitor" access level can receive and process events from the vision system.

Remarks
The resources associated with the opaque data structure have to be freed by calling MV_Event_Clear().

Enumeration Type Documentation

◆ MVEventType_t

Enumeration of the types of events which may be received from the vision system.

See Available Events for more information.

Enumerator
eMVEvent_Null 

Placeholder for an invalid default value.

eMVEvent_StateChanged 

StateChanged

eMVEvent_RecipePrepared 

RecipePrepared

eMVEvent_RecipeUnprepared 

RecipeUnprepared

eMVEvent_ResultReady 

ResultReady

eMVEvent_Ready 

Ready

eMVEvent_JobStarted 

JobStarted

eMVEvent_Error 

Error

eMVEvent_AcquisitionDone 

AcquisitionDone

eMVEvent_Shutdown 

Shutdown