Envoy Application Programming Manual

Table Of Contents
Asynchronous Line Supervisor Protocol
Envoy Application Programming Manual427159-001
10-17
WRITE Procedure
WRITE Procedure
The WRITE procedure is used to transmit a message to the line.
A WRITE causes Envoy, on behalf of the application process, to initiate a transmission
to a terminal on the line. The WRITE procedure completes when the entire message is
sent. The successful transmission of the message is indicated by a condition code of
CCE (Example 10-2
).
Table 10-13
lists the file-system errors may that occur on a WRITE.
WRITEREAD Procedure
The WRITEREAD procedure is used to write data to the line and to receive data from
the line with a READ. This procedure replaces a WRITE followed by a READ. For
example, WRITEREAD initiates a poll or select sequence on the line and Envoy returns
any response on input.
A WRITEREAD causes Envoy, on behalf of the application process, to transmit a
specified sequence and to begin processing all data received from the line. The READ
continues until a station responds with a message, an error occurs, or the message
received terminates due to a timeout. The successful receipt of a message from a
terminal returns a condition code of CCE. The variable- length message block number
of the line is returned in the message control word, bits <8:15> (Example 10-3
).
Example 10-2. WRITE Procedure
Application Process Asynchronous Terminal
CALL WRITE (...)
|
| Transmit enabled and initiated on line.
| All data in the buffer of the application
| process is transmitted.
|
| message -->
(WRITE completes)
error = 0
Table 10-13. File-System Errors After a WRITE
Error Numbers Description
0 No error. Message in the buffer of the application process is transmitted.
111 Break signal detected.
160 Request is invalid for device state; protocol error.
161 Impossible event occurred for line state.
171 Timeout on transmit. The line was not able to complete transmission
before the timeout interval.