Sun Microsystems S16A manual s16aread, s16aserialread, Description, Syntax, Arguments, s16ap, size

Models: S16A

1 46
Download 46 pages 17.09 Kb
Page 19
Image 19

S16A User’s Guide

Input and Output

s16a_read

Description

Performs a read on the S16A. The UNIX 2 GB file offset bug is avoided during large amounts of input or

output, that is, reading past 231 does not fail. This call is not multibuffering, and no transfer is active when it completes.

Syntax

int s16a_read(S16aDev *s16a_p, void *buf, int size);

Arguments

 

s16a_p

S16A device handle returned from s16a_open

buf

address of buffer to read into

size

size of read in bytes

Return

The return value from read; errno is set by read on error.

s16a_serial_read

Description

Read a response string from the Analog Input Module.

Syntax

int s16a_serial_read(S16aDev *s16a_p, char *buf, size);

Arguments

 

s16a_p

S16A device struct, returned from s16a_open

buf

Array of characters to receive the response string from the Analog Input Module

size

Number of characters in the buffer

Return

Returns the actual number of bytes transferred; or –1 on ioctl error. Sets errno on failure.

EDT, Inc. October, 1996

15

Page 19
Image 19
Sun Microsystems S16A s16aread, s16aserialread, Description, Syntax, Arguments, s16ap, address of buffer to read into