TAKPacketConversion

Legacy v1 CoT <-> TAKPacket conversion for firmware <= 2.7.x.

Wire format: bare protobuf-encoded TAKPacket on ATAK_PLUGIN port 72, no zstd compression. Supports only PLI and GeoChat payloads — shape, marker, route, casevac, emergency, and task CoT events return null and are dropped.

Note that firmware <= 2.7.x does act on the proto's is_compressed flag: its AtakPluginModule unishox2- compresses the callsign and GeoChat string fields for LoRa transport. (2.8+ dropped unishox2 and made the module a port 78 passthrough.) Conversion here assumes plain strings, so callers must decide what to do with a compressed packet before calling — see TAKMeshIntegration.handleV1Packet.

For the SDK-backed path that handles all payload types with zstd dictionary compression on ATAK_PLUGIN_V2 port 78, see TAKPacketV2Conversion.

TAKMeshIntegration picks between the two paths based on Capabilities.supportsTakV2 (firmware >= 2.8.0).

Functions

Link copied to clipboard
fun TAKPacket.toCoTMessage(): CoTMessage?
Link copied to clipboard
fun CoTMessage.toTAKPacket(): TAKPacket?