-- *****************************************************************
-- RAISECOM-ERPS-MIB.MIB:  Raisecom ERPS MIB file
--
-- Jul. 2009, guoxiaodan
--
-- Copyright (c) 1994-2010, 2010 by Raisecom, Inc.
-- All rights reserved.
-- Modify Record    
-- 20120203,huxiangfeng,ROS00009982, rcErpsLastStatusOccurдȨ޲ȷ
-- 20120116,huochao,ROS00009650 V5R0 ERPS WTBʱ֧
-- 20111022, yangzhonghong,޸ĽڵrcErpsFdLinkȡֵΪ12
-- 20111018yangkewei,ROS00005290޸rcErpsLinkDirectionȡֵΪ{1,2}
-- 20110803, guoxiaodan, mibУ޸
-- *****************************************************************
RAISECOM-ERPS-MIB  DEFINITIONS ::= BEGIN

IMPORTS
       iscomSwitch
		   FROM RAISECOM-BASE-MIB 
	   MODULE-IDENTITY, OBJECT-TYPE, Integer32,
       Unsigned32, Gauge32, NOTIFICATION-TYPE
           FROM SNMPv2-SMI                  -- RFC2578
       TEXTUAL-CONVENTION, RowStatus,
       MacAddress, TruthValue
           FROM SNMPv2-TC                   -- RFC2579
       EnableVar,Vlanset
           FROM SWITCH-TC;

   
rcErps MODULE-IDENTITY
    LAST-UPDATED "1010210000Z"
    ORGANIZATION "Raisecom China World"
    CONTACT-INFO
            " 
             Phone:  01082884499
             Email:  support@raisecom.com"
    DESCRIPTION
            "The MIB module for Ethernet Ring protocol."
    REVISION      "0907270000Z"
    DESCRIPTION
            "Ethernet Ring Protection Switch MIB."
    ::= {iscomSwitch 53}
   
  rcErpsBaseGroup           OBJECT IDENTIFIER ::= { rcErps 1 } 
  rcErpsFailureDetGroup     OBJECT IDENTIFIER ::= { rcErps 2 }
  rcErpsTrapGroup           OBJECT IDENTIFIER ::= { rcErps 3 }
     
 -- rcErpsBaseGroup 
 -- ---------------------------------------------------------------- --
    rcErpsTrapEnable OBJECT-TYPE
        SYNTAX EnableVar
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Indicates whether traps for G.8032
 	         should be generated or not." 
        DEFVAL { disable }
        ::= { rcErpsBaseGroup 1 }

    rcErpsCfgTable OBJECT-TYPE
		SYNTAX SEQUENCE OF RcErpsCfgEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A table of erps configuration and associated properties."
        ::= { rcErpsBaseGroup 2}

    rcErpsCfgEntry OBJECT-TYPE
        SYNTAX RcErpsCfgEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "Table entry for erps configuration and associated properties."
        INDEX { rcErpsId }
        ::= { rcErpsCfgTable 1 }

    RcErpsCfgEntry ::= SEQUENCE {  
		rcErpsId                Unsigned32,
		rcErpsName		        OCTET STRING(SIZE (1..32)),   
        rcErpsEastPort          Integer32,
        rcErpsWestPort          Integer32,
        rcErpsNodeType          Integer32,
        rcErpsRplLink           Integer32,
        rcErpsRevertMode        Integer32,
        rcErpsBlockVlanList     Vlanset,
        rcErpsForceSwitch       Integer32,
        rcErpsManualSwitch      Integer32,
        rcErpsGuardTime         Unsigned32,
        rcErpsWtrTime           Unsigned32,
        rcErpsWtbTime           Unsigned32,
        rcErpsHoldOffTime       Unsigned32,
        rcErpsProtocolPropagate Integer32,
        rcErpsClearAdminCmd     TruthValue,
        rcErpsProtocolVlan      Integer32,
        rcErpsProtocolVersion   Integer32,
        rcErpsRapsVC            Integer32,
        rcErpsRowStatus         RowStatus
        } 

    rcErpsId OBJECT-TYPE
        SYNTAX  Unsigned32(1..255)
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "An index uniquely identifies a Ring, which ranges from 1~255. This value can't be modified after created."
        ::= { rcErpsCfgEntry 1 }

    rcErpsName OBJECT-TYPE
        SYNTAX  OCTET STRING (SIZE (1..32))
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Name for the associtaed Ring protection."  
        ::= { rcErpsCfgEntry 2 }

    rcErpsEastPort OBJECT-TYPE
        SYNTAX  Integer32
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "The east port of the ring node."
        ::= { rcErpsCfgEntry 3 }

    rcErpsWestPort OBJECT-TYPE
        SYNTAX  Integer32
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "The west port of the ring node."
        ::= { rcErpsCfgEntry 4 }       

    rcErpsNodeType OBJECT-TYPE
        SYNTAX  Integer32{
			transfer(0),
			owner(1),
			neighbour(2)
			} 
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "The type of the ring node."  
        DEFVAL { 0 }
        ::= { rcErpsCfgEntry 5 } 

    rcErpsRplLink OBJECT-TYPE
        SYNTAX  Integer32{
			east(0),
			west(1)
			} 
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "The position of RPL, when rcErpsNodeType=owner(1) it make sense." 
        ::= { rcErpsCfgEntry 6 }

    rcErpsRevertMode OBJECT-TYPE
        SYNTAX  Integer32{
			revertive(1),
			non-revertive(0)
			} 
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
            "The mode of revertive node." 
        DEFVAL{1}
        ::= { rcErpsCfgEntry 7 }

    rcErpsBlockVlanList OBJECT-TYPE
        SYNTAX      Vlanset  
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
           "Traffic Vlanlist of the specific ring."
        ::= { rcErpsCfgEntry 9 }

    rcErpsForceSwitch OBJECT-TYPE
        SYNTAX      Integer32{
                    east(0),
                    west(1),  
                    none(2),
                    both(3)}    
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
           "This command forces a block on the ring port where the command is issued."  
        DEFVAL{2}
        ::= { rcErpsCfgEntry 10 }

    rcErpsManualSwitch OBJECT-TYPE
        SYNTAX      Integer32{
                    east(0),
                    west(1),
                    none(2)}    
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
           "In the absence of a failure or FS, this command forces a block on the ring
            port where the command is issued."   
        DEFVAL{2}
        ::= { rcErpsCfgEntry 11 }

    rcErpsGuardTime OBJECT-TYPE
        SYNTAX Unsigned32 (20..2000)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The guard timer is used  to prevent Ethernet ring nodes from acting upon 
            outdated R-APS messages and prevents the possibility of forming a closed loop.
            The period of the guard timer may be configured by the operator in 10 ms steps 
            between 10 ms and 2 seconds, with a default value of 500 ms."
        DEFVAL { 500 }
        ::= { rcErpsCfgEntry 12 }

    rcErpsWtrTime OBJECT-TYPE
        SYNTAX Unsigned32 (1..12)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "In revertive mode of operation, to prevent frequent operation of the protection switch 
            due to an intermittent defect, a failed working transport entity must become fault-free. 
            After the failed working transport entity meets this criterion, a fixed period of time 
            shall elapse before a normal traffic signal uses it again. This period, called 
            wait-to-restore (WTR) period, may be configured by the operator in 1 minute steps 
            between 5 and 12 minutes; the default value is 5 minutes."
        DEFVAL { 5 }
        ::= { rcErpsCfgEntry 13 }

    rcErpsWtbTime OBJECT-TYPE
        SYNTAX Unsigned32 (1..12)
        MAX-ACCESS read-write
        STATUS deprecated
        DESCRIPTION
            "The Wtb timer, called wait-to-block timer, may be configured by the operator in 1 second steps 
            between 1 and 12 seconds;"
        DEFVAL { 5 }
        ::= { rcErpsCfgEntry 14 }

     rcErpsHoldOffTime OBJECT-TYPE
        SYNTAX  Unsigned32(0..100)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "When a new defect or more severe defect occurs (new SF), this event will not be 
            reported immediately to protection switching if the provisioned holdoff timer 
            value is non-zero. Instead, the holdoff timer will be started. When the holdoff 
            timer expires, whether a defect still exists on the trail that started the timer
            will be checked. If one does exist, that defect will be reported to protection 
            switching. Each protection group should have a provisionable holdoff timer. The 
            suggested range of the holdoff timer is 0 to 10 seconds in steps of 100 ms with 
            an accuracy of 5 ms."
        DEFVAL { 0 }
        ::= { rcErpsCfgEntry 15 }    

    rcErpsProtocolPropagate OBJECT-TYPE
        SYNTAX      Integer32 {
			enable(1),
			disable(2)
			}  
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
           "The interconnection flush logic is used for interconnection node. It receives topology change notifications 
           from other connected entities, e.g. a sub-ring ERP control process, and if MI_Propagate_TC is enabled 
           it flushes the FDB for the local ring links and triggers transmission of R-APS event requests to both ring ports."
        DEFVAL{2}
        ::= { rcErpsCfgEntry 16 }

    rcErpsClearAdminCmd OBJECT-TYPE
        SYNTAX TruthValue 
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
           "Clear the FS/MS command."
        DEFVAL{2}
        ::= { rcErpsCfgEntry 17 }       
  
    rcErpsProtocolVlan OBJECT-TYPE
        SYNTAX Integer32 (1..4094)  
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The Vlan of APS packet."
        ::= { rcErpsCfgEntry 18 }  
   
     rcErpsProtocolVersion OBJECT-TYPE
        SYNTAX Integer32{
			v1(1),
			v2(2)
			}
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The version of the protocol."
	    DEFVAL{ 1 }
           ::= { rcErpsCfgEntry 19 } 

    rcErpsRapsVC OBJECT-TYPE
        SYNTAX Integer32 {
			with(1),
			with-out(2)
			} 
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The way to implement a sub-ring"
	    DEFVAL{ 1 }
         ::= { rcErpsCfgEntry 20 } 

    rcErpsRowStatus OBJECT-TYPE
        SYNTAX      RowStatus  
        MAX-ACCESS  read-create
        STATUS      current
        DESCRIPTION "This object is responsible for managing the creation, deletion and modification of rows,
                    which support active status and CreatAndGo, destroy operation.
	                This object is responsible for managing the creation, deletion and modification of rows,
                    which support active status and CreatAndGo, destroy operation."
        DEFVAL{false}
        ::= { rcErpsCfgEntry 21 }

-- cErpsStatusTable 
    rcErpsStatusTable OBJECT-TYPE
		SYNTAX SEQUENCE OF RcErpsStatusEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A table of erps status information."
        ::= { rcErpsBaseGroup 3}

    rcErpsStatusEntry OBJECT-TYPE
        SYNTAX RcErpsStatusEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A table of erps status information."
        INDEX { rcErpsId }
        ::= { rcErpsStatusTable 1 }

    RcErpsStatusEntry ::= SEQUENCE {  
		rcErpsStatus               	Unsigned32,
		rcErpsLastStatusOccur		TimeTicks,
		rcErpsSwitchCounts		    Unsigned32,
		rcErpsClearStatistics		TruthValue
	}

    rcErpsStatus OBJECT-TYPE
        SYNTAX Unsigned32 {
			idle(1),
			protection(2),
			ms(3),
			fs(4),
			pending(5)
			}
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Ethernet bridge status.The default state is pending;"
        ::= { rcErpsStatusEntry 1} 

    rcErpsLastStatusOccur OBJECT-TYPE
        SYNTAX TimeTicks 
        MAX-ACCESS  read-only
        STATUS current
        DESCRIPTION
            "Time when last switch happens."
        ::= { rcErpsStatusEntry 2 } 

    rcErpsSwitchCounts OBJECT-TYPE
        SYNTAX Unsigned32 
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "The times of bridge state switching."
        ::= { rcErpsStatusEntry 3 } 

    rcErpsClearStatistics OBJECT-TYPE
        SYNTAX TruthValue
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Clear the statistics or not."
        DEFVAL{2}
        ::= { rcErpsStatusEntry 4 } 

-- rcErpsLinkStatusTable
   rcErpsLinkStatusTable OBJECT-TYPE
		SYNTAX SEQUENCE OF RcErpsLinkStatusEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A table of erps link status information."
        ::= { rcErpsBaseGroup 4}

    rcErpsLinkStatusEntry OBJECT-TYPE
        SYNTAX RcErpsLinkStatusEntry 
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A table of erps link status information."
        INDEX { rcErpsId, rcErpsLinkDirection }
        ::= { rcErpsLinkStatusTable 1 }

    RcErpsLinkStatusEntry ::= SEQUENCE {  
		rcErpsLinkDirection		    Integer32,
		rcErpsLinkTrafficStatus		Integer32,
		rcErpsLinkLastStatusOccur	TimeTicks,
		rcErpsLinkSwitchCounts		Unsigned32,
		rcErpsLinkRapsTx	    	Unsigned32,
		rcErpsLinkRapsRx		    Unsigned32,
		rcErpsLinkFlushCounts		Unsigned32
		
		}

    rcErpsLinkDirection OBJECT-TYPE
        SYNTAX Integer32 {
			east(1),
			west(2)
			} 
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "The direction of the Erps link."
        ::= { rcErpsLinkStatusEntry 1 } 

    rcErpsLinkTrafficStatus OBJECT-TYPE
        SYNTAX Integer32 {
			block(1),
			forwarding(2)
			}   
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Status of ethernet ring port, including block and forward."
        ::= { rcErpsLinkStatusEntry 2 } 


    rcErpsLinkLastStatusOccur OBJECT-TYPE
        SYNTAX TimeTicks  
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "The time of last traffic status changed."
        ::= { rcErpsLinkStatusEntry 3 } 


    rcErpsLinkSwitchCounts OBJECT-TYPE
        SYNTAX Unsigned32 
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Switch count of link state between block and forward state."
        ::= { rcErpsLinkStatusEntry 4 } 

    rcErpsLinkRapsTx OBJECT-TYPE
        SYNTAX Unsigned32 
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Packet number which sent to the ring link."
        ::= { rcErpsLinkStatusEntry 5 } 

    rcErpsLinkRapsRx OBJECT-TYPE
        SYNTAX Unsigned32 
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Packet number which received from the ring link."
        ::= { rcErpsLinkStatusEntry 6 } 

    rcErpsLinkFlushCounts OBJECT-TYPE
        SYNTAX Unsigned32 
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "The times of mac flushing"
        ::= { rcErpsLinkStatusEntry 7 } 

-- rcErpsFailureDetGroup 

 -- rcErpsFailureDetTable 
    rcErpsFailureDetTable OBJECT-TYPE
		SYNTAX SEQUENCE OF RcErpsFailureDetEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A table of erps failure information."
        ::= { rcErpsFailureDetGroup 1}

    rcErpsFailureDetEntry OBJECT-TYPE
        SYNTAX RcErpsFailureDetEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A table of erps failure detecting."
	INDEX { rcErpsId, rcErpsFdLink }
        ::= { rcErpsFailureDetTable 1 }

    RcErpsFailureDetEntry ::= SEQUENCE {  
    rcErpsFdLink		INTEGER,
	rcErpsFdType		INTEGER,
	rcErpsFdLinkStatus	INTEGER,
	rcErpsFdSfType		INTEGER,
	rcErpsFdMdName		OCTET STRING,
	rcErpsFdMaName		OCTET STRING,
	rcErpsFdLocalMep	INTEGER,
	rcErpsFdRemoteMep	INTEGER,
    rcErpsFdMdLevel       INTEGER
    }

    rcErpsFdLink OBJECT-TYPE
        SYNTAX INTEGER{
		east(1),
		west(2)	
		}
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "The link of failure detecting."
        ::= { rcErpsFailureDetEntry 1 } 

    rcErpsFdType OBJECT-TYPE
        SYNTAX INTEGER{	
        physical-link(1),
		cc(2),
		both(3)
		}
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
             "The failure detection type for the link."
	DEFVAL{ 1 }
        ::= { rcErpsFailureDetEntry 2 } 

    rcErpsFdLinkStatus OBJECT-TYPE
        SYNTAX  INTEGER{
 			ok(1),
 			sf(2)
		  	}
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "The link status."  
        ::= { rcErpsFailureDetEntry 3 }

    rcErpsFdSfType OBJECT-TYPE
        SYNTAX  INTEGER{ 
        	none(0),
 			physical-link(1),
 			cc(2),
 			both(3)}
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "The failure detect types which have triggered SF."    
        ::= { rcErpsFailureDetEntry 4 } 
 
    rcErpsFdMdName OBJECT-TYPE
        SYNTAX  OCTET STRING (SIZE(1..16))
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The Maintenance Domain name. Each Maintenance Domain has unique name amongst all 
            those used or available to a service provider or operator.  It facilitates easy 
            identification of administrative responsibility for each Maintenance Domain."
        ::= { rcErpsFailureDetEntry 5 }
    
    rcErpsFdMaName OBJECT-TYPE
        SYNTAX  OCTET STRING(SIZE(1..13))
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The Short Maintenance Association name. The type/format of this object is determined 
            by the value of the dot1agCfmMaNetNameType object.  This name must be unique 
            within a maintenance domain."
        ::= { rcErpsFailureDetEntry 6 } 

    rcErpsFdLocalMep OBJECT-TYPE
        SYNTAX  INTEGER(1..8191)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Local MEPId of working or protection entity, identifying a specific MEP."
          ::= { rcErpsFailureDetEntry 7 }

    rcErpsFdRemoteMep OBJECT-TYPE
        SYNTAX  INTEGER(1..8191)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Remote MEPId of working or protection entity, identifying a specific MEP."     
        ::= { rcErpsFailureDetEntry 8 }

    rcErpsFdMdLevel OBJECT-TYPE
        SYNTAX  INTEGER(0..7)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The level of traffic." 
        DEFVAL{0}
        ::= { rcErpsFailureDetEntry 9 }
-- rcErpsTrapGroup
-- Notification Definition section 

   rcErpsLinkTrafficChangeTrap NOTIFICATION-TYPE
         OBJECTS {
           rcErpsLinkTrafficStatus
           }
         STATUS  current
         DESCRIPTION
             "Generated when port state changes between block and forward status."
         ::= { rcErpsTrapGroup 1 }

   rcErpsStatusChangeTrap NOTIFICATION-TYPE
         OBJECTS {
           rcErpsStatus
           }
         STATUS  current
         DESCRIPTION
             "Generated when bridge state changes between idle and protection state."
         ::= { rcErpsTrapGroup 2 }    
         
   rcErpsFopMismatch NOTIFICATION-TYPE
         OBJECTS {
           rcErpsId
           }
         STATUS  current
         DESCRIPTION
             "Generated when the configuration is wrong on the ring."
         ::= { rcErpsTrapGroup 3 }
  END

