SPI Programming Considerations
NonStop Pathway/iTS Management Programming Manual—426749-002
3-35
Command Presentation
Generating The ZPWYC Include File
Under certain conditions, the DDL compiler introduces an extra level in the structure
definitions in the ZPWYC file. If any C compiler errors indicate a problem with the
structure fields, make sure the structure definition in the ZPWYC file matches the
structure used in the program.
Issuing Commands to PATHMON
Use the WRITEREADX procedure (not the WRITEREAD procedure) to send
commands and receive responses; it provides a 32-bit value for the address of the
command buffer (which you allocate using the MALLOC function).
Receiving String Values in Responses
Always terminate string values with a null character before using them. All string-
manipulating functions in C require that strings are terminated by a null character.
However, string values retrieved from a response buffer might not always be
terminated as expected. Failure to add a null character to the end of a string value
results in problems that are difficult to detect.
Command Presentation
In the following sections, information on each command and its associated object type
includes the following:
•
A description of the command and its effect
•
Information on continuation
•
A syntax box listing the following:
•
The command token (the symbolic name for the command number)
•
The object-type token (the symbolic name for the object type accepted by the
command)
•
Tokens in the command buffer, which are specific to the command. (Token
descriptions are in Section 5, ZPWY-DDL- Definitions, and Section 6, ZPWY-
MAP- Definitions.)
•
Tokens in the response buffer, which are specific to the command. (Token
descriptions are in Section 5, ZPWY-DDL- Definitions, and Section 6, ZPWY-
MAP- Definitions.)
Caution. Data is often structured. When putting a null character at the end of a string
field, be careful not to corrupt subsequent data.