Package-level declarations

Types

Link copied to clipboard
@Serializable
data class BootloaderOtaQuirk(val hwModel: Int, val hwModelSlug: String? = null, val requiresBootloaderUpgradeForOta: Boolean = false, val infoUrl: String? = null)
Link copied to clipboard
data class Capabilities(val firmwareVersion: String?, forceEnableAll: Boolean = isDebug)

Defines the capabilities and feature support based on the device firmware version.

Link copied to clipboard
data class Channel(val settings: ChannelSettings = default.settings, val loraConfig: Config.LoRaConfig = default.loraConfig)
Link copied to clipboard
Link copied to clipboard
sealed interface ConnectionState
Link copied to clipboard
data class Contact(val contactKey: String, val shortName: String, val longName: String, val lastMessageTime: Long?, val lastMessageText: String?, val unreadCount: Int, val messageCount: Int, val isMuted: Boolean, val isUnmessageable: Boolean, val nodeColors: Pair<Int, Int>? = null) : CommonParcelable
Link copied to clipboard
data class ContactSettings(val contactKey: String, val muteUntil: Long = 0, val lastReadMessageUuid: Long? = null, val lastReadMessageTimestamp: Long? = null, val filteringDisabled: Boolean = false, val isMuted: Boolean = false)
Link copied to clipboard
@Serializable
data class DataPacket(var to: String? = ID_BROADCAST, var bytes: ByteString?, var dataType: Int, var from: String? = ID_LOCAL, var time: Long = nowMillis, var id: Int = 0, var status: MessageStatus? = MessageStatus.UNKNOWN, var hopLimit: Int = 0, var channel: Int = 0, var wantAck: Boolean = true, var hopStart: Int = 0, var snr: Float = 0.0f, var rssi: Int = 0, var replyId: Int? = null, var relayNode: Int? = null, var relays: Int = 0, var viaMqtt: Boolean = false, var emoji: Int = 0, var sfppHash: ByteString? = null, var transportMechanism: Int = 0) : CommonParcelable

A parcelable version of the protobuf MeshPacket + Data subpacket.

Link copied to clipboard
@Serializable
data class DeviceHardware(val activelySupported: Boolean = false, val architecture: String = "", val displayName: String = "", val hasInkHud: Boolean? = null, val hasMui: Boolean? = null, val hwModel: Int = 0, val hwModelSlug: String = "", val images: List<String>? = null, val partitionScheme: String? = null, val platformioTarget: String = "", val requiresDfu: Boolean? = null, val requiresBootloaderUpgradeForOta: Boolean? = null, val bootloaderInfoUrl: String? = null, val supportLevel: Int? = null, val tags: List<String>? = null)
Link copied to clipboard
data class DeviceMetrics(val time: Int = currentTime(), val batteryLevel: Int = 0, val voltage: Float, val channelUtilization: Float, val airUtilTx: Float, val uptimeSeconds: Int) : CommonParcelable
Link copied to clipboard

Represent the different ways a device can connect to the client.

Link copied to clipboard
data class DeviceVersion(val asString: String) : Comparable<DeviceVersion>

Provide structured access to parse and compare device version strings

Link copied to clipboard
data class EnvironmentMetrics(val time: Int = currentTime(), val temperature: Float?, val relativeHumidity: Float?, val soilTemperature: Float?, val soilMoisture: Int?, val barometricPressure: Float?, val gasResistance: Float?, val voltage: Float?, val current: Float?, val iaq: Int?, val lux: Float? = null, val uvLux: Float? = null) : CommonParcelable
Link copied to clipboard

Address identifiers for all supported radio backend implementations.

Link copied to clipboard
sealed class MeshActivity

Represents activity on the mesh network.

Link copied to clipboard
data class MeshLog(val uuid: String, val message_type: String, val received_date: Long, val raw_message: String, val fromNum: Int = 0, val portNum: Int = 0, val fromRadio: FromRadio = FromRadio())

Represents a log entry in shared repository/domain code.

Link copied to clipboard
data class MeshUser(val id: String, val longName: String, val shortName: String, val hwModel: HardwareModel, val isLicensed: Boolean = false, val role: Int = 0) : CommonParcelable
Link copied to clipboard
data class Message(val uuid: Long, val receivedTime: Long, val node: Node, val text: String, val fromLocal: Boolean, val time: String, val read: Boolean, val status: MessageStatus?, val routingError: Int, val packetId: Int, val emojis: List<Reaction>, val snr: Float, val rssi: Int, val hopsAway: Int, val replyId: Int?, val originalMessage: Message? = null, val viaMqtt: Boolean = false, val relayNode: Int? = null, val relays: Int = 0, val filtered: Boolean = false, val transportMechanism: Int = 0)
Link copied to clipboard
Link copied to clipboard
sealed class MqttConnectionState

App-level MQTT proxy connection state, decoupled from the MQTT library's internal type.

Link copied to clipboard
@Serializable
data class MqttJsonPayload(val type: String, val from: Long, val to: Long? = null, val channel: Int? = null, val payload: String? = null, val hopLimit: Int? = null, val id: Long? = null, val time: Long? = null, val sender: String? = null)
Link copied to clipboard
sealed class MqttProbeStatus

UI-friendly outcome of a one-shot MQTT broker reachability probe.

Link copied to clipboard
data class MyNodeInfo(val myNodeNum: Int, val hasGPS: Boolean, val model: String?, val firmwareVersion: String?, val couldUpdate: Boolean, val shouldUpdate: Boolean, val currentPacketId: Long, val messageTimeoutMsec: Int, val minAppVersion: Int, val maxChannels: Int, val hasWifi: Boolean, val channelUtilization: Float, val airUtilTx: Float, val deviceId: String?, val pioEnv: String? = null) : CommonParcelable
Link copied to clipboard
@Serializable
data class NetworkDeviceHardware(val activelySupported: Boolean = false, val architecture: String = "", val displayName: String = "", val hasInkHud: Boolean? = null, val hasMui: Boolean? = null, val hwModel: Int = 0, val hwModelSlug: String = "", val images: List<String>? = null, val key: String? = null, val partitionScheme: String? = null, val platformioTarget: String = "", val requiresDfu: Boolean? = null, val supportLevel: Int? = null, val tags: List<String>? = null, val variant: String? = null)
Link copied to clipboard
@Serializable
data class NetworkFirmwareRelease(val id: String = "", val pageUrl: String = "", val releaseNotes: String = "", val title: String = "", val zipUrl: String = "")
Link copied to clipboard
@Serializable
data class NetworkFirmwareReleases(val pullRequests: List<NetworkFirmwareRelease> = listOf(), val releases: Releases = Releases())
Link copied to clipboard
data class Node(val num: Int, val metadata: DeviceMetadata? = null, val user: User = User(), val position: Position = Position(), val snr: Float = Float.MAX_VALUE, val rssi: Int = Int.MAX_VALUE, val lastHeard: Int = 0, val deviceMetrics: DeviceMetrics = DeviceMetrics(), val channel: Int = 0, val viaMqtt: Boolean = false, val hopsAway: Int = -1, val isFavorite: Boolean = false, val isIgnored: Boolean = false, val isMuted: Boolean = false, val environmentMetrics: EnvironmentMetrics = EnvironmentMetrics(), val powerMetrics: PowerMetrics = PowerMetrics(), val paxcounter: Paxcount = Paxcount(), val publicKey: ByteString? = null, val notes: String = "", val manuallyVerified: Boolean = false, val nodeStatus: String? = null, val lastTransport: Int = 0)

Domain model representing a node in the mesh network.

Link copied to clipboard
data class NodeInfo(val num: Int, var user: MeshUser? = null, var position: Position? = null, var snr: Float = Float.MAX_VALUE, var rssi: Int = Int.MAX_VALUE, var lastHeard: Int = 0, var deviceMetrics: DeviceMetrics? = null, var channel: Int = 0, var environmentMetrics: EnvironmentMetrics? = null, var hopsAway: Int = 0, var nodeStatus: String? = null) : CommonParcelable
Link copied to clipboard
Link copied to clipboard
data class Position(val latitude: Double, val longitude: Double, val altitude: Int, val time: Int = currentTime(), val satellitesInView: Int = 0, val groundSpeed: Int = 0, val groundTrack: Int = 0, val precisionBits: Int = 0) : CommonParcelable
Link copied to clipboard
interface RadioController

Central interface for controlling the radio and mesh network.

Link copied to clipboard
open class RadioNotConnectedException(message: String = "Not connected to radio") : Exception

Exception thrown when an operation is attempted while not connected to a mesh radio.

Link copied to clipboard
data class Reaction(val replyId: Int, val user: User, val emoji: String, val timestamp: Long, val snr: Float, val rssi: Int, val hopsAway: Int, val packetId: Int = 0, val status: MessageStatus = MessageStatus.UNKNOWN, val routingError: Int = 0, val relays: Int = 0, val relayNode: Int? = null, val to: String? = null, val channel: Int = 0, val sfppHash: ByteString? = null)
Link copied to clipboard

Regulatory regions for radio usage

Link copied to clipboard
@Serializable
data class Releases(val alpha: List<NetworkFirmwareRelease> = listOf(), val stable: List<NetworkFirmwareRelease> = listOf())
Link copied to clipboard
sealed interface SessionStatus

Durable per-node remote-administration session status, derived from the time of the last admin response that carried a session_passkey from the target node.

Link copied to clipboard
Link copied to clipboard
data class TracerouteOverlay(val requestId: Int, val forwardRoute: List<Int> = emptyList(), val returnRoute: List<Int> = emptyList())

Represents a traceroute result with forward and return routes as ordered lists of node nums.

Properties

Link copied to clipboard
val MeshPacket.fullRouteDiscovery: RouteDiscovery?
Link copied to clipboard
val MeshPacket.neighborInfo: NeighborInfo?
Link copied to clipboard
val Config.LoRaConfig.numChannels: Int

Functions

Link copied to clipboard
fun evaluateTracerouteMapAvailability(forwardRoute: List<Int>, returnRoute: List<Int>, positionedNodeNums: Set<Int>): TracerouteMapAvailability
Link copied to clipboard
fun getColorFrom(team: Team): Long
Link copied to clipboard
fun MeshPacket.getNeighborInfoResponse(getUser: (nodeNum: Int) -> String, header: String = "Neighbors:"): String?
fun NeighborInfo.getNeighborInfoResponse(getUser: (nodeNum: Int) -> String, header: String = "Neighbors:"): String
Link copied to clipboard
fun getStringResFrom(routingError: Int): StringResource
fun getStringResFrom(role: MemberRole): StringResource
fun getStringResFrom(team: Team): StringResource
Link copied to clipboard
fun MeshPacket.getTracerouteResponse(getUser: (nodeNum: Int) -> String, headerTowards: String = "Route traced toward destination:", headerBack: String = "Route traced back to us:"): String?
fun RouteDiscovery.getTracerouteResponse(getUser: (nodeNum: Int) -> String, headerTowards: String = "Route traced toward destination:", headerBack: String = "Route traced back to us:"): String
Link copied to clipboard
fun Config.DeviceConfig.Role?.isUnmessageableRole(): Boolean