mavlink v0.7.0 MAVLink.Utils View Source

MAVLink support functions used during code generation and runtime Parts of this module are ported from corresponding implementations in mavutils.py

Link to this section Summary

Functions

Helper function for messages to pack array fields

Helper function for messages to pack string fields

Parse an ip address string into a tuple

Helper function for decode() to unpack array fields

Sort parsed message fields into wire order according to https://mavlink.io/en/guide/serialization.html List extension fields separately so that we can not include them for MAVLink 1 messages

Calculate an x25 checksum of a list or binary based on pymavlink mavcrc.x25crc

Link to this section Functions

Link to this function

eight_bit_checksum(value) View Source

Link to this function

pack_array(a, ordinality, field_packer) View Source
pack_array(list(), integer(), (any() -> binary())) :: binary()

Helper function for messages to pack array fields

Link to this function

pack_string(s, ordinality) View Source
pack_string(binary(), non_neg_integer()) :: binary()

Helper function for messages to pack string fields

Link to this function

parse_ip_address(address) View Source

Parse an ip address string into a tuple

Link to this function

parse_ip_address(list, address, count) View Source

Link to this function

parse_positive_integer(port) View Source

Link to this function

unpack_array(bin, fun) View Source
unpack_array(binary(), (binary() -> {any(), list()})) :: list()

Helper function for decode() to unpack array fields

Link to this function

unpack_array(bin, fun, lst) View Source

Link to this function

wire_order(fields) View Source
wire_order([]) :: {[], []}

Sort parsed message fields into wire order according to https://mavlink.io/en/guide/serialization.html List extension fields separately so that we can not include them for MAVLink 1 messages

Link to this function

x25_crc(list) View Source
x25_crc([] | binary()) :: pos_integer()

Calculate an x25 checksum of a list or binary based on pymavlink mavcrc.x25crc