Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

viFlush(3)

HP-UX

NAME

viFlush − Flushes the read and write buffers

SYNOPSIS

viFlush(ViSession vi, ViUInt16 mask);

 

Description

 
This function manually flushes the read and write buffers associated with formatted I/O functions.
 

Parameters

 

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

mask An input parameter.  Specifies the action to be taken with flushing the buffer. ( See the following table.) 
 

Values for mask Parameter

 
 

VI_READ_BUF Discard the read buffer contents and if data was present in the read buffer and no END-indicator was present, read from the device until encountering an END indicator (which causes the loss of data).  This action resynchronizes the next viScanf call to read a <TERMINATED RESPONSE MESSAGE>. (Refer to the IEEE 488.2 standard.) 
 

VI_WRITE_BUF Flush the write buffer by writing all buffered data to the device. 
 

VI_READ_BUF_DISCARD Discard the read buffer contents (does not perform any I/O to the device). 
 

VI_WRITE_BUF_DISCARD Discard the write buffer contents (does not perform any I/O to the device). 
 
 
 
NOTE It is possible to combine any of these read flags with a write flag (and vice versa) by ORing the flags.  However, combining two read flags or two write flags in the same call to viFlush is illegal.
 

Return Values

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

VI_SUCCESS Buffers flushed successfully. 
 
 

VI_ERROR_INV_SESSION VI_ERROR_INV_OBJECT The given session or object reference is invalid (both are the same value). 
 

VI_ERROR_IO Could not perform read/write function because of I/O error. 
 

VI_ERROR_TMO The read/write function was aborted because timeout expired while function was in progress. 
 

VI_ERROR_INV_MASK The specified mask does not specify a valid flush function on read/write resource. 
 
 

See Also

 
viSetBuf
 

AUTHOR

viFlush was developed by HP
 

Hewlett-Packard Comapny  —  September 29, 1999

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