module          max_number_in_system
------          --------------------
vicp            12


    system_attribute   values
    ----------------   ------
    condition          offline, integrating, online

    user_attribute     values
    --------------     ------
    location           NULL, s1, s2, s3, s4, s5, s6, s7, s9, s10, \
                       s11, s12, s13, s14, s15
    type               0036, 0035
    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        "serial comms. processor"
    comms_chassis      32_port, 16_port
    alias		string

    state              function
    -----              --------
    not_here           if (location == NULL)
    offline            if (condition == offline && req_condition == offline)
    should_be_off      if (req_condition == offline)
    online             if (condition == online && req_condition == online)
    integrating	       if (condition == integrating && req_condition == online)
    should_be_on       if (req_condition == online)

    transition      response
    ----------      --------
    offline -> should_be_on \
	/etc/cms/bin/vicpctl watchdog on & : ; \
        /etc/cms/bin/slotctl $location set chgme on ; \
        if /etc/cms/bin/right_module $name $location $type$revision ; \
        then \
            echo "$name $number condition integrating <R5000a>configuration request" > /dev/FTlog:cms ; \
            /etc/cms/bin/poweron $location ; \
            sleep 3 ; \
            if /etc/cms/bin/vicp_download $location ; \
            then \
                /etc/cms/bin/vicpctl vicp $number $location ; \
                /etc/cms/bin/vicpctl intr on ; \
                /etc/cms/bin/vicpctl vicp_on $number ; \
	    else \
		echo "$name $number failed to come online" \
                                > /dev/FTlog:console ; \
                echo "$name $number failed to come online" ; \
                echo "$name $number condition offline <R50002>module failure" > /dev/FTlog:cms ; \
	    fi ; \
        else \
            echo "$name $number condition offline <R5000d>module of required type/revision not present" >/dev/FTlog:cms; \
        fi ;

    integrating -> should_be_on \
        /etc/cms/bin/slotctl $location set power off ; \
        /etc/cms/bin/slotctl $location set chgme on ; \
        /etc/cms/bin/moduleinfo -e failure -l $location ; \
        /etc/cms/bin/phonehome $name $number $location $laststate $state ;

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

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

    online -> should_be_off \
        /etc/cms/bin/slotctl $location set chgme on ; \
        /etc/cms/bin/vicpctl vicp_off $number ;

    should_be_off -> offline \
        /etc/cms/bin/slotctl $location set power off ; \
        /etc/cms/bin/slotctl $location set chgme off ;

    online -> should_be_on \
        /etc/cms/bin/slotctl $location set power off ; \
        /etc/cms/bin/slotctl $location set chgme on ; \
        /etc/cms/bin/moduleinfo -e failure -l $location ; \
        /etc/cms/bin/phonehome $name $number $location $laststate $state ;

    should_be_on -> offline \
        /etc/cms/bin/slotctl $location set power off ; \
        /etc/cms/bin/slotctl $location set chgme off ;

    online -> offline \
        /etc/cms/bin/slotctl $location set power off ; \
        /etc/cms/bin/slotctl $location set chgme off ;

    offline -> should_be_off \
       /etc/cms/bin/slotctl $location set chgme on ; 


