Envoy Application Programming Manual

Table Of Contents
BISYNC Point-To-Point Protocol
Envoy Application Programming Manual427159-001
3-49
Limited Conversational Mode
The previous programming examples show the following five major points:
The line is always permitted to timeout before the home terminal is checked for a
completion. Therefore, a line completion has precedence over a terminal
completion.
An EOT is used as a line reset signal. If an EOT is received, the process returns to an
idle state and waits for incoming messages.
If a line error other than 163 (EOT received) is encountered and the process is
currently reading, the line is cleared by sending an EOT to the remote. This causes
the remote, which is sending, to stop sending and return to the idle state.
Because line timeouts are used to control when message transmissions are initiated,
the event initiating a transmission must be permitted to occur in parallel with the line
READ. Therefore, the home terminal READ (that is, the external event) is executed
as nowait I/O. The completion of the operation at the home terminal is checked each
time the line times out.
When the sender finishes its write, it performs a READ of the line. This causes an
EOT sequence to be sent to the receiver. The EOT sequence is the receiver’s
indication that the transmission is complete.
Limited Conversational Mode
The use of limited conversational mode permits the receiving station to return text in
place of the normal positive acknowledgment.
In the following example, both the local and remote stations are Compaq systems. The
local station is the receiver; the remote station is the sender. A transmission from the
remote station consists of a series of messages; all messages but the last one are
terminated with an ETB character; the last message in a transmission is terminated with
an ETX character. Upon receipt of the last message, the local station makes a
conversational reply to the remote.
Example 3-18. Program Code for read^text and write^text (Page 5 of 5)
ELSE
IF lerror = timeout AND linestate = cntlstate THEN
BEGIN
lerror := 0;
WHILE (count := check^term(buf)) AND NOT lerror DO
lerror := write^text ( buf, count );
linestate := cntlstate;
END
ELSE ! some other error.
IF linestate = readstate THEN
BEGIN
CALL CONTROL ( linefnum, 13 ); ! send EOT.
linestate := cntlstate;
END;
END; ! while 1 do loop.
END; ! example.