Class: Aurora::Compressor::GenericCompressor
- Inherits:
-
Aurora::Component
- Object
- Aurora::Component
- Aurora::Compressor::GenericCompressor
- Defined in:
- lib/aurora/compressor.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cooling_liquid_line_temperature ⇒ Object
readonly
Returns the value of attribute cooling_liquid_line_temperature.
-
#heat_of_extraction ⇒ Object
readonly
Returns the value of attribute heat_of_extraction.
-
#heat_of_rejection ⇒ Object
readonly
Returns the value of attribute heat_of_rejection.
-
#heating_liquid_line_temperature ⇒ Object
readonly
Returns the value of attribute heating_liquid_line_temperature.
-
#saturated_condensor_discharge_temperature ⇒ Object
readonly
Returns the value of attribute saturated_condensor_discharge_temperature.
-
#speed ⇒ Object
readonly
Returns the value of attribute speed.
-
#watts ⇒ Object
readonly
Returns the value of attribute watts.
Instance Method Summary collapse
-
#initialize(abc, stages) ⇒ GenericCompressor
constructor
A new instance of GenericCompressor.
- #refresh(registers) ⇒ Object
- #registers_to_read ⇒ Object
- #speed_range ⇒ Object
- #type ⇒ Object
Methods inherited from Aurora::Component
Constructor Details
#initialize(abc, stages) ⇒ GenericCompressor
Returns a new instance of GenericCompressor.
16 17 18 19 |
# File 'lib/aurora/compressor.rb', line 16 def initialize(abc, stages) super(abc) @stages = stages end |
Instance Attribute Details
#cooling_liquid_line_temperature ⇒ Object (readonly)
Returns the value of attribute cooling_liquid_line_temperature.
8 9 10 |
# File 'lib/aurora/compressor.rb', line 8 def cooling_liquid_line_temperature @cooling_liquid_line_temperature end |
#heat_of_extraction ⇒ Object (readonly)
Returns the value of attribute heat_of_extraction.
8 9 10 |
# File 'lib/aurora/compressor.rb', line 8 def heat_of_extraction @heat_of_extraction end |
#heat_of_rejection ⇒ Object (readonly)
Returns the value of attribute heat_of_rejection.
8 9 10 |
# File 'lib/aurora/compressor.rb', line 8 def heat_of_rejection @heat_of_rejection end |
#heating_liquid_line_temperature ⇒ Object (readonly)
Returns the value of attribute heating_liquid_line_temperature.
8 9 10 |
# File 'lib/aurora/compressor.rb', line 8 def heating_liquid_line_temperature @heating_liquid_line_temperature end |
#saturated_condensor_discharge_temperature ⇒ Object (readonly)
Returns the value of attribute saturated_condensor_discharge_temperature.
8 9 10 |
# File 'lib/aurora/compressor.rb', line 8 def saturated_condensor_discharge_temperature @saturated_condensor_discharge_temperature end |
#speed ⇒ Object (readonly)
Returns the value of attribute speed.
8 9 10 |
# File 'lib/aurora/compressor.rb', line 8 def speed @speed end |
#watts ⇒ Object (readonly)
Returns the value of attribute watts.
8 9 10 |
# File 'lib/aurora/compressor.rb', line 8 def watts @watts end |
Instance Method Details
#refresh(registers) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/aurora/compressor.rb', line 36 def refresh(registers) outputs = registers[30] @speed = if outputs.include?(:cc2) 2 elsif outputs.include?(:cc) 1 else 0 end @cooling_liquid_line_temperature = registers[19] if abc.refrigeration_monitoring? @heating_liquid_line_temperature = registers[1109] @saturated_condensor_discharge_temperature = registers[1134] @heat_of_extraction = registers[1154] @heat_of_rejection = registers[1156] end return unless abc.energy_monitoring? @watts = registers[1146] end |
#registers_to_read ⇒ Object
29 30 31 32 33 34 |
# File 'lib/aurora/compressor.rb', line 29 def registers_to_read result = [19] result.push(1109, 1134, 1154..1157) if abc.refrigeration_monitoring? result << (1146..1147) if abc.energy_monitoring? result end |
#speed_range ⇒ Object
25 26 27 |
# File 'lib/aurora/compressor.rb', line 25 def speed_range 0..@stages end |
#type ⇒ Object
21 22 23 |
# File 'lib/aurora/compressor.rb', line 21 def type "#{(@stages == 2) ? "Dual" : "Single"} Stage Compressor" end |