RadioConfigRepository

class RadioConfigRepository @Inject constructor(serviceRepository: ServiceRepository, nodeDB: NodeRepository, channelSetRepository: ChannelSetRepository, localConfigRepository: LocalConfigRepository, moduleConfigRepository: ModuleConfigRepository)

Class responsible for radio configuration data. Combines access to nodeDB, ChannelSet, LocalConfig&LocalModuleConfig.

Constructors

Link copied to clipboard
@Inject
constructor(serviceRepository: ServiceRepository, nodeDB: NodeRepository, channelSetRepository: ChannelSetRepository, localConfigRepository: LocalConfigRepository, moduleConfigRepository: ModuleConfigRepository)

Properties

Link copied to clipboard
val channelSetFlow: Flow<<Error class: unknown class>>

Flow representing the ChannelSet data store.

Link copied to clipboard
val clientNotification: StateFlow<<Error class: unknown class>?>
Link copied to clipboard
Link copied to clipboard
val deviceProfileFlow: Flow<<Error class: unknown class>>

Flow representing the combined DeviceProfile protobuf.

Link copied to clipboard
val errorMessage: StateFlow<String?>
Link copied to clipboard
val localConfigFlow: Flow<<Error class: unknown class>>

Flow representing the LocalConfig data store.

Link copied to clipboard
val meshPacketFlow: SharedFlow<<Error class: unknown class>>
Link copied to clipboard
val meshService: <Error class: unknown class>?
Link copied to clipboard
val moduleConfigFlow: Flow<<Error class: unknown class>>

Flow representing the LocalModuleConfig data store.

Link copied to clipboard
val myId: StateFlow<String?>

Flow representing the unique userId of our node.

Link copied to clipboard
val myNodeInfo: StateFlow<MyNodeEntity?>

Flow representing the MyNodeEntity database.

Link copied to clipboard
val nodeDBbyNum: StateFlow<Map<Int, Node>>

Flow representing the Node database.

Link copied to clipboard
Link copied to clipboard
val tracerouteResponse: StateFlow<String?>

Functions

Link copied to clipboard
suspend fun clearChannelSet()

Clears the ChannelSet data in the data store.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun clearLocalConfig()

Clears the LocalConfig data in the data store.

Link copied to clipboard

Clears the LocalModuleConfig data in the data store.

Link copied to clipboard
suspend fun clearNodeDB()
Link copied to clipboard
Link copied to clipboard
suspend fun emitMeshPacket(packet: <Error class: unknown class>)
Link copied to clipboard
suspend fun getNodeDBbyNum()
Link copied to clipboard
fun getUser(nodeNum: Int): <Error class: unknown class>
Link copied to clipboard
suspend fun insertMetadata(fromNum: Int, metadata: <Error class: unknown class>)
Link copied to clipboard
Link copied to clipboard
suspend fun installNodeDb(nodes: List<NodeEntity>)
Link copied to clipboard
suspend fun onServiceAction(action: ServiceAction)
Link copied to clipboard
suspend fun replaceAllSettings(settingsList: List<<Error class: unknown class>>)

Replaces the ChannelSettings list with a new settingsList.

Link copied to clipboard
fun setClientNotification(notification: <Error class: unknown class>?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun setLocalConfig(config: <Error class: unknown class>)

Updates LocalConfig from each Config oneOf.

Link copied to clipboard
suspend fun setLocalModuleConfig(config: <Error class: unknown class>)

Updates LocalModuleConfig from each ModuleConfig oneOf.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun updateChannelSettings(channel: <Error class: unknown class>)

Updates the ChannelSettings list with the provided channel and returns the index of the admin channel after the update (if not found, returns 0).

Link copied to clipboard
suspend fun upsert(node: NodeEntity)