pub struct CuRuntime<CT, P, M, const NBCL: usize>where
P: CopperListTuple,
M: CuMonitor,{
pub clock: RobotClock,
pub tasks: CT,
pub monitor: M,
pub copperlists_manager: CopperListsManager<P, NBCL>,
pub keyframes_manager: KeyFramesManager,
}
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§
§clock: RobotClock
The base clock the runtime will be using to record time.
tasks: CT
The tuple of all the tasks in order of execution.
monitor: M
The runtime monitoring.
copperlists_manager: CopperListsManager<P, NBCL>
The logger for the copper lists (messages between tasks)
keyframes_manager: KeyFramesManager
The logger for the state of the tasks (frozen tasks)
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, mission: Option<&str>, tasks_instanciator: impl Fn(Vec<Option<&ComponentConfig>>) -> Result<CT, CuError>, monitor_instanciator: impl Fn(&CuConfig) -> M, copperlists_logger: impl WriteStream<CopperList<P>> + 'static, keyframes_logger: impl WriteStream<KeyFrame> + 'static, ) -> Result<CuRuntime<CT, P, M, NBCL>, CuError>
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