Package-level declarations

Types

Link copied to clipboard
class CrcX25

X25 hash calculator used for computing the MAVLink frame checksums.

Link copied to clipboard
interface MavDataDecoder

Reads primitives from a ByteArray according to the little-endian byte order.

Link copied to clipboard
interface MavDataEncoder

Writes primitives to a ByteArray according to the little-endian byte order.

Functions

Link copied to clipboard
fun MavDataEncoder.encodeBitmaskValue(value: UInt, dataSize: Int)

Encodes the given UInt MAVLink bitmask value into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given Char/UInt64 to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given Double/Float64 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of Double/Float64 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard
fun MavDataEncoder.encodeEnumValue(value: UInt, dataSize: Int)

Encodes the given UInt MAVLink enum value into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given Float/Float32 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of Float/Float32 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given Short/Int16 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of Short/Int16 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given Int/Int32 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of Int/Int32 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given Long/Int64 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of Long/Int64 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given Byte/Int8 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of Byte/Int8 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard
fun MavDataEncoder.encodeInteger(value: Long, dataSize: Int)

Encodes the given Long into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard
fun MavDataEncoder.encodeString(value: String, length: Int)

Writes the given String to the array's current position, and then increments the position. If the encoded String is shorter than the length parameter then the remaining positions are filled with empty characters.

Link copied to clipboard

Writes the given UShort/UInt16 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of UShort/UInt16 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given UInt/UInt32 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of UInt/UInt32 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given ULong/UInt64 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of ULong/UInt64 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Writes the given UByte/UInt8 to the array's current position, and then increments the position.

Link copied to clipboard

Encodes the given List of UByte/UInt8 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.

Link copied to clipboard

Creates a new MavDataDecoder instance that uses the given bytes for the reading of data.

Link copied to clipboard
expect fun MavDataEncoder(size: Int): MavDataEncoder

Creates a new MavDataEncoder instance that uses an array of the given size for the writing of data.

actual fun MavDataEncoder(size: Int): MavDataEncoder
actual fun MavDataEncoder(size: Int): MavDataEncoder
Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a UInt representing the MAVLink bitmask value. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a Char from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a Double/Float64 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded Double/Float64 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a UInt representing the MAVLink enum value. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a Float/Float32 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded Float/Float32 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a Short/Int16 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded Short/Int16 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a Int/Int32 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded Int/Int32 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a Long/Int64 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded Long/Int64 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a Byte/Int8 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded Byte/Int8 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns the signed value encoded as Long. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a String of the given length from the array's current position using the UTF-8 encoding, and then increments the position. If there are not enough bytes in the array, the remaining length is ignored.

Link copied to clipboard

Reads a UShort/UInt16 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded UShort/UInt16 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a UInt/UInt32 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded UInt/UInt32 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a ULong/UInt64 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded ULong/UInt64 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads a UByte/UInt8 from the array's current position, and then increments the position. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns a List of the decoded UByte/UInt8 values. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Reads dataSize number of bytes from the array's current position, and then increments the position. Returns the unsigned value encoded as a Long. If there are not enough bytes in the array, it assumes that the remaining length is padded with zeroes.

Link copied to clipboard

Returns a new ByteArray with all the trailing zeros removed.