Envoy Application Programming Manual

Table Of Contents
Asynchronous Line Supervisor Protocol
Envoy Application Programming Manual427159-001
10-15
READ Procedure
A READ on the line is always present if no error condition has occurred. The
application process should always issue another READ.
A READ remains active until either a carrier or a data set ready loss is detected or until
a WRITE is issued. The application can cancel the READ at any time by calling WRITE
or WRITEREAD. A call to SETMODE (15, timeout^value) with a small timeout value
followed by a READ immediately returns the data remaining in the buffer.
If Envoy returns with error 171 (no response received) in response to a READ, the line
is still active with a READ. The line interface continues to accept data and to fill the
buffer. The application can call READ again with no resulting loss of data.
Table 10-11
lists the file-system errors that may occur on a READ.
Example 10-1. MCW and the Message Block Number
Application Process Asynchronous Terminal
CALL READ (...)
| Line is now set to receive
| data if it was not set already
|
| <-- message
|
|
| <-- message
(READ completes)
if buffer block filled or
if termination character detected or
if half-duplex and carrier drops or
if timeout interval with no more data
error = 0
MCW.<8:15> contains message block number for this line
Table 10-11. File-System Errors After a READ (page 1 of 2)
Error Numbers Description
0 No error. A station responded with a message. Message is returned to the
buffer of the application process.
21 Illegal count specified. (read count larger than specified BUFSIZE)
111 Break signal detected.
120 Data parity error.
121 Data overrun occurred on the line receiver.
160 Request is invalid for device state; protocol error.
161 Impossible event occurred for line state.