TS/MP Management Programming Manual (G06.24+, H06.03+)

Server Class DEFINE Examples
NonStop TS/MP Management Programming Manual540082-001
16-2
Adding a Server Class DEFINE
[#DEF saved^define STRUCT
BEGIN
INT S^Define( 0: 475 );
END;
] == end #def saved^define
== The "define^buf" structure is used to pass the DEFINE info to PATHMON.
[#DEF define^buf STRUCT
BEGIN
INT SDLength;
INT S^Define( 0: 475 );
END;
] == end #def define^buf
#SET define^buf
== Save the DEFINE and put it in saved^define buffer. Definesave returns the
== result of the function and the length of the DEFINE.
#PUSH define^len
#SETMANY _ define^len, [#DEFINESAVE =<definename> saved^define]
== Put the length and saved DEFINE in one buffer.
#SET define^buf:SDLength [define^len]
#SETBYTES define^buf:s^define(0:475) saved^define:s^define(0:475)
== Define the SPI request buffer
[#DEF spi^request^buf struct like zpwy^ddl^msg^buffer;]
== Define the SPI reply buffer
[#DEF spi^reply^buf struct like zpwy^ddl^msg^buffer;]
== Set the ssid (subsystem ID) value, which tells SPI what product your
== system is interfacing with and the version of that product.
#SET zpwy^val^ssid [zspi^val^tandem].[zspi^ssn^zpwy].[zpwy^val^version]
== Execute SSNULL and SSINIT functions to set up the request buffer.
#SSNULL zpwy^map^sel^scdefine zpwy^ddl^sel^scdefine
#SSINIT /TYPE 0/ spi^request^buf [zpwy^val^ssid] &
[zpwy^cmd^add] /OBJECT [zpwy^obj^scdefine]/
#SSINIT /TYPE 0/ spi^reply^buf [zpwy^val^ssid] &
[zpwy^cmd^add] /OBJECT [zpwy^obj^scdefine]/
== Set the serverclass and definename in the selector token.
#SET zpwy^ddl^sel^scdefine:zname:zserverclass <serverclassname>
#SET zpwy^ddl^sel^scdefine:zname:zdefine =<definename>
== Load the selector token and DEFINE information into the SPI request
== buffer.
Example 16-1. ADD SCDEFINE Programming Example (page2of3)