Omega Engineering OMB-NETSCAN 1500 User Manual page 195

Ethernet/internet-based data logging & control instrument
Table of Contents

Advertisement

nSerialReceive
Function: int nSERIALReceive (long session, short port, unsigned short flush, long timeout,
short terminator, short length, char FAR *data, short FAR *xlength, unsigned short
FAR *status);
Parameters:
Long
Short
Unsigned short
long
Short
Short
Char FAR *
Short FAR *
Parameter Values:
Port
Flush
Terminator
Returns: 0 if successful, error code or warning if command not completed.
Description: This function's primary use is to read data from the NetScan's ethernet interface. The secondary use is
to flush all characters from the NetScan's ethernet interface transmit buffer. Because this function may take some
time to complete, the return value must be tested to see if the command has completed. The return value for
command pending is –801.
Example:
Do {
} while (errVal == -801);
session
port
flush
timeout
terminator
length
data
xlength
NetScan = 1
Aux = 0
retain = 0
Empty = 1
none = -1
CRLF = -3
User defined = 0 to 255
ErrVal = nSERIALReceive(session, 1, 0, 1000, 13, 100, &dataBuffer,
&xlength);
The session handle of the NetScan
The port being read from.
Flag to indicate if the receive buffer should be
cleared.
The time, in milliseconds, to wait for received data.
The terminator to be used for serial input.
The maximum number of characters to be
Read into the data buffer.
A buffer where the received characters will be
placed.
The number of characters that were read.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Omb-netscan

Table of Contents