Package-level declarations

The complete public API of the TAKPacket-SDK Kotlin binding: the six core CoT/compression classes listed above, the TakPacketV2Data data model (26 envelope fields plus the Payload sealed hierarchy of typed variants), and supporting types such as ZstdException.

Types

Link copied to clipboard

Bidirectional lookup between ATAK's 14-color palette and the Meshtastic Team protobuf enum values. Used by the CoT parser/builder to encode stroke/fill/marker colors as a 1–2 byte enum on the wire when the source ARGB matches a palette entry, falling back to the exact _argb fixed32 field when it doesn't.

Link copied to clipboard

Stateless CoT-XML hygiene for LoRa-mesh transport.

Link copied to clipboard

Maps CoT type strings (e.g. "a-f-G-U-C") to integer enum values matching the CotType enum in atak.proto, and back.

Link copied to clipboard

Reconstructs a CoT (Cursor-on-Target) XML event string from a TakPacketV2Data.

Link copied to clipboard

Parses a CoT (Cursor-on-Target) XML event string into a TakPacketV2Data.

Link copied to clipboard

Loads and provides zstd compression dictionaries.

Link copied to clipboard
fun interface Logger

Sink for the SDK's optional diagnostic traces.

Link copied to clipboard

The default Logger: discards every message. Used as a sentinel so trace can short-circuit (and skip building the message string) when no real logger is installed.

Link copied to clipboard
class TakCompressor(compressionLevel: Int = 19)

Compresses TAKPacketV2 protobuf bytes using zstd with pre-trained dictionaries, and decompresses received wire payloads back to protobuf bytes.

Link copied to clipboard

Global, mutable holder for the SDK's diagnostic Logger.

Link copied to clipboard
data class TakPacketV2Data(val cotTypeId: Int = CotTypeMapper.COTTYPE_OTHER, val cotTypeStr: String? = null, val how: Int = CotTypeMapper.COTHOW_UNSPECIFIED, val callsign: String = "", val team: Int = 0, val role: Int = 0, val latitudeI: Int = 0, val longitudeI: Int = 0, val altitude: Int = 0, val speed: Int = 0, val course: Int = 0, val battery: Int = 0, val geoSrc: Int = 0, val altSrc: Int = 0, val uid: String = "", val deviceCallsign: String = "", val staleSeconds: Int = 0, val takVersion: String = "", val takDevice: String = "", val takPlatform: String = "", val takOs: String = "", val endpoint: String = "", val phone: String = "", val remarks: String = "", val environment: TakPacketV2Data.EnvironmentData? = null, val sensorFov: TakPacketV2Data.SensorFovData? = null, val marti: List<String> = emptyList(), val payload: TakPacketV2Data.Payload = Payload.None)

Platform-agnostic data model for a TAKPacketV2 — the SDK's internal representation, decoupled from any specific protobuf library.

Link copied to clipboard

Serializes/deserializes TakPacketV2Data to/from protobuf wire format using Wire-generated Kotlin classes (com.squareup.wire).

Link copied to clipboard
class ZstdException(message: String, cause: Throwable? = null) : RuntimeException

Thrown when the underlying zstd codec fails to compress or decompress a frame.