Envoy Application Programming Manual

Table Of Contents
BISYNC Multipoint Tributary Protocol
Envoy Application Programming Manual427159-001
5-39
Programming Examples
Example 5-14 shows the control sequences that take place when the station is selected
and receives a message from the supervisor station.
Example 5-15
contains a program coding example for an Envoy line using the BISYNC
Multipoint Tributary protocol. The program consists of the following procedures:
The check^line procedure checks for a line completion;
The check^term procedure checks for a terminal completion
The write^term procedure displays a message on the terminal
The send procedure sends a message to the supervisor station
The doit procedure is the main execution loop.
Example 5-14. Selected Tributary Receives a Message
Tributary (Local) Supervisor (Remote)
poll state = inactive
select state = active
CALL READ
|
| <-- EOT SYN SYN Sa ENQ (select)
| ACK0 -->
| <-- message 1
(READ completes)
error = 0
line state = READ
MCW.<8:15> = 1
CALL READ
| ACK1 -->
| <-- EOT
|
(READ does not complete)
|
| <-- EOT SYN SYN PA ENQ (poll)
| EOT -->
|
v