mechanism IN ViUInt16 Specifies event handling mechanisms to be enabled. The queuing mechanism is enabled by specifying and the callback VI_QUEUE, mechanism is enabled by specifying or It is VI_HNDLR VI_SUSPEND_HNDLR. possible to enable both mechanisms simultaneously by specifying "bit-wise OR" of and one of the two mode values VI_QUEUE for the callback mechanism. context IN ViEventFilter VI_NULL Return Values Type This is the operational return status. It returns either a ViStatus completion code or an error code as follows. Completion Codes Description VI_SUCCESS Event enabled successfully. VI_SUCCESS_EVENT_EN Specified event is already enabled for at least one of the specified mechanisms. Error Codes Description VI_ERROR_INV_SESSION The given session or object reference is invalid (both VI_ERROR_INV_OBJECT are the same value). VI_ERROR_INV_EVENT Specified event type is not supported by the resource. VI_ERROR_INV_MECH Invalid mechanism specified. VI_ERROR_INV_CONTEXT Specified event context is invalid. VI_ERROR_HNDLR_NINSTALLED A handler is not currently installed for the specified event. The session cannot be enabled for the mode of the callback mechanism. VI_HNDLR VI_ERROR_NSUP_MECH The specified mechanism is not supported for the given event type. Description This operation enables notification of an event identified by the parameter for mechanisms eventType specified in the parameter. The specified session can be enabled to queue events by specifying mechanism Applications can enable the session to invoke a callback function to execute the handler by VI_QUEUE. specifying The applications are required to install at least one handler to be enabled for this VI_HNDLR. mode. Specifying enables the session to receive callbacks, but the invocation of the VI_SUSPEND_HNDLR handler is deferred to a later time. Successive calls to this operation replace the old callback mechanism with the new callback mechanism. Specifying for the parameter VI_ALL_ENABLED_EVENTS eventType refers to all events that have previously been enabled on this session, making it easier to switch between the two callback mechanisms for multiple events. Table 3.7.3 Special Values for Parameter eventType Value Action Description
mechanism IN ViUInt16 Specifies event handling mechanisms to be enabled. The queuing mechanism is enabled by specifying VI_QUEUE, and the callback mechanism is enabled by specifying VI_HNDLR or VI_SUSPEND_HNDLR. It is possible to enable both mechanisms simultaneously by specifying "bit-wise OR" of VI_QUEUE and one of the two mode values for the callback mechanism. context IN ViEventFilter VI_NULL Return Values Type ViStatus This is the operational return status. It returns either a completion code or an error code as follows. Completion Codes Description VI_SUCCESS Event enabled successfully. VI_SUCCESS_EVENT_EN Specified event is already enabled for at least one of the specified mechanisms. Error Codes Description VI_ERROR_INV_SESSION VI_ERROR_INV_OBJECT The given session or object reference is invalid (both are the same value). VI_ERROR_INV_EVENT Specified event type is not supported by the resource. VI_ERROR_INV_MECH Invalid mechanism specified. VI_ERROR_INV_CONTEXT Specified event context is invalid. VI_ERROR_HNDLR_NINSTALLED A handler is not currently installed for the specified event. The session cannot be enabled for the VI_HNDLR mode of the callback mechanism. VI_ERROR_NSUP_MECH The specified mechanism is not supported for the given event type. Description This operation enables notification of an event identified by the eventType parameter for mechanisms specified in the mechanism parameter. The specified session can be enabled to queue events by specifying VI_QUEUE. Applications can enable the session to invoke a callback function to execute the handler by specifying VI_HNDLR. The applications are required to install at least one handler to be enabled for this mode. Specifying VI_SUSPEND_HNDLR enables the session to receive callbacks, but the invocation of the handler is deferred to a later time. Successive calls to this operation replace the old callback mechanism with the new callback mechanism. Specifying VI_ALL_ENABLED_EVENTS for the eventType parameter refers to all events that have previously been enabled on this session, making it easier to switch between the two callback mechanisms for multiple events. Table 3.7.3 Special Values for eventType Parameter Value Action Description
vpp43_2016-02-26.docx