Class: Aurora::Pump::GenericPump
- Defined in:
- lib/aurora/pump.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#running ⇒ Object
(also: #running?)
readonly
Returns the value of attribute running.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#waterflow ⇒ Object
readonly
Returns the value of attribute waterflow.
-
#watts ⇒ Object
readonly
Returns the value of attribute watts.
Instance Method Summary collapse
-
#initialize(abc, type) ⇒ GenericPump
constructor
A new instance of GenericPump.
- #refresh(registers) ⇒ Object
- #registers_to_read ⇒ Object
Methods inherited from Component
Constructor Details
#initialize(abc, type) ⇒ GenericPump
Returns a new instance of GenericPump.
11 12 13 14 |
# File 'lib/aurora/pump.rb', line 11 def initialize(abc, type) super(abc) @type = type end |
Instance Attribute Details
#running ⇒ Object (readonly) Also known as: running?
Returns the value of attribute running.
8 9 10 |
# File 'lib/aurora/pump.rb', line 8 def running @running end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/aurora/pump.rb', line 8 def type @type end |
#waterflow ⇒ Object (readonly)
Returns the value of attribute waterflow.
8 9 10 |
# File 'lib/aurora/pump.rb', line 8 def waterflow @waterflow end |
#watts ⇒ Object (readonly)
Returns the value of attribute watts.
8 9 10 |
# File 'lib/aurora/pump.rb', line 8 def watts @watts end |
Instance Method Details
#refresh(registers) ⇒ Object
22 23 24 25 26 |
# File 'lib/aurora/pump.rb', line 22 def refresh(registers) @waterflow = registers[1117] @watts = registers[1164] if abc.energy_monitoring? @running = registers[1104].include?(:loop_pump) end |
#registers_to_read ⇒ Object
16 17 18 19 20 |
# File 'lib/aurora/pump.rb', line 16 def registers_to_read result = [1117] result.push(1164..1165) if abc.energy_monitoring? result end |