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

SPI Concepts and Protocol
SPI Programming Manual427506-006
2-4
Token Data Type
Tokens are self-describing data items; a typical token in an SPI message carries with it
an identifying number, the data type of its value, the length of its value, and the value.
Token number, data type, and length are known collectively as the token code, and a
token is often viewed as consisting of two parts: a token code and a token value. The
token data type and token length are known collectively as the token type. Token
codes contain a subsystem ID.
Token Data Type
The token data type is the fundamental data type of the tokens value. All token types
are based on the token data types defined by SPI. Subsystems can define their own
token types, but those types must be based on the ZSPI-defined token data types.
Token data types have symbolic names of the form ZSPI-TDT-desc.
Token Length
For fixed-length token values up to 254 bytes long, the token length field contains the
length of the value in bytes. In these cases, the token length is always a multiple of the
length of the fundamental token data type. For token data type x and token length y,
the value consists of as many items of token data type x as will fit within length y. For
instance, a token of token data type ZSPI-TDT-INT (2 bytes) and a length of 8 bytes
Figure 2-1. The Basic Components of a Token
VST005.vsd
Token
The components of an unqualified token:
Token
Data Type
Token
Length
Token
Number
Token
Value
Token
Token Type
Token Code
The components of an SSID-qualified token:
Token
Data Type
Token
Length
Token
Number
Token
Value
Token Type
Token Code
Susystem
ID