SPI Programming Manual (H06.24+, J06.13+)
SPI Internal Structures
SPI Programming Manual—427506-007
C-3
Specialized Part of Header
Specialized Part of Header
The standard part of the header is followed by the specialized part, a structure that
differs depending on the header type. To users of the SPI procedures, the header type
is a header token with an unsigned integer value of either 0 for a standard command
header, or 1 for an event-message header. Internally, the header type is identified by a
token code that appears in the first two words of the specialized part. This token code
has token data type ZSPI-TDT-STRUCT, a token length equal to the length of the
remainder of the specialized part (not including the token code itself), and a token
number of either ZSPI-TNM-CMDHDR or ZSPI-TNM-EVTHDR. (The two token-
number definitions are part of the SPI standard definition files but are not described in
Section 4, ZSPI Data Definitions
. They are for HP internal use only.)
Specialized Part of Standard Command Header
The structure for the specialized part of a standard command header (for a command
or response) is:
STRUCT ZSPI^DDL^CMDHDR^DEF(*);
BEGIN
INT(32) Z^TKNCODE; ! Token code for standard
INT Z^TKNTYPE = Z^TKNCODE; ! command header
STRUCT Z^TKN = Z^TKNCODE;
BEGIN
STRING Z^DATATYPE; ! Token data type =
! ZSPI-TDT-STRUCT
STRING Z^BYTELEN; ! Token length = length of
! specialized part
INT Z^NUMBER; ! Token number =
! ZSPI-TNM-CMDHDR
END;
INT Z^COMMAND; ! Command number
INT Z^OBJECT^TYPE; ! Object-type number
INT Z^MAXRESP; ! Maximum responses
INT Z^SERVER^VERSION; ! Server version
END;
Specialized Part of Event-Message Header
Like the specialized part of a standard command header, the specialized part of an
event-message header begins with the token code, described earlier, that identifies the
header type. For an event-message header, the token number of this token code is
ZSPI-TNM-EVTHDR. The structure for the specialized fields
following this token
code—for event messages, the declared structure does not include the token code—is:
STRUCT ZEMS^DDL^EVENTHDR^DEF(*);
BEGIN
INT ZEVENT^NUMBER; ! Event number
FIXED ZGENTIME; ! Event generation time
FIXED ZLOGTIME; ! Logging time
STRUCT ZUSERID; ! User ID of generator
BEGIN










