Class: MAVLink::Log::Header
- Inherits:
-
Object
- Object
- MAVLink::Log::Header
- Defined in:
- lib/mavlink/log/header.rb
Instance Attribute Summary collapse
-
#component ⇒ Object
readonly
Returns the value of attribute component.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#magic ⇒ Object
readonly
Returns the value of attribute magic.
-
#sequence ⇒ Object
readonly
Returns the value of attribute sequence.
-
#system ⇒ Object
readonly
Returns the value of attribute system.
Instance Method Summary collapse
-
#initialize(raw_header) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(raw_header) ⇒ Header
Returns a new instance of Header.
8 9 10 11 12 13 14 15 |
# File 'lib/mavlink/log/header.rb', line 8 def initialize(raw_header) @magic = raw_header[0].unpack('C')[0] @length = raw_header[1].unpack('C')[0] @sequence = raw_header[2].unpack('C')[0] @system = raw_header[3].unpack('C')[0] @component = raw_header[4].unpack('C')[0] @id = raw_header[5].unpack('C')[0] end |
Instance Attribute Details
#component ⇒ Object (readonly)
Returns the value of attribute component.
6 7 8 |
# File 'lib/mavlink/log/header.rb', line 6 def component @component end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/mavlink/log/header.rb', line 6 def id @id end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
6 7 8 |
# File 'lib/mavlink/log/header.rb', line 6 def length @length end |
#magic ⇒ Object (readonly)
Returns the value of attribute magic.
6 7 8 |
# File 'lib/mavlink/log/header.rb', line 6 def magic @magic end |
#sequence ⇒ Object (readonly)
Returns the value of attribute sequence.
6 7 8 |
# File 'lib/mavlink/log/header.rb', line 6 def sequence @sequence end |
#system ⇒ Object (readonly)
Returns the value of attribute system.
6 7 8 |
# File 'lib/mavlink/log/header.rb', line 6 def system @system end |