# f1200 Routing Switch
# (c) Rapid City Communications, Inc

include "first.dms"

class Chassis {
	hotswapProc "dmsHotswap 8"

	bitmap "accelar1k/v104/bitmaps/bay1200_front.gif"
	children {Card Power_supply}
        Card.positions {
		{189 37} {189 88} {189 139} {189 190} {189 241} {189 292} {189 343} {189 394}
        }
        Power_supply.positions {{27 38} {27 240}}
        Power_supply.instances {1 2}
        menu {
                {command -label "Edit..." -command {dm_DoMenu edit Chassis}}
                {command -label "Graph..." -command {dm_DoMenu graph Chassis}}
                {separator}
                {command -label "Save to NVRAM" -command {
                        dm_DoAction Sess0 {{rcSysAction.0 {} 4}}}}
                {command -label "Reset Counters" -command {
			dm_DoAction Sess0 {{rcSysAction.0 {} 5}} "Really?  This can cause monitoring\napplications to see traffic/error spike."}}
                {command -label "Reset" -command {
			if {[dmsCloseDeviceProc] != -1} {dm_DoAction Sess0 {{rcSysAction.0 {} 2}}}}}
                {separator}
		{command -label "Save to Standby NVRAM" -command {
			dm_DoAction Sess0 {{rcSysAction.0 {} 6}}}}
		{command -label "Switch to Standby CPU" -command {
			dm_DoAction Sess0 {{rcSysAction.0 {} 7}}}}
        }

}

class Power_supply {
        # We default to no power supply.
        bitmap "accelar1k/v104/bitmaps/empty.gif"
        statusVar rcChasPowerSupplyOperStatus
        status==3 {bitmap "accelar1k/v104/bitmaps/power.gif"}
        status==4 {bitmap "accelar1k/v104/bitmaps/power.gif"}
}

class Card {
	# In order to speed up card discovery I'm going to call a discoverProc
	# and get it all in one PDU.  (Sometime we should do this in the engine.)
	# You can revert to the older mechanism by uncommenting subClassVar and
	# commenting discoverProc.
	#subClassVar rcCardType
	discoverProc "dmsDiscoverrcCardType 8"
}

