Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ viWaitOnEvent(3) — HP-UX Instrument Control Library G.03.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

viWaitOnEvent(3)

HP-UX

NAME

viWaitOnEvent − Waits for an occurance of the specified event

SYNOPSIS

viWaitOnEvent(ViSession vi, ViEventType inEventType,
ViUInt32 timeout, ViPEventType outEventType,
ViPEvent outContext);

 

Description

 
This function waits for an occurrence of the specified event for a given session.  In particular, this function suspends execution of an application thread and waits for an event inEventType for a time period not to exceed that specified by timeout.  Refer to individual event descriptions for context definitions.
 
If the specified inEventType is VI_ALL_ENABLED_EVENTS, the function waits for any event that is enabled for the given session.  If the specified timeout value is VI_TMO_INFINITE, the function is suspended indefinitely.
 

Parameters

 
 

vi An input parameter.  Unique logical identifier to a session. 
 

inEventType An input parameter.  Logical identifier of the event(s) to wait for. 
 

timeout An input parameter. Absolute time period in time units that the resource shall wait for a specified event to occur before returning the time elapsed error.  The time unit is in milliseconds. 
 

outEventType An output parameter.  Logical identifier of the event actually received. 
 

outContext An output parameter.  A handle specifying the unique occurrence of an event. 
 
 
Note Since system resources are used when waiting for events, the viClose function needs to be called to free up event contexts (outcontext).
 
 
Use the VTL viReadSTB function to read the status byte of the service request.
 

Return Values

 
This is the functional return status.  It returns either a completion code or an error code as follows.
 

VI_SUCCESS Wait terminated successfully on receipt of an event occurrence.  The queue is empty. 
 

VI_SUCCESS_QUEUE_NEMPTY Wait terminated successfully on receipt of an event notification.  There is still at least one more event occurrence of the specified inEventType type available for this session. 
 
 

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_TMO Specified event did not occur within the specified time period. 
 
 

See Also

viClose. Also refer to the "Using Events and Handlers" section in Chapter 4, "Programming with VTL," for more information on event handling. 
 

AUTHOR

viWaitOnEvent was developed by HP
 

Hewlett-Packard Comapny  —  September 29, 1999

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026