OSI/AS Management Programming Manual

Using SPI to Build Commands and Decode Responses
SPI Programming Considerations for OSI/AS
056785 Tandem Computers Incorporated 3–7
In these event messages, the event-number header token (ZEMS-TKN-
EVENTNUMBER) can assume any one of the set of event numbers for OSI/AS, which
are listed at the beginning of Section 6. The OSI/AS event messages are described in
Section 6.
The OSI/AS subsystem also generates common data communications (ZCOM) event
messages. These are described in the Communications Management Programming
Manual.
Subjects of Event
Messages
Depending on the event number, the subject of an event message generated by the
OSI/AS subsystem is the name of a process (ZCOM-TKN-SUBJ-PROC), a subdevice
(ZCOM-TKN-SUBJ-SU), or a service (ZCOM-TKN-SUBJ-SERV).
Other Tokens Commands, responses, and event messages for OSI/AS, like those for other
subsystems, also include other tokens providing further information. For further
general information about such tokens, their types, and the values that are predefined
for some of them, refer to the Communications Management Programming Manual.
Data Lists and Error Lists Responses from the OSI/AS subsystem can contain data lists and error lists as
described in the Distributed Systems Management (DSM) Programming Manual.
However, note that OSI/AS never returns more than one data list per response
message, even if the value of ZSPI-TKN-MAXRESP is greater than 1.
Using SPI to Build
Commands and
Decode Responses
The Distributed Systems Management (DSM) Programming Manual provides information
on how to build and send a command message and how to receive and decode a
response message. The Communications Management Programming Manual provides
additional information specific to data communications subsystems. Refer to those
manuals for details.
The following subsections provide a summary of the steps your application must take
to perform each of these tasks, followed by subsystem-specific programming
considerations.
Building and Sending a
Command Message
The following is a summary of the steps your application must take to build and send
a command message:
1. Declare a buffer of appropriate size.
2. Call the SSINIT procedure to initialize the command buffer. SSINIT sets the
values of certain header tokens, including the command, the object type, and the
target subsystem ID.
3. Call SSNULL to initialize each extensible structured token to be used in the
command.
4. Call SSPUT or SSPUTTKN to place the appropriate tokens in the buffer.
5. If you are resending a command to retrieve the next response message in a series,
call SSMOVE or SSMOVETKN to move the context token from the previous
response buffer into the command buffer.