View Source XMAVLink.Frame (xmavlink v0.3.0)

Represent and work with MAVLink v1/2 message frames

Link to this section Summary

Link to this section Types

@type message() :: XMAVLink.Message.t()
@type t() :: %XMAVLink.Frame{
  checksum: pos_integer(),
  compatible_flags: non_neg_integer(),
  crc_extra: XMAVLink.Types.crc_extra(),
  incompatible_flags: non_neg_integer(),
  mavlink_1_raw: binary(),
  mavlink_2_raw: binary(),
  message: message(),
  message_id: XMAVLink.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()
}
@type version() :: 1 | 2

Link to this section Functions

Link to this function

binary_to_frame_and_tail(raw_and_rest)

View Source
@spec binary_to_frame_and_tail(binary()) ::
  {t(), binary()} | {nil, binary()} | :not_a_frame
Link to this function

validate_and_unpack(frame, dialect)

View Source
@spec validate_and_unpack(t(), module()) ::
  {:ok, t()} | :failed_to_unpack | :checksum_invalid | :unknown_message