Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

viRead(3)

HP-UX

NAME

viRead − Reads data and stores it in a buffer

SYNOPSIS

viRead(ViSession vi, ViPBuf buf, ViUInt32 count, ViPUInt32 retCount);

 

Description

 
This function synchronously transfers data from a device.  The data that is read is stored in the buffer represented by buf.  This function returns only when the transfer terminates.  Only one synchronous read function can occur at any one time.
 
 
NOTE You must set specific attributes to make the read terminate under specific conditions.  See Appendix B, "VTL Attributes."
 
 

Parameters

 

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

buf An output parameter. Represents the location of a buffer to receive data from device. 
 

count An input parameter. Number of bytes to be read. 
 

retCount An output parameter. Represents the location of an integer that will be set to the number of bytes actually transferred. 
 
 

Return Values

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

VI_SUCCESS The function completed successfully and the END indicator was received (for interfaces that have END indicators). 
 

VI_SUCCESS_TERM_CHAR The specified termination character was read. 
 

VI_SUCCESS_MAX_CNT The number of bytes read is equal to count. 
 

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

VI_ERROR_NSUP_OPER The given vi does not support this function. 
 

VI_ERROR_TMO Timeout expired before function completed. 
 

VI_ERROR_RAW_WR_PROT_VIOL Violation of raw write protocol occurred during transfer. 
 

VI_ERROR_RAW_RD_PROT_VIOL Violation of raw read protocol occurred during transfer. 
 

VI_ERROR_OUTP_PROT_VIOL Device reported an output protocol error occurred during transfer. 
 

VI_ERROR_BERR Bus error occurred during transfer. 
 

VI_ERROR_INV_SETUP Unable to start read function because setup is invalid (due to attributes being set to an inconsistent state). 
 

VI_ERROR_NCIC The interface associated with the given vi is not currently the controller in charge. 
 

VI_ERROR_NLISTENERS No Listeners condition is detected (both NRFD and NDAC are deasserted). 
 
 

See Also

 
viWrite
 

AUTHOR

viRead was developed by HP
 

Hewlett-Packard Comapny  —  September 29, 1999

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