module          max_number_in_system
------          --------------------
cdrom            8

    system_attribute    values
    ----------------    ------
    condition           offline, initialising, online

    user_attribute      values
    --------------      ------
    location            NULL, t0, t1, \
			d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10 \
			d11, d12, d13, d14, d15, d16, d17, d18, d19
    type                0029, 0173
    revision            A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, \
			Q, R, S, T, U, V, W, X, Y, Z, ZZ
    req_condition       offline, online
    fault_acknowledged  no, yes
    description         "SCSI cdrom drive"
    alias		string

    constituent         values
    -----------         ------
    controller          null 0, \
			ioset 0, ioset 1, \
			sec 0, sec 1, sec 2, sec 3, sec 4, \
			sec 5, sec 6, sec 7, sec 8, sec 9, \
			sec 10, sec 11, sec 12, sec 13, sec 14, sec 15

    state               function
    -----               --------
    not_here            if (location == NULL)
    inaccessible        if (controller->state != online)
    offline             if (condition == offline && req_condition == offline)
    should_be_on        if (condition == offline && req_condition == online)
    should_be_on_inz    if (condition == initialising && req_condition == online)
    should_be_off_inz   if (condition == initialising && req_condition == offline)
    online              if (condition == online && req_condition == online)
    should_be_off       if (condition == online && req_condition == offline)

    transition      response
    ----------      --------
    inaccessible -> should_be_on \
	/etc/cms/bin/slotctl $controller->location set chgme on \
	  loc $location ; \
	if /etc/cms/bin/right_module $name $location $controller->location $type$revision ; \
	then \
	    /etc/cms/bin/poweron $location $controller->location ; \
	    sleep 3 ; \
	    CON_NAME=$controller->name ; \
	    CON_NUMBER=$controller->number ; \
	    /etc/cms/bin/scsictl make $name$number: $name \
	      number `expr 96 + $number` \
	      on $$CON_NAME$$CON_NUMBER loc $location;\
	    /etc/cms/bin/scsictl send $name$number online; \
        else \
            echo "$name $number condition offline <R1000d>module of required type/revision not present" >/dev/FTlog:cms; \
	fi

    offline -> should_be_on \
	sleep 5 ; \
	/etc/cms/bin/slotctl $controller->location set chgme on \
	  loc $location ; \
	if /etc/cms/bin/right_module $name $location $controller->location $type$revision ; \
	then \
	    /etc/cms/bin/poweron $location $controller->location ; \
	    sleep 3 ; \
	    CON_NAME=$controller->name ; \
	    CON_NUMBER=$controller->number ; \
	    /etc/cms/bin/scsictl make $name$number: $name \
	      number `expr 96 + $number` \
	      on $$CON_NAME$$CON_NUMBER loc $location;\
	    /etc/cms/bin/scsictl send $name$number online; \
        else \
            echo "$name $number condition offline <R1000d>module of required type/revision not present" >/dev/FTlog:cms; \
	fi

    should_be_on -> online \
	/etc/cms/bin/sysconfig -m $name -n $number \
	  -a fault_acknowledged -v no ; \
	/etc/cms/bin/slotctl $controller->location set chgme off \
	  loc $location ; \
	/etc/cms/bin/create_devices $name $number ;

    should_be_on_inz -> online \
	/etc/cms/bin/sysconfig -m $name -n $number \
	  -a fault_acknowledged -v no ; \
	/etc/cms/bin/slotctl $controller->location set chgme off \
	  loc $location ; \
	/etc/cms/bin/create_devices $name $number ;

    online -> should_be_off \
	/etc/cms/bin/slotctl $controller->location set chgme on \
	  loc $location ; \
	/etc/cms/bin/scsictl send $name$number offline

    should_be_on_inz -> should_be_on \
	/etc/cms/bin/slotctl $controller->location set power off \
	  loc $location ; \
	/etc/cms/bin/slotctl $controller->location set chgme on \
	  loc $location ; \
	/etc/cms/bin/moduleinfo -e failure -l $location \
	  -p $controller->location ; \
	/etc/cms/bin/phonehome $name $number $location $laststate $state ;
 
    online -> should_be_on \
	/etc/cms/bin/slotctl $controller->location set power off \
	  loc $location ; \
	/etc/cms/bin/slotctl $controller->location set chgme on \
	  loc $location ; \
	/etc/cms/bin/moduleinfo -e failure -l $location \
	  -p $controller->location ; \
	/etc/cms/bin/phonehome $name $number $location $laststate $state ;
 
    should_be_off -> online \
	/etc/cms/bin/sysconfig -m $name -n $number \
	  -a fault_acknowledged -v no ; \
	/etc/cms/bin/slotctl $controller->location set chgme off \
	  loc $location ; \
	/etc/cms/bin/create_devices $name $number ;

    should_be_off -> offline \
	/etc/cms/bin/slotctl $controller->location set power off \
	  loc $location ; \
	/etc/cms/bin/slotctl $controller->location set chgme off \
	  loc $location ; \
	/etc/cms/bin/create_devices remove $name $number ; \
	/etc/cms/bin/scsictl del $name$number ;
 
    should_be_on -> offline \
	/etc/cms/bin/slotctl $controller->location set power off \
	  loc $location ; \
	/etc/cms/bin/slotctl $controller->location set chgme off \
	  loc $location ; \
	/etc/cms/bin/create_devices remove $name $number ; \
	/etc/cms/bin/scsictl del $name$number ;

    should_be_off_inz -> offline \
	/etc/cms/bin/slotctl $controller->location set power off \
	  loc $location ; \
	/etc/cms/bin/slotctl $controller->location set chgme off \
	  loc $location ; \
	/etc/cms/bin/create_devices remove $name $number ; \
	/etc/cms/bin/scsictl del $name$number  ;

