pub struct OffloadSession { /* private fields */ }Expand description
A streaming perception/SLAM offload session with per-stream freshness gates and a lock-state safety gate.
Implementations§
Source§impl OffloadSession
impl OffloadSession
Sourcepub fn new(
mode: OffloadMode,
target_budget_ms: i64,
pose_budget_ms: i64,
) -> Self
pub fn new( mode: OffloadMode, target_budget_ms: i64, pose_budget_ms: i64, ) -> Self
A session in mode with the target-age and pose-age freshness budgets.
Sourcepub fn mode(&self) -> OffloadMode
pub fn mode(&self) -> OffloadMode
The mode the session was opened in.
Sourcepub fn on_detection(&mut self, now_ms: i64)
pub fn on_detection(&mut self, now_ms: i64)
A detection/target result arrived from the node. now_ms is the local
monotonic time of arrival (the same clock tick reads), not
the result’s own timestamp, see FreshnessGate.
Sourcepub fn on_pose(&mut self, now_ms: i64)
pub fn on_pose(&mut self, now_ms: i64)
A drift-corrected pose arrived from the node.
now_ms is the local monotonic time of arrival.
Sourcepub fn set_link(&mut self, up: bool)
pub fn set_link(&mut self, up: bool)
The link state changed (a drop trips every stream to lost).
Sourcepub fn designate(&mut self)
pub fn designate(&mut self)
Acquire (or re-acquire) the lock, an operator designate / click-to-track. The only way out of a lost lock.
Sourcepub fn lock_state(&self) -> LockState
pub fn lock_state(&self) -> LockState
The current lock state.
Sourcepub fn tick(&mut self, now_ms: i64) -> SessionStatus
pub fn tick(&mut self, now_ms: i64) -> SessionStatus
Advance the session one cycle. Updates the lock from the stream freshness
(a locked behaviour whose required stream went stale drops to lost and
must be re-designated) and returns the safety snapshot the behaviour acts
on. commanding is true only when locked AND fresh.