Companion

object Companion

Functions

Link copied to clipboard
fun createSignedV2(seq: UByte, systemId: UByte, componentId: UByte, messageId: UInt, payload: ByteArray, crcExtra: Byte, signatureLinkId: UByte, signatureTimestamp: UInt, secretKey: ByteArray): MavRawFrame

Creates a signed MAVLink v2 MavRawFrame.

Link copied to clipboard
fun createUnsignedV2(seq: UByte, systemId: UByte, componentId: UByte, messageId: UInt, payload: ByteArray, crcExtra: Byte): MavRawFrame

Creates an unsigned MAVLink v2 MavRawFrame.

Link copied to clipboard
fun createV1(seq: UByte, systemId: UByte, componentId: UByte, messageId: UInt, payload: ByteArray, crcExtra: Byte): MavRawFrame

Creates a MAVLink v1 MavRawFrame.

Link copied to clipboard

Creates a MAVLink v1 MavRawFrame from the rawBytes.

Link copied to clipboard

Creates a MAVLink v2 MavRawFrame from the rawBytes.

Link copied to clipboard
fun generateChecksum(frameBytes: ByteArray, crcExtra: Byte): UShort

Generates the MAVLink checksum using the frameBytes and the crcExtra of the MAVLink message.

Link copied to clipboard
fun generateSignature(frameBytes: ByteArray, linkId: UByte, timestamp: UInt, secretKey: ByteArray): ByteArray

Generates the 6-byte MAVLink signature using the frameBytes. If the secretKey's size is less than 32 then it is padded with zeroes. If the size is more than 32, then only the first 32 bytes are taken.