OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-35
Retrieving Information From a Root Object
Figure 5-9 shows use of the GPI_OM_FETCH_ procedure. Conditions before the
procedure call are shown to the left of the vertical bracket; those after the call are to the
right.
The value specified for object is OBJECT_X_ID , the identifier of object X.
OM-TRUE is specified for values, indicating the call should return syntax and value
for any single-valued attributes fetched. descriptor-count is four. The four
descriptors supplied are shown in descriptor-list-in. Note that only attribute
type need be specified. string-buffer-length allocates “xxx” octets for the
length of string-buffer.
After the call, descriptor-list-out returns the type, syntax and value for
attributes A and W, the only single-valued attributes in descriptor-list-in.
Note that attribute A represents an object, as indicated by the syntax returned by
descriptor-list-out. The identifier of this object is returned as the value for
attribute A. Attribute C is multivalued, as indicated by “unspecified” returned as its
syntax by descriptor-list-out. Attribute F could not be fetched, as indicated by
“unspecified” returned as its type. That indicates there is no instance of a type F
attribute anywhere in object X (although one is present in object Y).
Finally, “xx” octets of string data are returned to the string buffer. This string data is the
value of attribute W.
Figure 5-9. Using GPI_OM_FETCH_
509CDT .CDD
OBJECT X (OBJECT_X_ID)
• • •
1
0
OBJECT Y (OBJECT_Y_ID)
2
18
Input Parameters
object: OBJECT_X_ID
Attribute Type A
Attribute Type C
Attribute Type F
Attribute Type W
values: OM-TRUE
string-buffer-len: xxx octets
OM-T-Unspecified
string-buffer
xxx octets
Output Parameters
descriptor-list-out
Attribute Type A
Attribute Type C
Attribute Type W
Object_Y_IDOM-S-Object
OM-S-Unspecified
Syntax of W Value of W
xx octets
descriptor-count: 4
descriptor-list-in
OM-T-Class
OM-S-Integer
Object X
Attribute Type A
OM-S-Object
Object_Y-ID
Attribute Type C
Syntax of
Value 0 of C
Value 1 of C
Attribute Type W
Syntax of W
Value of W
1
0
OM-T_Class
OM-S-Integer
Object Y
Attribute Type F
Syntax of F
Value of F
actual-string-length: xx octets
total-string-length: xx octets