RadioConfigRepository

Properties

Link copied to clipboard
abstract val channelSetFlow: Flow<ChannelSet>

Flow representing the ChannelSet data store.

Link copied to clipboard
abstract val deviceProfileFlow: Flow<DeviceProfile>

Flow representing the combined DeviceProfile protobuf.

Link copied to clipboard
abstract val deviceUIConfigFlow: Flow<DeviceUIConfig?>

Flow of the device's UI configuration, populated from DeviceUIConfig during the config handshake (STATE_SEND_UIDATA — 2nd packet in every handshake). Null until the first handshake completes or after clearDeviceUIConfig is called.

Link copied to clipboard
abstract val fileManifestFlow: Flow<List<FileInfo>>

Flow of FileInfo packets accumulated during STATE_SEND_FILEMANIFEST.

Link copied to clipboard
abstract val localConfigFlow: Flow<LocalConfig>

Flow representing the LocalConfig data store.

Link copied to clipboard
abstract val loraRegionPresetMapFlow: Flow<LoRaRegionPresetMap?>

Flow of the firmware's region→modem-preset compatibility map (LoRaRegionPresetMap), populated from org.meshtastic.proto.FromRadio.region_presets during the config handshake (sent after metadata, before channels). Null when the connected firmware predates this message (< 2.8) or after clearLoraRegionPresetMap. The local LoRa config UI uses it to constrain the preset picker to the presets legal in the selected region.

Link copied to clipboard
abstract val moduleConfigFlow: Flow<LocalModuleConfig>

Flow representing the LocalModuleConfig data store.

Functions

Link copied to clipboard
abstract suspend fun addFileInfo(info: FileInfo)

Appends a single FileInfo entry to fileManifestFlow.

Link copied to clipboard
abstract suspend fun clearChannelSet()

Clears the ChannelSet data in the data store.

Link copied to clipboard
abstract suspend fun clearDeviceUIConfig()

Clears the stored DeviceUIConfig; called at the start of each new handshake.

Link copied to clipboard
abstract suspend fun clearFileManifest()

Clears the accumulated file manifest; called at the start of each new handshake.

Link copied to clipboard
abstract suspend fun clearLocalConfig()

Clears the LocalConfig data in the data store.

Link copied to clipboard
abstract suspend fun clearLocalModuleConfig()

Clears the LocalModuleConfig data in the data store.

Link copied to clipboard
abstract suspend fun clearLoraRegionPresetMap()

Clears the stored region→preset map; called at the start of each new handshake.

Link copied to clipboard
abstract suspend fun reconcileConversations()

Re-keys stored conversations onto the current channel set.

Link copied to clipboard
abstract suspend fun replaceAllSettings(settingsList: List<ChannelSettings>)

Replaces the ChannelSettings list with a new settingsList.

Link copied to clipboard
abstract suspend fun setDeviceUIConfig(config: DeviceUIConfig)

Stores the DeviceUIConfig received from the device.

Link copied to clipboard
abstract suspend fun setLocalConfig(config: Config)

Updates LocalConfig from each Config oneOf.

Link copied to clipboard
abstract suspend fun setLocalModuleConfig(config: ModuleConfig)

Updates LocalModuleConfig from each ModuleConfig oneOf.

Link copied to clipboard
abstract suspend fun setLoraRegionPresetMap(map: LoRaRegionPresetMap)

Stores the LoRaRegionPresetMap received from the device.

Link copied to clipboard
abstract suspend fun updateChannelSet(settingsList: List<ChannelSettings>?, loraConfig: Config.LoRaConfig?)

Atomically updates the cached channel set. A null argument preserves that field's current value.

Link copied to clipboard
abstract suspend fun updateChannelSettings(channel: Channel)

Updates the ChannelSettings list with the provided channel.