NodeManager

interface NodeManager : <ERROR CLASS> ERROR CLASS: Symbol not found for NodeIdLookup(source)

Interface for managing the in-memory node database and processing received node information.

Properties

Link copied to clipboard
abstract val allowNodeDbWrites: ERROR CLASS: Symbol not found for StateFlow<kotlin/Boolean>

Whether node database writes are allowed.

Link copied to clipboard
abstract val isNodeDbReady: ERROR CLASS: Symbol not found for StateFlow<kotlin/Boolean>

Whether the node database is ready.

Link copied to clipboard
abstract var myNodeNum: Int?

The local node number.

Link copied to clipboard
abstract val nodeDBbyID: Map<String, ERROR CLASS: Symbol not found for Node>

Reactive map of all nodes by their ID string.

Link copied to clipboard
abstract val nodeDBbyNodeNum: Map<Int, ERROR CLASS: Symbol not found for Node>

Reactive map of all nodes by their number.

Functions

Link copied to clipboard
abstract fun clear()

Clears the in-memory node database.

Link copied to clipboard
abstract fun getMyId(): String

Returns the local node ID.

Link copied to clipboard
abstract fun getMyNodeInfo(): ERROR CLASS: Symbol not found for MyNodeInfo??

Returns information about the local node.

Link copied to clipboard
abstract fun getNodes(): List<ERROR CLASS: Symbol not found for NodeInfo>

Returns a list of all known nodes.

Link copied to clipboard
abstract fun handleReceivedNodeStatus(fromNum: Int, s: ERROR CLASS: Symbol not found for StatusMessage)

Processes a received node status message.

Link copied to clipboard
abstract fun handleReceivedPaxcounter(fromNum: Int, p: ERROR CLASS: Symbol not found for Paxcount)

Processes a received paxcounter packet.

Link copied to clipboard
abstract fun handleReceivedPosition(fromNum: Int, myNodeNum: Int, p: ERROR CLASS: Symbol not found for ProtoPosition, defaultTime: Long)

Processes a received position packet.

Link copied to clipboard
abstract fun handleReceivedTelemetry(fromNum: Int, telemetry: ERROR CLASS: Symbol not found for Telemetry)

Processes a received telemetry packet.

Link copied to clipboard
abstract fun handleReceivedUser(fromNum: Int, p: ERROR CLASS: Symbol not found for User, channel: Int = 0, manuallyVerified: Boolean = false)

Processes a received user packet.

Link copied to clipboard
abstract fun insertMetadata(nodeNum: Int, metadata: ERROR CLASS: Symbol not found for DeviceMetadata)

Inserts hardware metadata for a node.

Link copied to clipboard
abstract fun installNodeInfo(info: ERROR CLASS: Symbol not found for ProtoNodeInfo, withBroadcast: Boolean = true)

Installs node information from a ProtoNodeInfo object.

Link copied to clipboard
abstract fun loadCachedNodeDB()

Loads the cached node database from the repository.

Link copied to clipboard
abstract fun removeByNodenum(nodeNum: Int)

Removes a node from the in-memory database by its number.

Link copied to clipboard
abstract fun setAllowNodeDbWrites(allowed: Boolean)

Sets whether node database writes are allowed.

Link copied to clipboard
abstract fun setNodeDbReady(ready: Boolean)

Sets whether the node database is ready.

Link copied to clipboard
abstract fun start(scope: ERROR CLASS: Symbol not found for CoroutineScope)

Starts the node manager with the given coroutine scope.

Link copied to clipboard
abstract fun updateNode(nodeNum: Int, withBroadcast: Boolean = true, channel: Int = 0, transform: (ERROR CLASS: Symbol not found for Node) -> ERROR CLASS: Symbol not found for Node)

Updates a node using a transformation function.

Link copied to clipboard
abstract fun updateNodeStatus(nodeNum: Int, status: String?)

Updates the status string for a node.