Package-level declarations

Types

Link copied to clipboard
@Serializable
data class BootloaderOtaQuirksCacheEntity(val id: Int = SINGLETON_ID, val devicesJson: String = "[]", val softDeviceVariantsJson: String = "[]")

Single-row cache of the nRF52 bootloader/OTA quirk catalog (/resource/bootloaderOtaQuirks), pre-serialized rather than modeled as per-row tables — the only two readers (applyBootloaderQuirk/applySoftDeviceVariant in DeviceHardwareRepositoryImpl) always want the whole envelope and filter it in Kotlin, so a granular schema would add migration surface for no query anyone runs. id is always SINGLETON_ID; this table only ever holds one row.

Link copied to clipboard
data class ChannelSetEntity(val id: Int = SINGLETON_ID, val channelSet: ChannelSet)

The connected device's channel set, stored per-device (one row per Room database).

Link copied to clipboard
data class ContactSettings(val contact_key: String, val muteUntil: Long = 0, val lastReadMessageUuid: Long? = null, val lastReadMessageTimestamp: Long? = null, val filteringDisabled: Boolean = false)
Link copied to clipboard
@Serializable
data class DeviceHardwareEntity(val activelySupported: Boolean, val architecture: String, val displayName: String, val hasInkHud: Boolean? = null, val hasMui: Boolean? = null, val hwModel: Int, val hwModelSlug: String, val images: List<String>?, val lastUpdated: Long = nowMillis, val partitionScheme: String? = null, val platformioTarget: String, val requiresDfu: Boolean?, val supportLevel: Int?, val tags: List<String>?)
Link copied to clipboard
@Serializable
data class DeviceLinkEntity(val shortCode: String, val linkDescription: String? = null, val isVendor: Boolean = false, val regions: List<String>? = null, val targets: List<String>? = null)

A msh.to device link, cached from the Meshtastic API (/resource/deviceLinks) during the refresh cycle.

Link copied to clipboard
data class DiscoveredNodeEntity(val id: Long = 0, val presetResultId: Long, val nodeNum: Long, val shortName: String? = null, val longName: String? = null, val neighborType: String = "direct", val latitude: Double? = null, val longitude: Double? = null, val distanceFromUser: Double? = null, val hopCount: Int = 0, val snr: Float = 0.0f, val rssi: Int? = null, val messageCount: Int = 0, val sensorPacketCount: Int = 0, val isInfrastructure: Boolean = false)
Link copied to clipboard
data class DiscoveryPresetResultEntity(val id: Long = 0, val sessionId: Long, val presetName: String, val dwellDurationSeconds: Long = 0, val uniqueNodes: Int = 0, val directNeighborCount: Int = 0, val meshNeighborCount: Int = 0, val infrastructureNodeCount: Int = 0, val messageCount: Int = 0, val sensorPacketCount: Int = 0, val avgChannelUtilization: Double = 0.0, val avgAirtimeRate: Double = 0.0, val packetSuccessRate: Double = 0.0, val packetFailureRate: Double = 0.0, val aiSummary: String? = null, val numPacketsTx: Int = 0, val numPacketsRx: Int = 0, val numPacketsRxBad: Int = 0, val numRxDupe: Int = 0, val numTxRelay: Int = 0, val numTxRelayCanceled: Int = 0, val numOnlineNodes: Int = 0, val numTotalNodes: Int = 0, val uptimeSeconds: Int = 0)
Link copied to clipboard
data class DiscoverySessionEntity(val id: Long = 0, val timestamp: Long, val presetsScanned: String, val homePreset: String, val totalUniqueNodes: Int = 0, val avgChannelUtilization: Double = 0.0, val totalMessages: Int = 0, val totalSensorPackets: Int = 0, val furthestNodeDistance: Double = 0.0, val completionStatus: String = DiscoverySessionStatus.COMPLETE, val aiSummary: String? = null, val userLatitude: Double = 0.0, val userLongitude: Double = 0.0, val totalDwellSeconds: Long = 0, val deviceAddress: String? = null, val homeLoraConfig: Config.LoRaConfig? = null, val homePrimaryChannel: ChannelSettings? = null)
Link copied to clipboard

Persisted discovery-session states shared by database queries, scan execution, and recovery.

Link copied to clipboard
@Serializable
data class EventFirmwareEditionEntity(val edition: String, val displayName: String = "", val welcomeMessage: String = "", val eventStart: String? = null, val eventEnd: String? = null, val timeZone: String? = null, val location: String? = null, val iconUrl: String? = null, val accentColor: String? = null, val tag: String? = null, val domain: String? = null, val themeJson: String? = null, val firmwareJson: String? = null, val linksJson: String = "[]")

An event-firmware display record, cached from the Meshtastic API (/resource/eventFirmware) during refresh. The nested links/theme/firmware objects are stored pre-serialized rather than via Room type converters — this is the only entity that needs those column types, so shared org.meshtastic.core.database.Converters entries would be unused elsewhere.

Link copied to clipboard
data class FirmwareRelease(val id: String = "", val pageUrl: String = "", val releaseNotes: String = "", val title: String = "", val zipUrl: String = "", val lastUpdated: Long = nowMillis, val releaseType: FirmwareReleaseType = FirmwareReleaseType.STABLE)
Link copied to clipboard
@Serializable
data class FirmwareReleaseEntity(val id: String = "", val pageUrl: String = "", val releaseNotes: String = "", val title: String = "", val zipUrl: String = "", val lastUpdated: Long = nowMillis, val releaseType: FirmwareReleaseType = FirmwareReleaseType.STABLE)
Link copied to clipboard
@Serializable
data class MaintenanceUf2CacheEntity(val id: Int = SINGLETON_ID, val manifestJson: String)

Single-row cache of the maintenance-UF2 manifest (/resource/maintenanceUf2), pre-serialized as one JSON column — the only reader (org.meshtastic.core.data.repository.MaintenanceUf2RepositoryImpl) always wants the whole envelope, so a granular per-field schema would add migration surface for no query anyone runs. id is always SINGLETON_ID; this table only ever holds one row.

Link copied to clipboard
data class MergeMarkerEntity(val sourceDbName: String, val mergedAt: Long = 0)

A durable record, in the canonical (destination) database, that a given source database has already been folded in by org.meshtastic.core.database.DatabaseMerger. Written inside the same merge transaction as the copied rows, so it commits atomically with them. When org.meshtastic.core.database.DatabaseManager.associateDevice re-runs the merge on the next connection, DatabaseMerger.merge finds the marker at the top of its transaction and skips the whole merge — closing the crash window between the merge commit and the datastore alias write, where a retry would otherwise duplicate the fresh-id packet/discovery rows. Markers share the destination DB's lifecycle: if the canonical DB is LRU-evicted and later recreated empty, its markers vanish with the merged data they describe.

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 the database.

Link copied to clipboard
data class MetadataEntity(val num: Int, val proto: DeviceMetadata, val timestamp: Long = nowMillis)
Link copied to clipboard
open class MyNodeEntity(val myNodeNum: Int, 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 deviceId: String? = DEVICE_ID_UNKNOWN, val pioEnv: String? = null)
Link copied to clipboard
data class NodeEntity(val num: Int, var user: User = User(), var longName: String? = null, var shortName: String? = null, var position: Position = WirePosition(), var latitude: Double = 0.0, var longitude: Double = 0.0, var snr: Float = Float.MAX_VALUE, var rssi: Int = Int.MAX_VALUE, var lastHeard: Int = 0, var deviceTelemetry: Telemetry = Telemetry(), var channel: Int = 0, var viaMqtt: Boolean = false, var hopsAway: Int = -1, var isFavorite: Boolean = false, var isIgnored: Boolean = false, var isMuted: Boolean = false, var environmentTelemetry: Telemetry = Telemetry(), var powerTelemetry: Telemetry = Telemetry(), var airQualityTelemetry: Telemetry = Telemetry(), var paxcounter: Paxcount = Paxcount(), var publicKey: ByteString? = null, var notes: String = "", var powerChannelLabels: List<String> = emptyList(), var manuallyVerified: Boolean = false, var nodeStatus: String? = null, var lastTransport: Int = 0, var signsPackets: Boolean = false)
Link copied to clipboard
data class NodeWithRelations(val node: NodeEntity, val metadata: MetadataEntity?)
Link copied to clipboard
data class Packet(val uuid: Long, val myNodeNum: Int, val port_num: Int, val contact_key: String, val received_time: Long, val read: Boolean, val data: DataPacket, val packetId: Int = 0, var routingError: Int = -1, val snr: Float? = null, val rssi: Int? = null, val hopsAway: Int = -1, val sfpp_hash: ByteString? = null, val filtered: Boolean = false, val messageText: String = "", val translatedText: String? = null, val showTranslated: Boolean = false)
Link copied to clipboard
data class PacketEntity(val packet: Packet, val reactions: List<ReactionEntity>)
Link copied to clipboard
data class PacketFts(val messageText: String)

FTS5 virtual table that mirrors Packet.messageText for full-text search. Room auto-generates INSERT/UPDATE/DELETE triggers to keep this table in sync with the content entity (Packet).

Link copied to clipboard
data class QuickChatAction(val uuid: Long = 0, val name: String = "", val message: String = "", val mode: QuickChatAction.Mode = Mode.Instant, val position: Int)
Link copied to clipboard
data class ReactionEntity(val myNodeNum: Int = 0, val replyId: Int, val userId: String, val emoji: String, val timestamp: Long, val snr: Float? = null, val rssi: Int? = null, val hopsAway: Int = -1, 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 sfpp_hash: ByteString? = null)
Link copied to clipboard
data class TracerouteNodePositionEntity(val logUuid: String, val requestId: Int, val nodeNum: Int, val position: Position)

Functions