Envoy Application Programming Manual

Table Of Contents
BISYNC Point-To-Point Protocol
Envoy Application Programming Manual427159-001
3-22
WRITE Procedure
Note that the ID is not acknowledged by the initial READ. Following the receipt of the
ID sequence, the called station checks the ID for validity. If the caller has an authorized
ID, the called station is expected to return its ID with a call to WRITEREAD (this call to
WRITEREAD also receives the first message from the caller). (See WRITEREAD
Procedure (ID Exchange by Caller) on page 3-27.) If the caller does not have an
authorized ID, the called station disconnects the line.
The file-system errors for an initial READ of an ID sequence are the same as those for
an initial READ from the CONTROL state.
WRITE Procedure
The WRITE procedure is used for several data communications functions, which are
described in this subsection. The possible completions of this procedure differ
depending upon the state of the Envoy line when the WRITE is issued.
Initial WRITE (Line in CONTROL State)
An initial WRITE (Example 3-6) causes Envoy, on behalf of the application process, to
bid for the line. If the remote station acknowledges the line bid, the message in the
buffer of the application process is transmitted to the remote station. The call to the
WRITE procedure completes when the remote station acknowledges the message. The
successful transmission of the initial message is indicated by a condition code of CCE
upon completion of the WRITE. Following the transmission of the initial message, the
line is in the WRITE state.
Example 3-6
shows the local station making a line bid, that is, calling an initial WRITE
with the line in CONTROL state.
Example 3-5. Initial READ of ID (Line in CONTROL State)
Local Remote
line state = DISCONNECT
CALL READ)...)
|
| <-- ID ENQ (bid)
|
(READ completes)
error = 0
line state = DISCONNECT