commonMain.com.divpundir.mavlink.api.MavMessage.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-jvm Show documentation
Show all versions of api-jvm Show documentation
A modern MAVLink library for the JVM written in Kotlin.
package com.divpundir.mavlink.api
/**
* A high level MAVLink message.
*
* MAVLink messages are defined in XML files and represented as data classes in mavlink-kotlin.
*/
public interface MavMessage> {
/**
* The instance property which returns [MavCompanion] of this class.
*/
public val instanceCompanion: MavCompanion
/**
* Serializes the message to a [ByteArray] according to MAVLink v1 scheme. Extensions are not serialized.
*/
public fun serializeV1(): ByteArray
/**
* Serializes the message to a [ByteArray] according to MAVLink v2 scheme. Extensions are also serialized and
* payload truncation is applied.
*/
public fun serializeV2(): ByteArray
/**
* The companion object for a [MavMessage], which contains the MAVLink metadata and the [MavDeserializer]
* implementation for the message.
*/
public interface MavCompanion> : MavDeserializer {
public val id: UInt
public val crcExtra: Byte
}
}