All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.divpundir.mavlink.connection.MavFrameV2Impl.kt Maven / Gradle / Ivy

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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy