SNAX/APC Management Programming Manual
Management Programming for SNAX/APC
Introduction to SNAX/APC
111813 Tandem Computers Incorporated 1–7
SPI Programming
Considerations
DSM applications use SPI procedures to build command buffers and to extract data
from response buffers.
Tasks for SNAX/APC Management Programming
SNAX/APC programming for DSM involves both communicating with the SCP to
configure and manage your system (control and inquiry) and communicating with
EMS to manage events that occur as the system is running. For control and inquiry,
you use the SPI procedures; for event management, you use both SPI and the EMS
procedures.
Tasks for Control and Inquiry. A DSM application program follows these steps to
communicate with SNAX/APC through the programmatic interface:
1. Start a SNAX/APC process if one is not already running.
2. Open the SCP.
3. Build a message to send to the SCP.
4. Send the message to the SCP.
5. Receive a response from the SCP.
6. Handle errors.
7. Decode the response.
8. Take any appropriate actions.
9. Close the SCP.
The subsection “Communicating With SCP” in Section 2 of this manual gives a
detailed description of these steps. Appendix B, “Programming Example,” contains an
example program that illustrates the basic tasks that must be performed in a DSM
application to send commands to and retrieve responses from the SNAX/APC
subsystem.
Tasks for Event Management. To process an event message, a DSM application must:
1. Start a consumer distributor. The distributor is configured to solicit events from
an EMS collector or logfile. It may also be configured with a filter, so that the DSM
application receives only the messages that it requires.
2. Open the SPI interface to the distributor.
3. Issue a ZEMS-CMD-GETEVENT SPI command to the distributor to retrieve an
event.
4. Use the standard operating system SPI procedures to verify the SPI response, and
to extract the ZSPI-TKN-EVENT from the response buffer. The value of this token
is the EMS event.
5. Use the EMS routines, such as EMSGET, to process the event.