MqttTopicDiscovery

Broker topic strings and map-report payloads turned into per-root activity.

Types

Link copied to clipboard
class Activity

Everything heard on one root during a sample, with every set capped.

Link copied to clipboard
sealed interface Kind
Link copied to clipboard
data class MapReportSummary(val reporter: String, val position: LatLon?, val onlineLocalNodes: Int)
Link copied to clipboard
data class Observation(val root: String, val kind: MqttTopicDiscovery.Kind)
Link copied to clipboard
class Tally

Bounded per-root tally. A new root past MAX_ROOTS is dropped and counted in droppedRoots.

Functions

Link copied to clipboard
fun mapReport(envelope: ServiceEnvelope): MqttTopicDiscovery.MapReportSummary?

Plaintext MapReport out of an envelope; null for encrypted packets, other portnums and parse errors.

Link copied to clipboard

Segments trimmed and empties dropped, the trailing "/" of a map topic kept. A root with a stray slash or space cannot be saved, so its traffic is credited to the spelling that can. Repeated segments stay: "msh/US/US/FL" is a real root with its own traffic.

Link copied to clipboard

Null for anything that is not a 2/e or 2/map topic (uppercase hex, /1/c/, /2/json/, foreign roots).