saveHeartbeat

abstract suspend fun saveHeartbeat(nodeId: NodeId, epochMillis: Long)(source)

Persist the engine-observed last-heartbeat timestamp for nodeId.

The engine updates this on every frame it observes from a node (periodic heartbeats, telemetry, forwarded packets, ...). Persistence is what keeps presence state alive across process death: on the next RadioClient.connect the engine calls loadHeartbeats and rehydrates its in-memory map so subscribers don't see every previously-known node as "silent since boot".

Implementations should upsert the row for nodeId without touching any other columns on the node (in particular, not resetting NodeInfo fields).

Parameters

nodeId

the node the timestamp is for

epochMillis

wall-clock time the engine observed activity, as epoch milliseconds (UTC)