pub struct CuRuntime<CT, P, M, const NBCL: usize>where
P: CopperListTuple,
M: CuMonitor,{
pub tasks: CT,
pub monitor: M,
pub copper_lists_manager: CuListsManager<P, NBCL>,
pub clock: RobotClock,
/* private fields */
}
Expand description
This is the main structure that will be injected as a member of the Application struct. CT is the tuple of all the tasks in order of execution. CL is the type of the copper list, representing the input/output messages for all the tasks.
Fields§
§tasks: CT
The tuple of all the tasks in order of execution.
monitor: M
§copper_lists_manager: CuListsManager<P, NBCL>
Copper lists hold in order all the input/output messages for all the tasks.
clock: RobotClock
The base clock the runtime will be using to record time.
Implementations§
Source§impl<CT, P, M, const NBCL: usize> CuRuntime<CT, P, M, NBCL>where
P: CopperListTuple + 'static,
M: CuMonitor,
impl<CT, P, M, const NBCL: usize> CuRuntime<CT, P, M, NBCL>where
P: CopperListTuple + 'static,
M: CuMonitor,
pub fn new( clock: RobotClock, config: &CuConfig, tasks_instanciator: impl Fn(Vec<Option<&ComponentConfig>>) -> Result<CT, CuError>, monitor_instanciator: impl Fn(&CuConfig) -> M, logger: impl WriteStream<CopperList<P>> + 'static, ) -> Result<CuRuntime<CT, P, M, NBCL>, CuError>
pub fn available_copper_lists(&self) -> usize
pub fn end_of_processing(&mut self, culistid: u32)
Trait Implementations§
Source§impl<CT, P, M, const NBCL: usize> ClockProvider for CuRuntime<CT, P, M, NBCL>where
P: CopperListTuple,
M: CuMonitor,
To be able to share the clock we make the runtime a clock provider.
impl<CT, P, M, const NBCL: usize> ClockProvider for CuRuntime<CT, P, M, NBCL>where
P: CopperListTuple,
M: CuMonitor,
To be able to share the clock we make the runtime a clock provider.
fn get_clock(&self) -> RobotClock
Auto Trait Implementations§
impl<CT, P, M, const NBCL: usize> Freeze for CuRuntime<CT, P, M, NBCL>
impl<CT, P, M, const NBCL: usize> !RefUnwindSafe for CuRuntime<CT, P, M, NBCL>
impl<CT, P, M, const NBCL: usize> Send for CuRuntime<CT, P, M, NBCL>
impl<CT, P, M, const NBCL: usize> Sync for CuRuntime<CT, P, M, NBCL>
impl<CT, P, M, const NBCL: usize> Unpin for CuRuntime<CT, P, M, NBCL>
impl<CT, P, M, const NBCL: usize> !UnwindSafe for CuRuntime<CT, P, M, NBCL>
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