SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Internal Structures
SPI Programming Manual427506-006
C-5
Token Structure
Token Structure
A token consists of a token code (qualified by a subsystem ID) and a token value.
Token Code
The token code is stored in either a simple format (when qualified by the default
subsystem ID), or an extended format (when qualified by a subsystem ID other than
the default).
The token-code structure is:
STRUCT ZSPI^DDL^TKNCODE^DEF(*);
BEGIN
INT(32) Z^TKNCODE;
INT Z^TKNTYPE = Z^TKNCODE;
STRUCT Z^TKN = Z^TKNCODE;
BEGIN
UNSIGNED(1) Z^EXTENDED; ! True if extended format
UNSIGNED(7) Z^DATATYPE; ! Token data type
UNSIGNED(8) Z^BYTELEN; ! Token length
INT Z^NUMBER; ! Token number
END;
STRUCT Z^TKNSSID; ! Optional subsystem ID
BEGIN
INT Z^SSOWNER[0:3];
INT Z^SSNUM;
INT Z^SSVERSION;
END;
END;
If the token-length field (ZTKN^BYTELEN) of the token code is less than 255, it
specifies the length in bytes of the associated token value. If the token-length field is
Figure C-2. Internal Format of Token Code
1 Type Length Number Subsystem ID
0 Type Length Number
Simple Format
Extended Format
VST024.vsd