Envoy Application Programming Manual

Table Of Contents
ADM-2 Multipoint Supervisor Protocol
Envoy Application Programming Manual427159-001
7-12
Polling Type
If a polled station responds with text, the READ completes with the line in the READ
state and an error 0 (operation successful). Along with the text message, the polled
station returns a message control word (MCW), which contains the polled station’s entry
number, to the line buffer of the application process.
If a polled terminal fails to respond to the poll or if an incorrect response is received, the
READ completes with an error indication and the entry number of the terminal in error
is returned in the message control word. Regardless of whether text was received or an
error occurred, when polling is resumed, the next terminal following the terminal that
caused polling to stop is the first terminal to be polled. For example, if terminal 1 was
the last terminal to be polled, terminal 2 is the first to be polled when polling resumes.
The program excerpt in Example 7-3
shows how to specify continuous polling.
The READ completes either when a terminal responds to the poll with a message or
when a line error is detected. If a terminal responds with a message, the entry number of
the terminal in the poll list is returned in linebuf.8:15. The message is also returned in
linebuf, and a condition code of CCE is given. If a line error is detected, the entry
number associated with the last terminal to be polled is returned in linebuf.8:15 and the
READ completes with a CCL indication.
Noncontinuous Polling
Noncontinuous polling occurs for a specified number of passes through the poll list or
until a terminal responds to the poll with text or until an error occurs. Noncontinuous
polling operates in the same manner as continuous polling except that the number of
passes through the poll list is limited. The limit is specified through the poll type
parameter of the DEFINELIST procedure or the function parameter of the
CHANGELIST procedure.
If no terminal responds with a message within the specified number of passes through
the poll list, polling stops and the READ completes with an error 176 (poll sequence
ended with no responder). Figure 7-4
shows a noncontinuous poll sequence.
Example 7-3. Specify Continuous Polling
poll^type := 0;
CALL DEFINELIST (linefnum,addr^list,addr^size,num^entries,
poll^count,poll^type);
IF < THEN ...
CALL READ (linefnum, linebuf,..);
IF < THEN ...