Envoy Application Programming Manual

Table Of Contents
Software Concepts
Envoy Application Programming Manual427159-001
2-20
Selection Operation
The tributary indicates that the transmission is complete by sending an EOT
character. An EOT is sent when the tributary calls the READ procedure following a
call to the WRITE procedure (an EOT is also sent if CONTROL 13 is executed).
The receipt of the EOT results in the second READ on the supervisor side
completing with an error 163 (EOT received).
The READ by the inactive tributary B does not complete.
Selection Operation
The selection list of the supervisor station defines all stations in the multipoint network
that can be selected.
The supervisor station initiates selection by calling the WRITE procedure while the line
is in the CONTROL state. Tributary stations, whether or not they are able to receive
data, must monitor the line by calling the READ procedure.
Selection Inactive Bit
When a tributary station is unable to receive data, it must set the selection inactive bit in
the selection address in its address list. (See the DEFINELIST and CHANGELIST
procedures in Appendix C, File-System Procedures
.) The call to READ for an inactive
tributary station remains uncompleted until the application process makes the station
active, until the operation times out (that can happen only if the line is open with nowait
I/O specified), or until the station is polled.
When a tributary station is able to receive data, its selection inactive bit is reset (this
setting makes the station active for selection). When selected, the tributary’s READ
acknowledges the selection, accepts the first message from the supervisor, and
completes with an error 0 (operation successful). The tributary then repeatedly calls the
READ procedure to read subsequent messages from the supervisor. Messages are read
until an EOT indication is sent by the supervisor station. When the supervisor attempts
to write to an inactive tributary station, Envoy, on behalf of the inactive tributary, sends a
reverse interrupt (RVI), negative acknowledgment (NAK), or wait for acknowledgment
(WACK) to the supervisor station. The WRITE in the supervisor station then completes
with an error 165 (RVI received). No data is transferred.
The call to WRITE by the supervisor that attempts selection also writes the first message
to the selected tributary station. The supervisor station must then call WRITE for each
additional message to be transmitted. When no more messages are to be transferred, the
supervisor station sends an EOT indication to the tributary station (the EOT is sent when
the supervisor calls READ to again poll the multipoint network).
If the tributary station that the supervisor is attempting to select is not monitoring the
line, the supervisor’s call to WRITE completes with an error 171 (no response or invalid
response received). In Example 2-8
, station C is being selected. The data consists of two
message transfers.