MPIEventData
Declaration
typedef struct MPIEventData {
        MPIEventType       eventType;
        MPIModuleId        objectType;
        int32_t               objectIndex;
        int32_t               sampleCounter;
        
        union {
		MPIEventAxisData          axis;
		MPIEventMotionData        motion;
		MPIEventMotorData         motor;
		MPIEventSequenceData      sequence;
		MPIEventUserLimitData     userLimit;
		MPIEventSynqNetData       synqNet;
		MPIEventCaptureData       capture;
	} data;
	
	struct {
		MPIGeneric64 elem64Bit[MPIEventUSER_DATA_COUNT];
		MPIGeneric32 elem32Bit[MPIEventUSER_DATA_COUNT*2];
	} userData;
} MPIEventData;
Required Header: stdmpi.h
Change History: Added in 04.00.
Description
MPIEventData holds information about a particular event that was generated by the controller.
| eventType | The type of event generated by the controller. | 
|---|---|
| module | The type of object the event is associated with. If module is MPIModuleIdMOTION, then a motion supervisor object generated the event. | 
| objectIndex | The object index that generated the event. | 
| data | A structure holding additional event-specific information. | 
| data.axis | A structure holding additional information specific to axis events. | 
| data.motion | A structure holding additional information specific to motion supervisor events. | 
| data.motor | A structure holding additional information specific to motor events. | 
| data.synqNet | A structure holding additional information specific to SynqNet events. | 
| data.sqNode | A structure holding additional information specific to SqNode events. | 
| data.recorder | A structure holding additional information specific to recorder events. | 
| data.probe | A structure holding additional information specific to probe events. | 
| data.userLimit | A structure holding additional information specific to user limit events. | 
| data.sampleCounter | The sample counter when an event occurred. | 
| data.generic | An array of generic 64-bit values associated with an event, recorded when the event occurred. | 
| userData | A structure holding additional user-specified event-specific information. | 
Samlple Code
MPI_RESULT MPI_DECL2
    myEventCallback(MPIControl control, const MPIEventData* status, void* userData)
{
    /* print event type and sample counter timestamp to the screen. */
    printf("%s event occurred at controller sample %d.\n",
        mpiEventTypeName(status->eventType),
        status->data.sampleCounter);
}
      See Also
MPIControlEventCallback | MPIEventType

