SPI Programming Manual (H06.24+, J06.13+)

SPI Internal Structures
SPI Programming Manual427506-007
C-4
Context Part of Header
STRING ZGROUP;
STRING ZUSER;
INT ZUSERGROUP = ZGROUP;
END;
INT ZSYSTEM;
STRUCT ZCRTPID;
BEGIN
INT ZNAME [0:2];
STRING ZCPU,
ZPIN;
END;
INT ZFLAGS; ! Console print, emphasis
END;
For more information about event messages, see the EMS Manual.
Context Part of Header
This structure, if present, follows the specialized part and contains context information
used by SSGET and SSPUT, including position descriptors and SPI error information.
The context part of the header is needed only while the SPI buffer is being built (with
SSPUT or SSMOVE calls) or examined (with SSGET or SSMOVE calls). Under some
circumstances, HP software can save space and communication time by deleting this
part of the header when it is not needed and then adding it again when it is needed.
This is one reason that programs must never assume that an SSGET call leaves the
buffer unchanged. It also explains why a call to SSGET can result in an SPI error -5
(buffer full).
STRUCT ZSPI^DDL^CONTEXT^HDR^DEF(*);
BEGIN
INT (32) Z^TKNCODE; ! Token code for context part
INT Z^TKNTYPE = Z^TKNCODE; ! fields
STRUCT Z^TKN = Z^TKNCODE;
BEGIN
STRING Z^DATATYPE; ! Token data type
STRING Z^BYTELEN; ! Token byte length
INT Z^NUMBER; ! Token number
END;
INT Z^LASTERR; ! Last nonzero status returned
INT(32) Z^LASTERRCODE; ! Token code used on call
! resulting in Z^LASTERR
STRUCT Z^POS; ! Position info for SSGET
BEGIN
INT Z^LIST; ! Byte offset to current list
INT Z^CURTKN; ! Byte offset to current token
INT Z^INDEX; ! Current index
END;
INT Z^LASTLIST; ! Byte offset to current SSPUT list
INT Z^LASTTOKEN; ! Byte offset to the last token
END;