# Accelar 1200 Routing Switch
# (c) 1996-98 Rapid City Communications, Inc

include "first.dms"

class Chassis {
	hotswapProc "dmsHotswap 8"

	bitmap "accelar1k/v114/bitmaps/bay1200_front.gif"
	children {Card Power_supply}
        Card.positions {
			{183 43} {183 93} {183 143} {183 193} {183 243} {183 293} {183 343} {183 395}
			}
		Power_supply.positions {{22 41} {22 243}}
		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/v114/bitmaps/empty.gif"
        statusVar rcChasPowerSupplyOperStatus
        status==3 {bitmap "accelar1k/v114/bitmaps/power.gif"}
        status==4 {bitmap "accelar1k/v114/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"
}

