OSI/AS Management Programming Manual
Event-Retrieval Example
Sample Programs
056785 Tandem Computers Incorporated C–29
RETURN ( warning );
END; -- proc get^warning
? PAGE "send^spi^cmd"
-------------------------------------------------------------
--
-- SEND^SPI^Cmd -
--
-- This procedure puts the finishing touches on an SPI
-- command that has been prepared by another procedure,
-- such as the SPI^Cmd^SET^Source procedure that follows.
-- The SEND^SPI^Cmd procedure subsequently sends the command
-- to the distributor and checks the response.
--
-- input - Spi^Buffer
-- output - SSError, Ems^err
--
-------------------------------------------------------------
INT PROC send^spi^cmd;
BEGIN
INT used^len;
INT .message[0:21] :=
[41, "THE DISTRIBUTOR COULD NOT LOAD THE FILTER"];
--
-- Determine how much of buffer has been used.
--
SSError := SSGetTkn( Spi^Buffer,
zSpi^Tkn^UsedLen,
used^len );
IF ( SSError <> zSpi^Err^OK ) THEN
CALL Debug;
--
-- Send the used part to the distributor.
--
CALL WriteRead( Distr^Fn,
Spi^Buffer,
used^len,
zEms^Val^BufLen );
IF <> THEN
CALL Debug;
--
-- Reset buffer length to what you declared for
-- Spi^Buffer.
--
SSError := SSPutTkn( Spi^Buffer,
zSpi^Tkn^Reset^Buffer,
SPI^BufLen );
IF ( SSError <> zSpi^Err^OK ) THEN
CALL Debug;
--
-- Response is in buffer; check for return token.