CLAB-UPS-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY,
    Integer32, 
    OBJECT-TYPE             FROM SNMPv2-SMI      -- RFC 2578
    
    MODULE-COMPLIANCE       FROM SNMPv2-CONF     -- RFC 2580
 
    clabCommonMibs          FROM CLAB-DEF-MIB;

clabUpsMib MODULE-IDENTITY
    LAST-UPDATED "201801180000Z" -- January 18, 2018
    ORGANIZATION "Cable Television Laboratories, Inc."
    CONTACT-INFO
            "Postal: Cable Television Laboratories, Inc
             858 Coal Creek Circle
             Louisville, CO 80027
             U.S.A.
             Phone: +1-303-661-9100
             Fax:   +1-303-661-9199
             E-mail:mibs@cablelabs.com

             Acknowledgements:
             Sumanth Channabasappa - CableLabs
             Jean-Francois Mule, CableLabs.
             Kevin Marez, Motorola, Inc."
    DESCRIPTION
            "This MIB module provides the management objects for the
             configuration and monitoring of the battery backup & UPS
             functionality for CableLabs compliant devices.

            Copyright 2004-2018 Cable Television Laboratories, Inc.
            All rights reserved."
    REVISION "201801180000Z" -- January 18, 2018
    DESCRIPTION
            "Revised Version includes ECN MIB-BB-N-17.0165-1"  
    REVISION "201004280000Z" -- April 28, 2010
    DESCRIPTION
            "Revised Version includes ECN MIB-BB-N-10.0047-2
            and published as part of CL-SP-MIB-BB-I04-100608."  
    REVISION "200905060000Z" -- May 6, 2009
    DESCRIPTION
            "Revised Version includes ECN MIB-BB-N-09.0042-2
            and published as part of CL-SP-MIB-BB-I03-090811."  
    REVISION "200701191700Z" -- January 19, 2007
    DESCRIPTION
            "This revision published as CL-SP-MIB-BB-I02-070119."
 
    REVISION "200501280000Z" -- January 28, 2005
    DESCRIPTION
            "This revision published as CL-SP-MIB-BB-I01-050128."


    ::= { clabCommonMibs 1 }

-- Administrative assignments

clabUpsNotifications OBJECT IDENTIFIER ::= { clabUpsMib 0 }
clabUpsObjects       OBJECT IDENTIFIER ::= { clabUpsMib 1 }
clabUpsConformance   OBJECT IDENTIFIER ::= { clabUpsMib 2 }


-- Object Groups
-- The object groups used in this MIB module are imported from 
-- the IETF RFC 1628, see the module compliance statement


-- Conformance Statements
   clabUpsCompliances OBJECT IDENTIFIER ::=
                                           { clabUpsConformance 1 }
   clabUpsGroups OBJECT IDENTIFIER      ::=
                                           { clabUpsConformance 2 }

clabSupplemtalGroup OBJECT IDENTIFIER ::= { clabUpsObjects 1 }


   --   mtaDevPwrSupplyControl OBJECT-GROUP
   --       OBJECTS { mtaDevPwrSupplyBatteryTest, mtaDevPwrSupplyConfigRunTime,
   --          mtaDevPwrSupplyRatedMinutes, mtaDevPwrSupplyAvailableMinutes,
   --          mtaDevPwrSupplyConfigReplaceBatteryTime }

mtaDevPwrSupplyBatteryTest OBJECT-TYPE
     SYNTAX INTEGER {
         disableAutoTesting(1),
         testScheduled(2),
         testInProgress(3),
         testPending(4)}
     MAX-ACCESS read-write
     STATUS current
     DESCRIPTION  
       "This attribute enables the automated testing of a device's 
        battery and battery charging system when applicable. Automatic 
        battery testing is enabled by default and is performed immediately
        from a cold power start if a valid test has not been previously
        completed or if the scheduled test is due, and then repeats every
        180 days.  

        The number of days left until a battery test is scheduled to run 
        can be found using MtaDevPwrSupplyBatteryTestTime MIB. When the 
        value TestScheduled(0) is set, the battery test scheduler resumes
        at its current value.  

        When the value DisableAutoTesting(1) is set the device stops the 
        countdown timer MtaDevPwrSupplyBatteryTestTime at it's current value.
         
        When the value TestInProgress(2) is set, the device initiates the 
        battery test cycle and the MtaDevPwrSupplyBatteryTestTime object is
        reset to its default value of 180 days. This command is ignored if 
        there is a test in progress. The remaining scheduled time may be 
        skipped by issuing a value of testInProgress which will cause the 
        battery test to run immediately when AC power is present. Auto 
        testing is re-enabled (testScheduled) following the test.  

        When the test is active, the object will return the value 
        testInProgress(2), unless AC power is lost or a Full Charge has been 
        initiated. In that case, the will return the value testPending(3)."
   ::= { clabSupplemtalGroup 1 }  

mtaDevPwrSupplyConfigRunTime   OBJECT-TYPE
     SYNTAX Integer32
     UNITS "minutes"
     MAX-ACCESS read-write
     STATUS current
     DESCRIPTION
         "This attribute provides the current programmed battery backup 
          minimum run time value. The minimum battery backup run time 
          may also from this value. By programming the run-time to a 
          lower value, the total service life of the battery is extended
          by decreasing the battery's recharge threshold causing it to  
          recharge less often and to maintain a lower average charge state.
          Increasing the run-time value in turn decreases the total service
          life of the battery by causing it to recharge more often and to 
          maintain a higher average charge state. Setting this value greater
          than MtaDevPwrSupplyAvailableMinutes will not provide a run-time 
          greater than the value in MtaDevPwrSupplyAvailableMinutes."
    ::= { clabSupplemtalGroup 2 }  

mtaDevPwrSupplyRatedMinutes  OBJECT-TYPE
     SYNTAX INTEGER
     UNITS "minutes"
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
         "This attribute provides the device's estimate of the rated battery
          backup run-time which is based upon the unit's typical idle power, 
          the internal battery management power and the tested energy-capacity
          of the battery when fully charged"
      ::= { clabSupplemtalGroup 3 }  

mtaDevPwrSupplyAvailableMinutes  OBJECT-TYPE
     SYNTAX INTEGER
     UNITS "minutes"
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
         "This attribute provides an estimate of the available run-time on 
          the battery based upon the unit's typical idle power and the tested 
          capacity of the battery when fully charged."
      ::= { clabSupplemtalGroup 4 }      

mtaDevPwrSupplyConfigReplaceBatteryTime  OBJECT-TYPE
     SYNTAX Integer32
     UNITS "minutes"
     MAX-ACCESS read-write
     STATUS current
     DESCRIPTION
         "This attribute allows the operator to establish a replace battery
          threshold value in terms of backup battery run-time minutes.  If
          a battery's Available Minutes has degraded to a point where it 
          can no longer provide more than the value of this object minutes of 
          run-time, an uspAlarmBatteryBad alarm condition is declared. The 
          default value at power up is the equivalent Battery Backup run time
          using 50% of the Rated Minutes."
          ::= { clabSupplemtalGroup 5 }  
  
mtaDevPwrSupplyFullChargeTime OBJECT-TYPE
     SYNTAX  Integer32
     MAX-ACCESS read-write
     STATUS current
     DESCRIPTION
         "This attribute configures the number of days that the device will
          maintain a fully charged battery.  Setting this object value from
          1 to 16 will cause the battery to be immediately charged to its 
          full state, which is equal to the value reported by 
          MtaDevPwrSupplyAvailableMinutes. The attribute when read serves as 
          a countdown timer for the number of days remaining at the fully 
          charged state. If the value 0 is read, this indicates that battery 
          is not being maintained in the fully charged state."
     ::= { clabSupplemtalGroup 6 }
     
 
mtaDevPwrSupplyBatteryTestTime OBJECT-TYPE
     SYNTAX INTEGER
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
         "This attribute is a countdown timer that reflects when the next 
          scheduled Battery Test will be executed. Reading this object will 
          provide the number of days remaining until the next battery test 
          is scheduled to run.  This attribute returns 255 whenever the 
          MtaDevPwrSupplyBatteryTest attribute has been set for 
          disableAutoTesting(0)."
       ::= { clabSupplemtalGroup 7 } 
              
clabUpsMibCompliance MODULE-COMPLIANCE
       STATUS     current
       DESCRIPTION
               "The compliance statement for CableLabs compliant
                devices that implement battery backup and UPS 
                functionality."

       MODULE UPS-MIB -- RFC 1628
           MANDATORY-GROUPS  { 
                     upsSubsetIdentGroup,
                     upsFullBatteryGroup, 
                     upsBasicInputGroup,
                     upsBasicOutputGroup, 
                     upsBasicAlarmGroup,
                     upsBasicControlGroup,
                     upsBasicConfigGroup  
                     }


 -- upsSubsetIdentGroup OBJECT-GROUP
 --    OBJECTS { upsIdentManufacturer, upsIdentModel,
 --              upsIdentAgentSoftwareVersion, upsIdentName,
 --              upsIdentAttachedDevices }

   OBJECT       upsIdentManufacturer
   DESCRIPTION
      "The name of the device manufacturer." 
       
   OBJECT       upsIdentModel                       -- same as RFC 1628
   DESCRIPTION
      "The UPS Model designation."

   OBJECT       upsIdentAgentSoftwareVersion        -- same as RFC 1628
   DESCRIPTION
      "The UPS agent software version which may have
       be the same as the upsIdentUPSSoftwareVersion 
       object value."

   OBJECT       upsIdentName
   DESCRIPTION
      "Identifies the UPS and its value if provided in the device
       configuration file.  Else, the default is an empty string." 

   OBJECT       upsIdentAttachedDevices
   DESCRIPTION
      "A column separated list of the names of the embedded devices 
       attached to the UPS power output as specified in CableLabs' 
       DHCP Options Registry."  
--       REFERENCE  
--          "CableLabs Specifications, CableLabs' DHCP Options Registry."

           

--   upsBasicAlarmGroup OBJECT-GROUP
--       OBJECTS { upsAlarmsPresent, upsAlarmDescr, upsAlarmTime }

--   upsFullBatteryGroup OBJECT-GROUP
--   OBJECTS { upsBatteryStatus, upsSecondsOnBattery,
--             upsEstimatedMinutesRemaining,
--             upsEstimatedChargeRemaining }

   OBJECT       upsBatteryStatus
   SYNTAX     INTEGER {
       unknown(1),
       batteryNormal(2),
       batteryLow(3),
       batteryDepleted(4)
   }
   DESCRIPTION
      "Reports the battery status."  

   OBJECT       upsSecondsOnBattery
   DESCRIPTION
      "The elapsed time since the UPS last switched to battery power,
       or the time since the device was last restarted, whichever is 
       less. A value of 0 is returned if the attached devices are not
       on battery power." 

   OBJECT       upsEstimatedMinutesRemaining     -- same as RFC 1628
   DESCRIPTION
      "An estimate of the time to battery charge depletion
       under the present load conditions if the utility power
       is off and remains off, or if it were to be lost and
       remain off."

   OBJECT       upsEstimatedChargeRemaining      -- same as RFC 1628
   DESCRIPTION
      "An estimate of the battery charge remaining expressed
       as a percent of full charge."


--  upsBasicInputGroup OBJECT-GROUP
--      OBJECTS { upsInputLineBads, upsInputNumLines,
--                upsInputFrequency, upsInputVoltage } 
--
   OBJECT       upsInputLineBads
   DESCRIPTION
      "A count of the number of times the input entered an
       out-of-tolerance condition as defined by the manufacturer.  
       This count is incremented by one each time the input 
       transitions from zero out-of-tolerance lines to one or more
       input lines out-of-tolerance." 

   OBJECT       upsInputNumLines
   DESCRIPTION
      "Specifies the number of input lines utilized in this device.
       For example, for an eDOCSIS E-MTA device with 1 battery pack
       and 1 AC power source, this object value must be 2."

   OBJECT       upsInputFrequency
   DESCRIPTION
      "The present input frequency." 

   OBJECT       upsInputVoltage
   DESCRIPTION
      "The magnitude of the present input voltage." 

 
--   upsBasicOutputGroup OBJECT-GROUP
--       OBJECTS { upsOutputSource, upsOutputFrequency,
--                 upsOutputNumLines, upsOutputVoltage }
 
   OBJECT       upsOutputSource
   SYNTAX INTEGER {
       none(2),
       normal(3),
       battery(5) 
   }
   DESCRIPTION
      "The present source of output power.  The enumeration none(2)
       indicates that there is no source of output power (and 
       therefore no output power), for example, the system has opened
       the output breaker The upsOutputSource value of other(1) may be
       used to represent transient states."

   OBJECT       upsOutputFrequency
   DESCRIPTION
      "The present output frequency." 

   OBJECT       upsOutputNumLines
   DESCRIPTION
      "The upsOutputNumLines object specifies the number of output
       lines utilized in this eDOCSIS device.
       For example, for an eDOCSIS E-MTA devices with both the eCM and
       eMTA attached to the UPS, this object value must be 2."
   OBJECT        upsOutputVoltage
   DESCRIPTION
      "The upsOutputVoltage object MAY be supported." 



   OBJECT       upsAlarmsPresent                 -- same as RFC 1628
   DESCRIPTION
      "The upsAlarmsPresent object indicates the current number of
       active alarm conditions."
 
   OBJECT       upsAlarmDescr
   DESCRIPTION
       "Descriptions for the following well known alarm types: 

          upsAlarmBatteryBad,
          upsAlarmOnBattery,
          upsAlarmLowBattery,
          upsAlarmDepletedBattery, 
          upsAlarmOutputOffAsRequested,
          upsAlarmUpsOutputOff,
          upsAlarmGeneralFault,
          upsAlarmAwaitingPower,
          upsAlarmShutdownPending,
          upsAlarmShutdownImminent."

   OBJECT       upsAlarmTime                     -- same as RFC 1628
   DESCRIPTION
      "The upsAlarmTime object indicates the value of sysUpTime when
       the alarm condition was detected."


--   upsBasicControlGroup OBJECT-GROUP
--       OBJECTS { upsShutdownType, upsShutdownAfterDelay,
--                 upsStartupAfterDelay, upsRebootWithDuration,
--                 upsAutoRestart }

   OBJECT       upsShutdownType
   SYNTAX     INTEGER {
                         output(1)
                      }
   DESCRIPTION
      "The upsShutdownType object defines the nature of the action to
       be taken at the time when the countdown of the
       upsShutdownAfterDelay and upsRebootWithDuration object values
       reach zero."

   OBJECT       upsStartupAfterDelay
   SYNTAX     INTEGER (-1..604800) -- max range is 7 days or 604800s
   DESCRIPTION
       "Start the output after the indicated number of seconds, including
        starting the UPS, if necessary.  Setting this object to 0 will cause
        the startup to occur immediately." 

   OBJECT       upsRebootWithDuration            -- same as RFC 1628
   DESCRIPTION
      "The upsRebootWithDuration controls a reboot procedure with
       a countdown. It also indicates whether a reboot procedure is in
       progress and the number of seconds remaining in the countdown."

   OBJECT       upsAutoRestart                   -- same as RFC 1628
   DESCRIPTION
      "The upsAutoRestart is only applicable for UPS system shutdown." 


--   upsBasicConfigGroup OBJECT-GROUP
--       OBJECTS { upsConfigInputVoltage, upsConfigInputFreq,
--                 upsConfigOutputVoltage, upsConfigOutputFreq,
--                 upsConfigOutputVA, upsConfigOutputPower,
--                 upsConfigLowBattTime, upsConfigAudibleStatus }

   OBJECT       upsConfigInputVoltage 
   DESCRIPTION
      "The magnitude of the nominal input voltage." 

   OBJECT       upsConfigInputFreq 
   DESCRIPTION
      "The he nominal input frequency." 

   OBJECT       upsConfigOutputVoltage 
   DESCRIPTION
      "TThe magnitude of the nominal output voltage." 

   OBJECT       upsConfigOutputFreq 
   DESCRIPTION
      "The nominal output frequency." 

   OBJECT       upsConfigOutputVA 
   DESCRIPTION
      "The magnitude of the nominal Volt-Amp rating." 

   OBJECT       upsConfigOutputPower 
   DESCRIPTION
      "The magnitude of the nominal true power rating." 

   OBJECT       upsConfigLowBattTime             -- same as RFC 1628
   DESCRIPTION
      "The upsConfigLowBattTime specifies the value of
       upsEstimatedMinutesRemaining at which a lowBattery condition is
       declared." 
       

   OBJECT       upsConfigAudibleStatus 
   DESCRIPTION
      "The requested state of the audible alarm.." 


   ::= { clabUpsGroups 1}

   --
   -- Units of conformance for CableLabs UPS capable devices
   -- Adapted from RFC 1628, a column was added for CableLabs devices
   -- An 'x' in the column means the object MUST be supported; all the
   -- rest is optional and left for vendor decision. 

END