Expand description
The perception offload-link sidecar: the drone’s live “a workstation is paired + reachable, and I am offloading to it” state.
The offload reconciler (on the drone) writes this file each tick; the status
surfaces read it staleness-gated and feed a REAL compute_node_paired /
bearer_acceptable into crate’s tier decision, so an NPU-less drone with
a reachable workstation reports (and runs) tier offload instead of the
hardcoded “no node” default. Absent / stale ⇒ no offload link ⇒ the drone
reports none (honest: never a fabricated paired node).
Producer: the ados-cloud offload reconciler. Consumers: ados-control
(/api/status) and ados-cloud (the cloud heartbeat). Single writer, many
readers — the same sidecar shape as compute-heartbeat / atlas-forward.
Structs§
- Offload
Link - The drone’s live offload-link state, written by the reconciler each tick.
Constants§
- OFFLOAD_
LINK_ SIDECAR - The offload-link sidecar path (tmpfs, cleared on boot).
- OFFLOAD_
LINK_ SIDECAR_ VERSION - The sidecar schema version, stamped on write and checked (warn-only) on read.
- OFFLOAD_
LINK_ STALE_ MS - A link file not re-written within this window is treated as absent, so a dead
/ hung reconciler (whose tmpfs file persists) never keeps a drone reporting a
frozen
offloadtier after the workstation is gone. 4x the reconciler’s ~5 s tick.
Functions§
- read_
offload_ link - Read the offload-link sidecar from the default path, staleness-gated at
now_ms. - read_
offload_ link_ from - Read + parse the offload-link sidecar at
path, orNonewhen it is absent, unparseable, missing its write-time, or STALE (older thanOFFLOAD_LINK_STALE_MSatnow_ms).now_msis injected so the staleness gate is testable without touching the clock. - write_
offload_ link - Atomically write
linkto the default sidecar path. - write_
offload_ link_ to - Atomically write
linktopath(tmp + rename), creating the parent dir if needed. The reconciler stamps the link (OffloadLink::stamped) before calling this.