Class: MAVLink::Log::Entry

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#crcObject (readonly)

Returns the value of attribute crc.



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

def crc
  @crc
end

#headerObject (readonly)

Returns the value of attribute header.



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

def header
  @header
end

#payloadObject (readonly)

Returns the value of attribute payload.



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

def payload
  @payload
end

#timeObject (readonly)

Returns the value of attribute time.



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

def time
  @time
end