Envoy Application Programming Manual

Table Of Contents
Software Concepts
Envoy Application Programming Manual427159-001
2-13
Point-to-Point Operation
When a station has data to send, it bids for the line by calling the WRITE procedure.
The bid (that is, an ENQ) is automatically sent across the line when you issue a WRITE
while the controller is in the CONTROL state. For the bid to be successful, the remote
station must be monitoring the line with a call to the READ procedure.
If the receiver is monitoring the line, Envoy acknowledges the line bid, accepts the
transmission, deposits the received data in the application buffer, and returns an error
code of zero (operation successful). The transmission is not acknowledged until the
application issues a continuation READ. The initial WRITE by the transmitter that
causes a bid for the line also transmits the first message if the line bid is successful.
Subsequent calls to WRITE transmit messages but do not cause a bid for the line. The
end of transmission (EOT) is indicated by the transmitter when it calls the READ
procedure to again monitor the line.
If the receiver is not monitoring the line, the transmitter’s initial WRITE completes with
an error 171 (no response or invalid response received).
Example 2-4
shows the interaction between WRITE procedure calls in the transmitting
station and READ procedure calls in the receiving station.
Example 2-3. Monitor the Line for Incoming Messages
Receiver Receiver
CALL READ CALL READ
| |
| |
(READ completes) (READ completes)
error = 162 error = 162
Following the receipt of the "operation timed out" error, the
line state is CONTROL.