Class: Ropian::Meter::APC

Inherits:
Generic
  • Object
show all
Defined in:
lib/ropian/meter/apc.rb

Constant Summary collapse

UnitCurrent =
SNMP::ObjectId.new('1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1')

Instance Method Summary collapse

Methods inherited from Generic

#initialize, #inspect

Constructor Details

This class inherits a constructor from Ropian::Meter::Generic

Instance Method Details

#collect {|total_amps, {}| ... } ⇒ Object

:yields: total_amps, hash_of_outlet_amps

Yields:



6
7
8
# File 'lib/ropian/meter/apc.rb', line 6

def collect # :yields: total_amps, hash_of_outlet_amps
  yield total_amps, {}
end

#outlet_amps(outlet_index) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/ropian/meter/apc.rb', line 13

def outlet_amps(outlet_index)
  raise NotImplementedError, "APC Power Bars do not support per outlet power stats"
end

#total_ampsObject

Amps in total on whole bar



10
11
12
# File 'lib/ropian/meter/apc.rb', line 10

def total_amps
  amps_for_oid(UnitCurrent)
end