mpiControlNotifyCreate
Declaration
MPI_RESULT mpiControlNotifyCreate(MPIControl control, MPINotify *notify, MPIEventMask eventMask, MPIObject source);
Required Header: stdmpi.h
Change History: Added in 04.00.
Description
mpiControlNotifyCreate creates a new Notify object, then appends that object to the list of Notify objects associated with the controller (control).
notify | The Notify object that is to be added to the list of Notify objects the Service object sends events to. |
---|---|
control | The handle of the controller object. |
eventMask | The event mask used to filter events. Any events of type that are not found in the eventMask will not be processed by Notify object. |
source | Specifies the initial element in the list of event sources, from which event notification will be accepted. If source is NULL, then event notification will be accepted from all event sources. |
Sample Code
/* Create a notify object to store events */ returnValue = mpiControlNotifyCreate(¬ify, control); msgCHECK(returnValue); /* Start a motion */ returnValue = mpiMotionStart(motion, MPIMotionTypeS_CURVE, &motionParams); msgCHECK(returnValue); /* Wait for a motion done event from the motion object */ returnValue = mpiNotifyEventWaitSpecific(notify, NULL, motion, MPIEventTypeMOTION_DONE, MPIWaitFOREVER); msgCHECK(returnValue); /* We're done with the notify object. We can delete it now. */ returnValue = mpiControlNotifyDelete(notify); msgCHECK(returnValue);