Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide

Sample I Process Program Code
Distributed Systems Network Management (DSNM) Subsystem Interface Development
Guide109759 D-15
Sample User-Written Code for SPIFFY Subsystem
Interface Process
! SPIFFY Subsystem CI and Subsystem configurations
STRING .spifclass[0:ZDSN^MAX^CICLASS-1] := "SPIFMON ";
STRING .spifsys[0:ZDSN^MAX^SUBSYS-1] := "SPIFFY ";
INT .EXT spifmon (_CI^DEF);
INT .EXT spiffy (_SUBSYS^DEF);
END BLOCK;
! Other toolkit necessities
?SOURCE KDSNDEFS ( IPROCESS^GLOBALS )
?NOLIST, SOURCE EXTDECS0(DEBUG,PROCESS_STOP_?,DNUMOUT)
?SOURCE KDSNDEFS ( IPROCESS^EXTDECS )
?LIST
---------------------------------------------------------------------
---------------------------------------------------------------------
-------------- TOOLKIT Required Procs ---------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
INT PROC _STARTUP^MODE (component, compiled^in^testmode,
accept^startup^component,
subject ) EXTENSIBLE;
-- proc returns error code
STRING .EXT component; -- OUT:OPT component name, default blank
-- defined by ZDSN^DDL^OBJNAME^DEF
INT .EXT compiled^in^testmode; -- OUT:OPT any non-zero = YES, default 0
INT .EXT accept^startup^component; -- OUT:OPT any non-zero = YES, default 0
STRING .EXT subject;
BEGIN
compiled^in^testmode := _COMPILED^IN^TESTMODE;
accept^startup^component := 0;
RETURN 0;
END;
INT PROC _STARTUP (cxl, inputl) EXTENSIBLE;
INT .cxl, .inputl;
BEGIN
STRING errtext[0:29] := ["Invalid SPIFFY configuration",0];
cxl := $LEN (cx^def); ! Command thread context length
inputl := $LEN (object^lm^def); ! Frame input object list member length
! Get CI and subsystem configurations
IF _ISNULL (@spifmon := _ADD^CI (spifclass))
OR _ISNULL (@spiffy := _ADD^SUBSYS (spifsys))
THEN CALL _REPORT^STARTUP^ERROR (0, _EMS^EVENT^FATAL, errtext);
RETURN ZDSN^ERR^NOERR;
END;