The dummy processor USR provides a convenient vehicle to develop a new SU of any sort. As it is permitted to change its attributes, USR can be either a processor or a support system. It is discussed in the User Manual in the chapter Adding Code to SNOMAN. However, USR is reserved for private work, for any code that becomes part of SNOlib it is necessary to create a new SU. To add a new SU first contact the SNOMAN Coordinator to discuss it and then proceed as follows. For the purposes of the section, the new SU is assumed to have a short name xxx and is assumed to be dependent on SUs yy1, yy2 and yy3.
CSU_NML(KSU_xxx) = '... ' (supply some suitable name) CSU_NMS(KSU_xxx) = 'xxx' ISU_ATR(KSU_xxx) = DYNAMIC_PROCESSOR CALL SET_MASK( 1, ISU_SSM(1,KSU_xxx), KSU_yy1, 0 ) CALL SET_MASK( 1, ISU_SSM(1,KSU_xxx), KSU_yy2, 0 ) CALL SET_MASK( 1, ISU_SSM(1,KSU_xxx), KSU_yy3, 0 )See Program Notes of su_def.for for attribute settings:-
* xxx ... ELSEIF (ISU_ID .EQ. KSU_xxx) THEN IF (IOPER .EQ. KSU_INITIALISE) THEN CALL xxx_*_INI(MODE,IRETC) ELSEIF (IOPER .EQ. KSU_PROCESS) THEN CALL xxx_*(MODE,IRETC) ELSEIF (IOPER .EQ. KSU_TERMINATE) THEN CALL xxx_*_TRM(IRETC) ENDIF
see su_mnemonics.inc for these values.
For support systems, which are normally called directly by code, rather than by SU_CALL, add dummy entries for any routine called by the outer framework of SNOMAN i.e. the shell (SHL). Consider including additional routines that form part of its interface. For example GEO could include GE_NEAR, GE_NEXT, GE_PICK, and GE_PICK. Such routines must also generate a fatal error unless they can sensibly operate in the context of a dummy. See for example geo_dummy.inc
* include 'xxx_dummy.inc'to the Dummy SU section. Note the fact that it is commented out!
Modify an existing SU in a similar way.