Guardian Programmer's Guide

Table Of Contents
Communicating With Devices
Guardian Programmer’s Guide 421922-014
9 - 8
Additional Device Information (G-series Only)
!Set the search option, starting from logical device
!number 0:
OPTIONS.<15> := 1;
LOGICAL^DEVICE := 0;
!Loop until no more logical device numbers:
WHILE ERROR <> 4 DO
BEGIN
!Get the device information:
ERROR := DEVICE_GETINFOBYLDEV(
LOGICAL^DEVICE;
L^INFO,L^INFO^MAXLEN,L^INFO^LEN,
P^INFO,P^INFO^MAXLEN,P^INFO^LEN,
B^INFO,B^INFO^MAXLEN,B^INFO^LEN,
!timeout!,
OPTIONS);
!Copy device information into prepared data structures:
LOGICAL^INFO ':=' L^INFO FOR (L^INFO^LEN/2);
PHYSICAL^PRIMARY^INFO ':=' P^INFO FOR (P^INFO^LEN/2);
PHYSICAL^BACKUP^INFO ':=' B^INFO FOR (B^INFO^LEN/2);
.
.
END;
.
.
Additional Device Information (G-series Only)
Some G-series processes support a new interface for obtaining more device
information than was available through the D-series DEVICE_GETINFOBYLDEV_ and
DEVICE_GETINFOBYNAME_ procedures. This interface consists of a client calling
the CONFIG_GETINFO_BYNAME2_ and CONFIG_GETINFO_BYLDEV2_
procedures, and the device returns information to a system message in response to
the call.
In addition to providing information that is common to all types of devices (such as
device type and subtype), the new interface allows devices to optionally define and
return their own device-dependent information.