Class: MAVLink::Log::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/mavlink/log/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#componentObject (readonly)

Returns the value of attribute component.



6
7
8
# File 'lib/mavlink/log/header.rb', line 6

def component
  @component
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/mavlink/log/header.rb', line 6

def id
  @id
end

#lengthObject (readonly)

Returns the value of attribute length.



6
7
8
# File 'lib/mavlink/log/header.rb', line 6

def length
  @length
end

#magicObject (readonly)

Returns the value of attribute magic.



6
7
8
# File 'lib/mavlink/log/header.rb', line 6

def magic
  @magic
end

#sequenceObject (readonly)

Returns the value of attribute sequence.



6
7
8
# File 'lib/mavlink/log/header.rb', line 6

def sequence
  @sequence
end

#systemObject (readonly)

Returns the value of attribute system.



6
7
8
# File 'lib/mavlink/log/header.rb', line 6

def system
  @system
end