CoTMessage

@Serializable
data class CoTMessage(val uid: String, val type: String, val time: Instant = Clock.System.now(), val start: Instant = time, val stale: Instant, val how: String = "m-g", val latitude: Double = 0.0, val longitude: Double = 0.0, val hae: Double = TAK_UNKNOWN_POINT_VALUE, val ce: Double = TAK_UNKNOWN_POINT_VALUE, val le: Double = TAK_UNKNOWN_POINT_VALUE, val contact: CoTContact? = null, val group: CoTGroup? = null, val status: CoTStatus? = null, val track: CoTTrack? = null, val chat: CoTChat? = null, val remarks: String? = null, val rawDetailXml: String? = null, val parsedDetailXml: String? = null, val sourceEventXml: String? = null)(source)

Constructors

Link copied to clipboard
constructor(uid: String, type: String, time: Instant = Clock.System.now(), start: Instant = time, stale: Instant, how: String = "m-g", latitude: Double = 0.0, longitude: Double = 0.0, hae: Double = TAK_UNKNOWN_POINT_VALUE, ce: Double = TAK_UNKNOWN_POINT_VALUE, le: Double = TAK_UNKNOWN_POINT_VALUE, contact: CoTContact? = null, group: CoTGroup? = null, status: CoTStatus? = null, track: CoTTrack? = null, chat: CoTChat? = null, remarks: String? = null, rawDetailXml: String? = null, parsedDetailXml: String? = null, sourceEventXml: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val ce: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val hae: Double
Link copied to clipboard
val how: String
Link copied to clipboard
Link copied to clipboard
val le: Double
Link copied to clipboard
Link copied to clipboard

Inner XML content of <detail>...</detail> captured by CoTXmlParser when this message was parsed from an incoming ATAK client event. Used as the raw_detail fallback payload when converting to org.meshtastic.proto.TAKPacketV2 for CoT types that don't fit any structured payload (PLI / GeoChat / Aircraft). Null for messages constructed in-app.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The entire original <event>...</event> XML string as received from the ATAK client, captured by CoTXmlParser. Kept solely for diagnostic logging (e.g. when a packet exceeds the mesh MTU and is dropped) so the operator can see what the client actually sent. Null for messages constructed in-app.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val uid: String

Functions

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

Serialize this CoTMessage to a single <event> XML element suitable for the CoT streaming TCP protocol used by ATAK / iTAK / WinTAK clients.