Envoy Application Programming Manual

Table Of Contents
BISYNC Multipoint Tributary Protocol
Envoy Application Programming Manual427159-001
5-15
Message Formats
The application process then sends the data that was read from the input device to the
supervisor station, using one or more calls to the WRITE procedure. When the
transmission to the supervisor station is completed, the application process calls the
CHANGELIST procedure to set station 2’s poll state to inactive. Since a reply is
expected from the supervisor station, the application process must set its station’s select
state to active in order to receive the reply. The application process therefore sets the
select states of station 2’s devices 1 and 2 (bb01and bb02) to active. This sequence
requires the following three calls to the CHANGELIST procedure:
CALL CHANGELIST (linefnum,1,1); ! set entry 1 ("BB01")
IF < THEN... ! poll state "inactive".
CALL CHANGELIST (linefnum,4,0); ! set entry 4 ("bb01")
IF < THEN... ! select state "active".
CALL CHANGELIST (linefnum,5,0); ! set entry 5 ("bb02")
IF < THEN... ! select state "active".
Following the calls to CHANGELIST, the application process again calls the READ
procedure to monitor the line (this call to READ also causes an EOT sequence to be sent
to the supervisor station). When the supervisor station completes processing the request
and selects one of station 2’s output devices, the outstanding READ completes. The first
message from the supervisor station is returned in the line buffer of the application
process, and the address-list entry number of the selected address is returned in the entry
number field of the message control word. The application process sends the output to
the indicated device and reads messages from the supervisor station until a message
ending with an ETX character is read. At this point, the application process calls the
CHANGELIST procedure to set station 2’s select states to inactive:
CALL CHANGELIST (linefnum,4,1); ! set entry 4 ("bb01")
IF < THEN... ! select state "inactive".
CALL CHANGELIST (linefnum,5,1); ! set entry 5 ("bb02")
IF < THEN... ! select state "inactive".
The application process follows the CHANGELIST procedure with a call to the READ
procedure. At this point the supervisor station sends an EOT sequence. The receipt of
the EOT sequence causes Envoy to resume monitoring the line on behalf of the
application process. This READ does not complete until the application process again
sets a station’s poll state to active and that station is polled.
Message Formats
A message is defined as the information transmitted over a communications line as a
result of a single call to a READ, a WRITE, or a WRITEREAD procedure.
The information read to or written from the line-buffer area of the application process
consists of two parts: a one-word message control word (MCW) and the message.
line buffer[0] = MCW
line buffer[1:ms - 1] = message