OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
5-43
Retrieving Information From a Root Object
•
Returns the length of the value in the string-length field of the descriptor value field
for the attribute
•
Returns OM-ELEMENTS-UNSPECIFIED in the string-elements field
If you detect either of these situations, you can retrieve the string by making another
procedure call. To retrieve a long string, call the GPI_OM_READ_ procedure. To
retrieve other strings, call GPI_OM_LIST_ again and specify a larger buffer
(string-buffer-length).
If an attribute following one for which a value is not returned has a shorter string value
that fits in the buffer, that value is returned. You should continue examining the
descriptor list after detecting OM-ELEMENTS-UNSPECIFIED to check the remaining
contents of the string buffer.
Figure 5-11 shows use of the GPI_OM_LIST_ 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. As
specified by attribute-type, the multivalued attribute to be listed is attribute type
C. As specified by value-position, the list is to start at value 1 of C. The value
for maximum-number indicates that up to three values are to be listed. string-
buffer-length allocates “xxx” octets for the length of string-buffer.
Figure 5-11. Using GPI_OM_LIST_
511CDT .CDD
Output Parameters
actual-string-length: xx octets
total-string-length: xx octets
total-number: 18
actual-number: 3
string-buffer
xxx octets
xx octets
descriptor-list
Attribute Type C
Syntax of C Value 1 of CAttribute Type C
Attribute Type C
Syntax of C
Syntax of C
Value 2 of C
Value 3 of C
Input Parameters
object: OBJECT_X_ID
string-buffer-length: xxx octets
attribute-type: Attribute Type C
maximum-number: 3
value-position: 1
OBJECT X (OBJECT_X_ID)
Attribute Type A
OM-S-Object
Object_Y_ID
1
0
OM-T-Class
OM-S-Integer
Object X
OBJECT Y (OBJECT_Y_ID)
Attribute Type F
Syntax of F
Value of F
1
OM-T-Class
OM-S-Integer
Object Y
0
2
Attribute Type C
Syntax of C
Value 0 of C
Value 1 of C
Value 2 of C
Value 3 of C
• • •
18
Attribute Type W
Syntax of W
Value of W
Attribute Type H
Syntax of H
Value of H
3