mavlink v0.7.0 MAVLink.Frame View Source

Represent and work with MAVLink v1/2 message frames

Link to this section Summary

Link to this section Types

Link to this type

t() View Source
t() :: %MAVLink.Frame{
  checksum: pos_integer(),
  compatible_flags: non_neg_integer(),
  crc_extra: MAVLink.Types.crc_extra(),
  incompatible_flags: non_neg_integer(),
  mavlink_1_raw: binary(),
  mavlink_2_raw: binary(),
  message: message(),
  message_id: MAVLink.Types.message_id(),
  payload: binary(),
  payload_length: 1..255,
  sequence_number: 0..255,
  signature: term(),
  source_component: 1..255,
  source_system: 1..255,
  target: :broadcast | :system | :system_component | :component,
  target_component: 1..255,
  target_system: 1..255,
  version: version()
}

Link to this type

version() View Source
version() :: 1 | 2

Link to this section Functions

Link to this function

binary_to_frame_and_tail(raw_and_rest) View Source
binary_to_frame_and_tail(binary()) :: {MAVLink.Frame.t(), binary()} | binary()

Link to this function

validate_and_unpack(frame, dialect) View Source
validate_and_unpack(MAVLink.Frame, module()) ::
  {:ok, MAVLink.Frame}
  | :failed_to_unpack
  | :checksum_invalid
  | :unknown_message