viDisableEvent(3)
HP-UX
NAME
viDisableEvent − Disables servicing of an event
SYNOPSIS
viDisableEvent(ViSession vi, ViEventType eventType, ViUInt16 mechanism);
Description
This function disables servicing of an event identified by the eventType parameter for the mechanisms specified in the mechanism parameter. Specifying VI_ALL_ENABLED_EVENTS for the eventType parameter allows a session to stop receiving all events. The session can stop receiving queued events by specifying VI_QUEUE. Applications can stop receiving callback events by specifying either VI_HNDLR or VI_SUSPEND_HNDLR. Specifying VI_ALL_MECH disables both the queuing and callback mechanisms.
Parameters
vi An input parameter. Unique logical identifier to a session.
eventType An input parameter. Logical event identifier. (See the following tables.)
mechanism An input parameter. Specifies event handling mechanisms to be disabled. The queuing mechanism is disabled by specifying VI_QUEUE, and the callback mechanism is disabled by specifying VI_HNDLR or VI_SUSPEND_ HNDLR. It is possible to disable both mechanisms simultaneously by specifying VI_ALL_MECH. (See the following table.)
Special Values for eventType Parameter
VI_ALL_ENABLED_EVENTS Disable all events that were previously enabled.
The following events can be enabled:
VI_EVENT_SERVICE_REQ Notification that a device is requesting service.
VI_EVENT_VXI_SIGP Notification that a VXI signal or VXI interrupt has been received from a device.
VI_EVENT_TRIG Notification that a hardware trigger was received from a device.
Special Values for mechanism Parameter
VI_QUEUE Disable this session from receiving the specified event(s) via the waiting queue.
VI_HNDLR or VI_SUSPEND_HNDLR Disable this session from receiving the specified event(s) via a callback handler or a callback queue.
VI_ALL_MECH Disable this session from receiving the specified event(s) via any mechanism.
NOTE Some combinations of VTL-defined values for different parameters of this function are also supported.
Return Values
This is the functional return status. It returns either a completion code or an error code as follows.
VI_SUCCESS Event disabled successfully.
VI_SUCCESS_EVENT_DIS Specified event is already disabled for at least one of the specified mechanisms.
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.
See Also
See the handler prototype, viEventHandler, for its parameter description. Also refer to the viInstallHandler and viUninstallHandle descriptions for information about installing and uninstalling event handlers. Refer to event descriptions for context structure definitions.
AUTHOR
viDisableEvent was developed by HP
Hewlett-Packard Comapny — September 29, 1999