Class: MicroAethAE51::Message
- Inherits:
-
Object
- Object
- MicroAethAE51::Message
- Defined in:
- lib/micro_aeth-ae51.rb
Overview
Creates and parses messages to and from the MicroAeth. See MicroAeth::Com for specifications on the transmiting of messages.
Instance Attribute Summary collapse
-
#battery ⇒ Object
readonly
Returns the value of attribute battery.
-
#flow ⇒ Object
readonly
Returns the value of attribute flow.
-
#original_char_string ⇒ Object
readonly
Returns the value of attribute original_char_string.
-
#pcb_temp ⇒ Object
readonly
Returns the value of attribute pcb_temp.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#sen1 ⇒ Object
readonly
Returns the value of attribute sen1.
-
#sen2 ⇒ Object
readonly
Returns the value of attribute sen2.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(data) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(data) ⇒ Message
Returns a new instance of Message.
60 61 62 63 64 |
# File 'lib/micro_aeth-ae51.rb', line 60 def initialize data raise "invalid data" unless data_valid? data @original_char_string = data parse_data( data[7..-1]) end |
Instance Attribute Details
#battery ⇒ Object (readonly)
Returns the value of attribute battery.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def battery @battery end |
#flow ⇒ Object (readonly)
Returns the value of attribute flow.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def flow @flow end |
#original_char_string ⇒ Object (readonly)
Returns the value of attribute original_char_string.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def original_char_string @original_char_string end |
#pcb_temp ⇒ Object (readonly)
Returns the value of attribute pcb_temp.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def pcb_temp @pcb_temp end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def ref @ref end |
#sen1 ⇒ Object (readonly)
Returns the value of attribute sen1.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def sen1 @sen1 end |
#sen2 ⇒ Object (readonly)
Returns the value of attribute sen2.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def sen2 @sen2 end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def status @status end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
47 48 49 |
# File 'lib/micro_aeth-ae51.rb', line 47 def time @time end |