Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-17
DEVICEINFO
Example
The following code in Example C-4 shows how to define an address list array and pass it
to the DEFINELIST procedure for continuous polling:
In Example C-4
, station CC01 is flagged as disabled and, therefore, is not polled when
polling is subsequently initiated. Note that because the address list is initially defined as
a string, it must be redefined it to an integer array before the DEFINELIST procedure is
called.
DEVICEINFO
A call to the DEVICEINFO procedure obtains the configured device type and physical
record length of the specified line.
The form of the DEVICEINFO procedure is:
file-name input
INT:ref:12
is an array containing the name of the communications line whose characteristics are
to be returned. Any form of the 12-word internal format file name is permitted.
Example C-4. Code to Define an Address List Array
LITERAL addr^size = 3,
num^entries = 6,
polling^count = 3,
polling^type = 0,
SYN = %26,
ENQ = 5,
no^poll = %200;
STRING
.saddr^list [0:addr^size * num^entries * 2 - 1] :=
[ SYN, “AA01”, ENQ, ! entry 0, trib 1 poll.
SYN, “BB01”, ENQ, ! entry 1, trib 2 poll.
no^poll + SYN, “CC01”, ENQ, ! entry 2, trib 3 poll.
SYN, “aa01”, ENQ, ! entry 3, trib 1 select.
SYN, “bb01”, ENQ, ! entry 4, trib 2 select.
SYN, “cc01”, ENQ ]; ! entry 7, trib 3 select.
INT .addr^list := @saddr^list ’>>’ 1;
CALL DEFINELIST (fnum,addr^list,addr^size,num^entries,
polling^count,polling^type);
CALL DEVICEINFO ( file-name !i
, device-type !o
, physical record length ) !o