Payload

sealed class Payload(source)

The packet's payload variant — the SDK-side model of the TAKPacketV2 payload_variant oneof. Exactly one subtype is present per packet.

None and Pli both mean "no typed payload": a position report. PLI is implicit on the wire (there is no bool pli field), so the serializer emits no oneof arm for either; Pli exists only so the parser can flag a deliberate position/delete report distinctly from a default-constructed packet.

Inheritors

Types

Link copied to clipboard
data class Aircraft(val icao: String = "", val registration: String = "", val flight: String = "", val aircraftType: String = "", val squawk: Int = 0, val category: String = "", val rssiX10: Int = 0, val gps: Boolean = false, val cotHostId: String = "") : TakPacketV2Data.Payload

ADS-B / military air track. Maps to the AircraftTrack protobuf message (payload_variant tag 32). The structured fields are synthesized into a <remarks> line on rebuild when no <_aircot_> element fits.

Link copied to clipboard
data class CasevacReport(val precedence: Int = 0, val equipmentFlags: Int = 0, val litterPatients: Int = 0, val ambulatoryPatients: Int = 0, val security: Int = 0, val hlzMarking: Int = 0, val zoneMarker: String = "", val usMilitary: Int = 0, val usCivilian: Int = 0, val nonUsMilitary: Int = 0, val nonUsCivilian: Int = 0, val epw: Int = 0, val child: Int = 0, val terrainFlags: Int = 0, val frequency: String = "", val title: String = "", val medlineRemarks: String = "", val urgentCount: Int = 0, val urgentSurgicalCount: Int = 0, val priorityCount: Int = 0, val routineCount: Int = 0, val convenienceCount: Int = 0, val equipmentDetail: String = "", val zoneProtectedCoord: String = "", val terrainSlopeDir: String = "", val terrainOtherDetail: String = "", val markedBy: String = "", val obstacles: String = "", val windsAreFrom: String = "", val friendlies: String = "", val enemy: String = "", val hlzRemarks: String = "", val zmist: List<TakPacketV2Data.Payload.CasevacReport.ZMistEntry> = emptyList()) : TakPacketV2Data.Payload

9-line MEDEVAC request (CoT type b-r-f-h-c).

Link copied to clipboard
data class Chat(val message: String = "", val to: String? = null, val toCallsign: String? = null, val receiptForUid: String = "", val receiptType: Int = 0, val lang: String = "", val roomId: String = "", val voiceProfileId: String = "", val hasVoiceProfile: Boolean = false) : TakPacketV2Data.Payload

ATAK GeoChat message — both regular chat (b-t-f) and delivered / read receipts (b-t-f-d / b-t-f-r). Receipts leave message empty and set receiptForUid + receiptType to link back to the outbound message's event UID.

Link copied to clipboard
data class DrawnShape(val kind: Int = 0, val style: Int = 0, val majorCm: Int = 0, val minorCm: Int = 0, val angleDeg: Int = 360, val strokeColor: Int = 0, val strokeArgb: Int = 0, val strokeWeightX10: Int = 0, val fillColor: Int = 0, val fillArgb: Int = 0, val labelsOn: Boolean = false, val vertices: List<TakPacketV2Data.Payload.Vertex> = emptyList(), val truncated: Boolean = false, val bullseyeDistanceDm: Int = 0, val bullseyeBearingRef: Int = 0, val bullseyeFlags: Int = 0, val bullseyeUidRef: String = "") : TakPacketV2Data.Payload

User-drawn tactical graphic: circle, rectangle, polygon, polyline, telestration, ranging circle, or bullseye.

Link copied to clipboard
data class EmergencyAlert(val type: Int = 0, val authoringUid: String = "", val cancelReferenceUid: String = "") : TakPacketV2Data.Payload

Emergency alert / 911 beacon. Covers CoT types b-a-o-tbl (911), b-a-o-pan (ring the bell), b-a-o-opn (in contact), b-a-g (geo-fence breached), b-a-o-c (custom), b-a-o-can (cancel).

Link copied to clipboard
data class Marker(val kind: Int = 0, val color: Int = 0, val colorArgb: Int = 0, val readiness: Boolean = false, val parentUid: String = "", val parentType: String = "", val parentCallsign: String = "", val iconset: String = "") : TakPacketV2Data.Payload

Fixed marker: spot, waypoint, checkpoint, 2525 symbol, or custom icon. Maps to the Marker protobuf message at payload_variant tag 35.

Link copied to clipboard

No payload variant. Serializes to an empty oneof — an implicit PLI.

Link copied to clipboard
data class Pli(val value: Boolean = true) : TakPacketV2Data.Payload

An explicit position-location-information report.

Link copied to clipboard
data class RangeAndBearing(val anchorLatI: Int = 0, val anchorLonI: Int = 0, val anchorUid: String = "", val rangeCm: Int = 0, val bearingCdeg: Int = 0, val strokeColor: Int = 0, val strokeArgb: Int = 0, val strokeWeightX10: Int = 0) : TakPacketV2Data.Payload

Range and bearing measurement line. Maps to RangeAndBearing proto at payload_variant tag 36. Anchor endpoint is absolute lat/lon, not a delta from the event point.

Link copied to clipboard

Raw <detail> bytes shipped verbatim — the fallback for callers building packets directly with detail content the structured parser doesn't model. Maps to bytes raw_detail (payload_variant tag 33). CotXmlBuilder re-emits bytes inside <detail>…</detail> unchanged.

Link copied to clipboard
data class Route(val method: Int = 0, val direction: Int = 0, val prefix: String = "", val strokeWeightX10: Int = 0, val links: List<TakPacketV2Data.Payload.Route.Link> = emptyList(), val truncated: Boolean = false) : TakPacketV2Data.Payload

Named route consisting of ordered waypoints and control points. Maps to Route at payload_variant tag 37.

Link copied to clipboard
data class TakTalk(val text: String = "", val chatroomId: String = "", val lang: String = "", val fromVoice: Boolean = false) : TakPacketV2Data.Payload

TAKTALK voice/text chat message (CoT type m-t-t). The voice audio itself rides UDP/RTP outside the mesh; this carries the text envelope plus a from_voice marker for receiver UX.

Link copied to clipboard
data class TakTalkRoom(val senderCallsign: String = "", val roomId: String = "", val roomName: String = "", val participants: List<String> = emptyList()) : TakPacketV2Data.Payload

TAKTALK room/membership broadcast (CoT type y-). Not a chat message; receivers cache these to resolve room UUIDs (used in TakTalk.chatroomId and Chat.roomId) to a friendly name + roster for display.

Link copied to clipboard
data class TaskRequest(val taskType: String = "", val targetUid: String = "", val assigneeUid: String = "", val priority: Int = 0, val status: Int = 0, val note: String = "") : TakPacketV2Data.Payload

Task / engage request (CoT type t-s).

Link copied to clipboard
data class Vertex(val latI: Int, val lonI: Int)

Compact vertex used by polyline / polygon / rectangle shapes. Stored at the SDK level as Int pairs to match the 1e7-scaled coordinate convention used by TakPacketV2Data.latitudeI / longitudeI.