Envoy Application Programming Manual

Table Of Contents
ADM-2 Multipoint Supervisor Protocol
Envoy Application Programming Manual427159-001
7-10
Polling
This example has the following components:
The address list contains six entries.
The address list is defined as a STRING array so that individual byte elements can
be initialized.
Each terminal address consists of six characters.
The first three entries (poll^count) constitute the poll list.
The last three entries (num^entries minus poll^count) constitute the select list.
The terminal addresses in the select list match the terminal address in the poll list.
Polling
The application initiates polling by calling the READ procedure. This subsection
includes:
Polling Type on page 7-11
Polling Interval on page 7-15
Poll State on page 7-16
Example 7-2. Build an Address List
LITERAL addr^size = 3, ! address size in words.
num^entries = 6, ! number of address-list
!entries.
NULL = 0, ! ASCII NULL character.
EOT = 4, ! ASCII EOT character.
ENQ = 5, ! ASCII ENQ character.
poll^count = 3; ! number of poll-list entries.
STRING
.saddr^list[ 0 : addr^size * num^entries * 2 - 1] :=
! address list.
[NULL, EOT, "11p", ENQ, ! terminal 1 poll.
NULL, EOT, "22p", ENQ, ! terminal 2 poll.
NULL, EOT, "33p", ENQ, ! terminal 3 poll.
NULL, EOT, "11q", ENQ, ! terminal 1 select.
NULL, EOT, "22q", ENQ, ! terminal 2 select.
NULL, EOT, "33q", ENQ] ; ! terminal 3 select.
INT .addr^list := @saddr^list ’>>’ 1; ! redefine as INT
!array.
CALL DEFINELIST (linefnum,addr^list,addr^size,num^entries,
poll^count,poll^type);
IF < THEN ...