OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Recovering From Errors
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
6-13
Information Buffer
Figure 6-6 shows another view of this process. Note that each buffer structure is
identified by the first 4 octets of information contained within it (its structure type).
Following is the print_info_buffer routine that extracts the buffer information.
Depending on the structure type, the routine branches to an appropriate template to read
and display the structure. Note that, to facilitate display to a user terminal, the special
print macros used in the show_gpi_status routine are also used in print_info_buffer. The
macros are defined earlier in this section, following the listing for show_gpi_status.
Figure 6-6. Sequence for Reading the Information Buffer
606CDT .CDD
1
Pointer at buffer_address.
ZGPI-Info-5 identified and read.
Information Buffer
ZGPI-Info-5
(20 bytes)
ZGPI-Info-1
(40 bytes)
ZGPI-Info-3
(12 bytes)
Information Buffer
ZGPI-Info-5
(20 bytes)
ZGPI-Info-1
(40 bytes)
ZGPI-Info-3
(12 bytes)
Information Buffer
ZGPI-Info-5
(20 bytes)
ZGPI-Info-1
(40 bytes)
ZGPI-Info-3
(12 bytes)
Information Buffer
ZGPI-Info-5
(20 bytes)
ZGPI-Info-1
(40 bytes)
ZGPI-Info-3
(12 bytes)
3
Pointer at buffer_address + 58 bytes.
ZGPI-Info-3 identified and read.
4
No info left.
Procedure call returns.
Unread info = 54 bytes.
2
Pointer at buffer_address + 20 bytes.
ZGPI-Info-1 identified and read.
Unread info = 16 bytes.
Unread info = 0 bytes.