pub struct TickContext<'a, M> {
pub gm: &'a mut M,
pub client: &'a mut CommandClient,
pub cycle: u64,
}Expand description
Per-tick context passed to the control program by the framework.
TickContext bundles all per-cycle data into a single struct so that the
ControlProgram::process_tick signature stays stable as new fields are
added in the future (e.g., delta time, diagnostics).
The framework constructs a fresh TickContext each cycle, calls
CommandClient::poll before handing it to the program, and writes
the memory back to shared memory after process_tick returns.
Fields§
§gm: &'a mut MMutable reference to the local shared memory copy.
client: &'a mut CommandClientIPC command client for communicating with external modules.
cycle: u64Current cycle number (starts at 1, increments each tick).
Auto Trait Implementations§
impl<'a, M> Freeze for TickContext<'a, M>
impl<'a, M> RefUnwindSafe for TickContext<'a, M>where
M: RefUnwindSafe,
impl<'a, M> Send for TickContext<'a, M>where
M: Send,
impl<'a, M> Sync for TickContext<'a, M>where
M: Sync,
impl<'a, M> Unpin for TickContext<'a, M>
impl<'a, M> UnsafeUnpin for TickContext<'a, M>
impl<'a, M> !UnwindSafe for TickContext<'a, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more