commonMain.com.divpundir.mavlink.connection.MavFrameV2Impl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connection-core-jvm Show documentation
Show all versions of connection-core-jvm Show documentation
A modern MAVLink library for the JVM written in Kotlin.
The newest version!
package com.divpundir.mavlink.connection
import com.divpundir.mavlink.api.MavFrameV2
internal data class MavFrameV2Impl(
private val rawFrame: MavRawFrame,
override val message: T
) : MavFrameV2 {
override val sequence: UByte get() = rawFrame.seq
override val systemId: UByte get() = rawFrame.systemId
override val componentId: UByte get() = rawFrame.componentId
override val checksum: UShort get() = rawFrame.checksum
override val isSigned: Boolean get() = rawFrame.isSigned
override val signatureLinkId: UByte get() = rawFrame.signatureLinkId
override val signatureTimestamp: UInt get() = rawFrame.signatureTimestamp
override val signature: ByteArray get() = rawFrame.signature
override fun validateSignature(secretKey: ByteArray): Boolean = rawFrame.validateSignature(secretKey)
}