MqttRootTopic

The root topic rules the firmware and broker impose.

Types

Link copied to clipboard

Properties

Link copied to clipboard
const val BYTE_CAP: Int = 31

The firmware's buffer: 31 UTF-8 bytes plus the terminator.

Functions

Link copied to clipboard
fun hasPrefix(root: String, prefix: String): Boolean

Segment-wise, case-insensitive prefix: "msh/US/WA" prefixes "msh/US/WA/seattle" but not "msh/US/WAX".

Link copied to clipboard

First rule broken, in enum order; null when the radio accepts the root as typed.

Link copied to clipboard
Link copied to clipboard
fun sanitized(text: String): String

Whitespace trimmed at both ends, runs of "/" collapsed to one, one trailing "/" dropped.

Link copied to clipboard
fun segments(root: String): List<String>

Split on "/", each segment trimmed, empties dropped.