nSerialSend
Function: int nSERIALSend (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
session
The session handle of the NetScan
Short
port
The port being read from.
Unsigned short
flush
Flag to indicate if the receive buffer should
be cleared.
long
timeout
The time, in milliseconds, to wait for
received data.
Short
terminator
The terminator to be used for serial input.
Short
length
The maximum number of characters to be
Transmitted from the data buffer.
Char FAR *
data
A buffer where the transmitted
Data resides.
Short FAR *
xlength
The number of characters that were sent.
Unsigned short FAR *
status
Not used
Parameter Values:
Port
NetScan = 1
Aux = 0
Flush
retain = 0
Empty = 1
Terminator
none = -1
CRLF = -3
User defined = 0 to 255
Returns: 0 if successful, error code or warning if command not completed.
Description: This function’s primary use is to send data to the NetScan’s ethernet interface. The secondary use is to
flush all characters from the NetScan’s ethernet interface receive 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 {
ErrVal = nSERIALSend(session, 1, 0, 1000, 13, 100, &dataBuffer,
&xlength, &status);
} while (errVal == -801) ;
nSessionEnd
Function: int nSessionEnd (long session);
Parameters:
long
session
The session handle of the NetScan
Returns: 0 if successful, error code if not.
Description: This function is used to end an active session. When operations with the NetScan are
completed, this function should be called to end the session.
nSwDeinit
Function: int nSWDeinit (void);
Parameters: None
Returns:0 if successful, error code if not.
Description: This function is used to de-initialize all resources allocated by the nSWInit function.
This is the last function that should be called.
Summary of Contents for OMB-NETSCAN 1500
Page 6: ...iv NetScan User s Manual...
Page 18: ...1 12 Configuring and Starting NetScan NetScan User s Manual Notes...
Page 38: ...3 8 General Information and Specifications NetScan User s Manual Notes...
Page 82: ...4 44 ChartView Software Reference NetScan User s Manual Notes...
Page 118: ...6 20 Calibration NetScan User s Manual...
Page 140: ...A ii NetScan User s Manual...
Page 192: ...API Command Reference Appendix A A 52 NetScan User s Manual Notes...
Page 237: ...Appendix D Registers Data Formats Queries NetScan User s Manual D 13...
Page 244: ...NetScan Program Examples Appendix E E 2 NetScan User s Manual...
Page 248: ...ASCII Code Summary Appendix F F 4 NetScan User s Manual Notes...
Page 250: ...NetScan Error Messages Appendix G G 2 NetScan User s Manual Notes...
Page 252: ...Abbreviations Appendix H H 2 NetScan User s Manual Notes...
Page 254: ...NetScan User s Manual...