Envoy Application Programming Manual

Table Of Contents
BISYNC Multipoint Tributary Protocol
Envoy Application Programming Manual427159-001
5-26
WRITE Procedure
WRITE Procedure
The WRITE procedure is used by a polled tributary station to transmit messages to the
supervisor station. While messages are being sent, the line is in a WRITE state. The line
returns to the CONTROL state when the tributary station sends an EOT sequence (to
indicate the completion of the transmission).
Initial WRITE (Line in CONTROL State)
A tributary station does not initiate WRITEs until it is polled by the supervisor station
(which causes the line to enter the WRITE state). Therefore, all WRITEs by a tributary
station are continuation WRITEs.
Continuation WRITE (Line in WRITE State)
A continuation WRITE causes Envoy (Example 5-8), on behalf of the application
process, to send the message in the buffer of the application process to the supervisor
station. The call to the WRITE procedure completes when the supervisor acknowledges
the message. The successful transmission of a continuation message is indicated by a
condition code of CCE upon completion of the WRITE. Following the transmission of a
continuation message, the line is in a WRITE state.
Table 5-11
lists the file-system errors that may occur on a continuation WRITE.
Example 5-8. Continuation WRITE (Line in WRITE State)
Tributary (Local) Supervisor (Remote)
line state = WRITE
CALL WRITE(...)
| message 1 -->
|
| <-- ACK1
(WRITE completes)
error = 0 line state = WRITE
Table 5-11. Continuation WRITE File-System Errors (page 1 of 2)
Error State Description Resultant Line State
0 No error. The tributary station is selected and the
message in the buffer of the application process is
written to the tributary station.
WRITE
160 Request is invalid for device state; protocol error. unknown
161 Impossible event occurred for line state. unknown
163 EOT received. An EOT was received while waiting
for an acknowledgment.
CONTROL