Class: LiveF1::Packet::Sys::KeyFrame

Inherits:
LiveF1::Packet::Sys show all
Includes:
Type::Short
Defined in:
lib/live_f1/packet/sys/key_frame.rb

Instance Attribute Summary

Attributes inherited from LiveF1::Packet

#data, #header, #source

Instance Method Summary collapse

Methods included from Type::Short

#length, #spare_bits

Methods inherited from LiveF1::Packet

from_source, #initialize, #inspect, #leader, #spare_bits, #spare_data

Constructor Details

This class inherits a constructor from LiveF1::Packet

Instance Method Details

#numberObject



7
8
9
# File 'lib/live_f1/packet/sys/key_frame.rb', line 7

def number
					data.reverse.unpack("B*").first.to_i(2)
end

#to_sObject



11
12
13
# File 'lib/live_f1/packet/sys/key_frame.rb', line 11

def to_s
  "Keyframe #{number}"
end