NodeManager
Interface for managing the in-memory node database and processing received node information.
Properties
Whether node database writes are allowed.
Fresh-handshake identity for the current connection session. Null when no handshake identity has been confirmed for the active transport. Cleared synchronously before a new address is published, and populated atomically when handleMyInfo captures the selected address and decodes nodeNum and deviceId from the same MyNodeInfo packet. Generation-boundary cleanup atomically preserves an identity already published for the new session. Never populated by loadCachedNodeDB or reactive DB cache emissions.
The firmware edition reported by the connected device.
Whether the node database is ready.
The connected device's factory-burned hardware id from MyNodeInfo, as a thread-safe StateFlow. Null when not connected or when the hardware/firmware doesn't report one. Unlike myNodeNum (which firmware 2.8 re-derives from the public key), this survives upgrades, erases, and key changes.
Reactive map of all nodes by their number.
Functions
Applies node-number removals returned by the trusted configuration install. Removed numbers stay retired for the current device/database session so delayed field packets cannot recreate migrated identities.
Clears the connection-session identity source synchronously.
Atomically clears an identity retained from a generation other than activeSessionGeneration. An identity that already belongs to the active generation is preserved, even when its publication races a delayed boundary collector from the same generation.
Returns information about the local node.
Look up a node by its user ID string (e.g. "!a1b2c3d4").
Processes a received node status message.
Processes a received paxcounter packet.
Processes a received position packet.
Processes a received telemetry packet.
Processes a received user packet.
Inserts hardware metadata for a node.
Installs node information in memory. Callers that require an immediate standalone write use installNodeInfoAndPersist; configuration handshakes batch the resulting snapshot through the repository.
Installs node information and awaits any required persistence.
Loads the cached node database from the repository.
Publishes a fresh connection-session identity from a handshake MyNodeInfo. Invoked exactly once per handshake after sessionGeneration, address, nodeNum, and deviceId have been captured for the same session.
Removes a node from the in-memory database by its number.
Sets whether node database writes are allowed.
Sets the firmware edition of the connected device.
Sets the connected device's hardware id.
Sets the local node number.
Sets whether the node database is ready.
Updates a node using a side-effect-free transform and schedules persistence. The transform may be evaluated more than once after compare-and-set contention; callers must perform notifications and other effects afterward.
Session-bound counterpart to updateNode; deferred persistence is admitted only for session.
Updates the status string for a node.
Updates node status and awaits any required persistence.