viEventHandler(3)
HP-UX
NAME
viEventHandler − An event handler written by the programmer
SYNOPSIS
viEventHandler(ViSession vi, ViEventType eventType, ViEvent context, ViAddr userHandle);
Description
This is a prototype for a function, which you define. The function you define is called whenever a session receives an event and is enabled for handling events in the VI_HNDLR mode. The handler services the event and returns VI_SUCCESS on completion.
Because each eventType defines its own context in terms of attributes, refer to the appropriate event definition to determine which attributes can be retrieved using the context parameter.
Parameters
vi An input parameter. Unique logical identifier to a session.
eventType An input parameter. Logical event identifier. (See the following table.)
context An input parameter. A handle specifying the unique occurrence of an event. userHandle IN ViAddr A value specified by an application that can be used for identifying handlers uniquely in a session for an event.
Return Values
This is the functional return status. It returns either a completion code or an error code as follows.
NOTE Return values are not used in VTL, but are significant in VISA. Therefore, you should always return VI_SUCCESS from a VTL event handler.
VI_SUCCESS Event handled successfully.
See Also
viClose. Also refer to the "Using Events and Handlers" section of Chapter 4, "Programming with VTL," for more information on event handling and exception handling.
AUTHOR
viEventHandler was developed by HP
Hewlett-Packard Comapny — September 29, 1999