Class: MAVLink::Log::Entry
- Inherits:
-
Object
- Object
- MAVLink::Log::Entry
- Defined in:
- lib/mavlink/log/entry.rb
Instance Attribute Summary collapse
-
#crc ⇒ Object
readonly
Returns the value of attribute crc.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(raw_time, header, payload, raw_crc) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(raw_time, header, payload, raw_crc) ⇒ Entry
Returns a new instance of Entry.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/mavlink/log/entry.rb', line 8 def initialize(raw_time, header, payload, raw_crc) @time = to_time(raw_time) @header = header @payload = payload @crc = to_crc(raw_crc) if false && header.id==40 puts raw_time.unpack('H*') puts payload.unpack("H*") puts raw_crc.unpack('H*') end end |
Instance Attribute Details
#crc ⇒ Object (readonly)
Returns the value of attribute crc.
6 7 8 |
# File 'lib/mavlink/log/entry.rb', line 6 def crc @crc end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
6 7 8 |
# File 'lib/mavlink/log/entry.rb', line 6 def header @header end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
6 7 8 |
# File 'lib/mavlink/log/entry.rb', line 6 def payload @payload end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
6 7 8 |
# File 'lib/mavlink/log/entry.rb', line 6 def time @time end |