class MAVLink::Log::Message
Public Class Methods
new(entry)
click to toggle source
# File lib/mavlink/log/message.rb, line 5 def initialize(entry) @entry = entry end
Public Instance Methods
crc()
click to toggle source
# File lib/mavlink/log/message.rb, line 13 def crc @entry.crc end
id()
click to toggle source
# File lib/mavlink/log/message.rb, line 9 def id @entry.header.id end
Protected Instance Methods
float(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 19 def float(range) unpack(range, 'e') end
int16_t(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 31 def int16_t(range) unpack(range, 's<') end
int32_t(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 39 def int32_t(range) unpack(range, 'l<') end
int8_t(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 23 def int8_t(range) unpack(range, 'c') end
string(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 51 def string(range) unpack(range, 'Z*') end
uint16_t(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 35 def uint16_t(range) unpack(range, 'S<') end
uint32_t(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 43 def uint32_t(range) unpack(range, 'L<') end
uint64_t(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 47 def uint64_t(range) unpack(range, 'Q<') end
uint8_t(range)
click to toggle source
# File lib/mavlink/log/message.rb, line 27 def uint8_t(range) unpack(range, 'C') end
Private Instance Methods
payload()
click to toggle source
# File lib/mavlink/log/message.rb, line 57 def payload @entry.payload end
unpack(range, format, index = 0)
click to toggle source
# File lib/mavlink/log/message.rb, line 61 def unpack(range, format, index = 0) payload[range].unpack(format)[index] end