Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide
Sample I Process Program Code
Distributed Systems Network Management (DSNM) Subsystem Interface Development 
Guide—109759 D-13
Sample User-Written Code for SPIFFY Subsystem
Interface Process
! ERRORS
LITERAL COMMAND^DONE, COMMAND^MSG^TOOSHORT, COMMAND^INVALID,
 TYPE^INVALID, COMMAND^INVALID^FOR^TYPE, 
 COMMAND^IMPOSSIBLE, THING^NONEXISTENT, 
 POP^NONEXISTENT;
literal spiffy^name^len= 20, max^response^things = 2;
STRUCT spiffy^thing^things = 
 INT type; ! object type
 INT name^occurs; ! length of object name
 STRING name [0:spiffy^name^len-1]; ! object name
 INT pop^name^occurs; ! length of name of
 ! object’s parent
 STRING pop^name[0:spiffy^name^len-1]; ! parent name
 ! For ASSEMBLYs and subordinates
 INT state; ! ASSEMBLY state
 INT color; ! and other essentials
 INT composition;
 ! For the various REACTOR components
 INT(32) temp; ! Degrees Kelvin
 INT(32) press; ! MM Hg
 INT(32) vol; ! Liters
 INT(32) n; ! Number of elements
DEFINE starname = “* “#;
DEFINE noname = “ “#;
STRUCT spiffy^thing^def (*); BEGIN
 spiffy^thing^things;
END;
STRUCT spiffy^command^def (*); ! Command message, which also
 ! heads response message
 BEGIN
 INT cmd;
 INT type;
 INT response^context;
 STRING name[0:spiffy^name^len-1];
 STRING pop^name[0:spiffy^name^len-1];
 END;
STRUCT spiffy^response^def (*); ! Response message, which 
 ! contains cmd msg struct
 BEGIN 
 STRUCT cmd (spiffy^command^def);
 INT error;
 INT response^things;
 STRUCT thing (spiffy^thing^def) [0:max^response^things-1];
 END;
---------------------------------------------------------------------
---------------------------------------------------------------------
-------------- End of SPIFDEFS -----------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------










