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

General SPI Programming Guidelines
SPI Programming Manual427506-006
5-30
Subsystem ID
Choose a value for the subsystem-number field. If your company is writing more than
one subsystem, this number should be unique for each subsystem.
Your version numbers need not have the letter-number format used by software for
NonStop servers. You can use any version numbering scheme representable with 16-
bit unsigned numbers.
Requester-Server Communication
These considerations apply to communication between your subsystem server and the
application requesters that send commands to it:
Server Startup
Servers that are started dynamically using NEWPROCESS or PROCESS_CREATE_
follow the standard startup message protocol. The server should follow the standard
practice of verifying that the startup message is from the process that created it. (You
can use the INITIALIZER procedure to do this verification automatically.)
For servers that can be started directly by the requester, keep in mind that a requester
written in TAL or C might not be passing along assign and param messages (because
this does not happen automatically in TAL or C). Carefully consider any plans to have
the server use assign or param information.
Identifying SPI Messages From Applications
Requesters that send SPI command messages to your subsystem do so by opening
your server with a process-name qualifier of #ZSPI, which then appears as the first
qualifier name in the interprocess OPEN message. Your server should expect all SPI
messages it receives to come through opens with this qualifier.
Receiving Commands and Sending Responses
In writing a subsystem, you are programming from a point of view different from that of
a management application. The application sends commands to the subsystem as SPI
buffers and processes the response buffers resulting from those commands. The
subsystem receives and processes command buffers and sends the appropriate
replies.
A server reads each SPI command message from its $RECEIVE file. To read the
message and reply to it, a TAL program ordinarily uses the file-system procedures
Note. When subsystems from a number of different suppliers are installed on a given system,
there is a potential for confusion and improper operation if two subsystems share the same
owner and subsystem number. Organizations developing subsystems should carefully select a
Z-OWNER value that is unlikely to be duplicated by other organizations developing
subsystems. The company name is often a good choice, but it might not always be suitable.
Because HP does not maintain a registry of these names, HP cannot guarantee that conflicts
will not occur.