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

SPI Concepts and Protocol
SPI Programming Manual427506-006
2-5
Token Type
has a value consisting of four integers. If the value is longer than 254 bytes, or if it is of
variable length, the token length is set to 255, and the actual length of the value is
stored in the first 2 bytes of the value itself. Both options are illustrated in Figure 2-2 on
page 2-6.
Token Type
The token data type and token length together define the token type. Token types have
symbolic names of the form subsys-TYP-desc. When writing an SPI server, you can
use the ZSPI-defined token types or define your own types based on the fundamental
ZSPI token data types.
Token Number
Following the token type in the token code is the token number. Each token code
contains a token number that uniquely identifies that token within the set of tokens
defined by a subsystem. Token numbers are signed integers in these ranges:
Token numbers have symbolic names of the form subsys-TNM-desc. Different
subsystems can define tokens with the same token number without causing a conflict,
because tokens are always qualified, explicitly or implicitly, by a subsystem ID.
SSID
Tokens that are explicitly qualified by a subsystem ID (SSID) include that SSID as part
of the token code.
Token Code
The token number, token type, and optional subsystem ID are often treated as a single
entity called the token code. Token codes have symbolic names of the formsubsys-
TKN-desc.
Figure 2-2 on page 2-6 shows two options. The first one represents a fixed-length
token value less than 255 bytes, where the length is stored in the length field of the
token code. The second option represents a variable-length token value or a value
longer than 254 bytes. A length of 255 in the token code indicates that the length of the
value is stored in the first two bytes of the value itself.
9999 through 32767 Reserved for tokens defined by NonStop operating system
software
1 through 9998 Available for HP and user tokens
512 through 0 Reserved for ZSPI tokens
32768 through 513 Reserved for tokens defined by software for the NonStop system