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

ZSPI Data Definitions
SPI Programming Manual427506-006
4-45
Token Length
Token Length
The second part of the token code is the token length. For fixed-length token values up
to 254 bytes long, this field gives the length of the token value in bytes. When the
value of this field is 255, the token value is either variable length or a fixed length
greater than 254 bytes. When the fixed length is greater than 254, the actual length is
supplied in a succeeding word. The special operator ZSPI-TKN-LEN returns the token
length. For a variable-length token, the actual length is in the first 16 bits of the token
value. To protect against overwriting data, check the length of a variable-length token
before calling SSGET to retrieve it.
ZSPI-TLN-VARIABLE
ZSPI-TLN-VARIABLE is the token-length value 255 that indicates a variable-length
token or a token longer than 254 bytes.
Command Numbers
Basic SPI defines a single command number, ZSPI-CMD-GETVERSION, for the
GETVERSION command. Any additional commands must be defined by a subsystem
or drawn from some other common source, such as the SPI common extensions
ZCOM definitions described in the
SPI Common Extensions Manual
.
ZSPI-CMD-GETVERSION
ZSPI-CMD-GETVERSION is the command number for the GETVERSION command.
Its value is zero. Subsystems use this value to define the command number for their
GETVERSION commands.
Object-Type Numbers
Basic SPI does not define any object-type numbers. However, SPI does require that
subsystems use the number 0 to represent the null object type, which is used in
commands when it is either unnecessary or inappropriate to specify a particular object
type. (SPI defines ZSPI-VAL-NULL-OBJECT-TYPE for this purpose. See
Miscellaneous Values
on page 4-47.) All other object types must be defined by a
subsystem or drawn from some other common source, like the SPI common
extensions ZCOM definitions described in the
SPI Common Extensions Manual.
constant ZSPI-TLN-VARIABLE value is 255.
constant ZSPI-CMD-GETVERSION value is 0.