Class: Aurora::Blower::PSC

Inherits:
Component show all
Defined in:
lib/aurora/blower.rb

Direct Known Subclasses

ECM, FiveSpeed

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

#inspect

Constructor Details

#initialize(abc, type) ⇒ PSC

Returns a new instance of PSC.



11
12
13
14
# File 'lib/aurora/blower.rb', line 11

def initialize(abc, type)
  super(abc)
  @type = type
end

Instance Attribute Details

#runningObject (readonly) Also known as: running?

Returns the value of attribute running.



8
9
10
# File 'lib/aurora/blower.rb', line 8

def running
  @running
end

#typeObject (readonly)

Returns the value of attribute type.



8
9
10
# File 'lib/aurora/blower.rb', line 8

def type
  @type
end

#wattsObject (readonly)

Returns the value of attribute watts.



8
9
10
# File 'lib/aurora/blower.rb', line 8

def watts
  @watts
end

Instance Method Details

#refresh(registers) ⇒ Object



24
25
26
27
# File 'lib/aurora/blower.rb', line 24

def refresh(registers)
  @watts = registers[1148] if abc.energy_monitoring?
  @running = registers[30].include?(:blower)
end

#registers_to_readObject



16
17
18
19
20
21
22
# File 'lib/aurora/blower.rb', line 16

def registers_to_read
  if abc.energy_monitoring?
    [1148..1149]
  else
    []
  end
end