cu29::cutask

Trait CuSrcTask

source
pub trait CuSrcTask<'cl>: CuTaskLifecycle {
    type Output: CuMsgPack<'cl>;

    // Required method
    fn process(
        &mut self,
        clock: &RobotClock,
        new_msg: Self::Output,
    ) -> CuResult<()>;
}
Expand description

A Src Task is a task that only produces messages. For example drivers for sensors are Src Tasks. They are in push mode from the runtime. To set the frequency of the pulls and align them to any hw, see the runtime configuration.

Required Associated Types§

Required Methods§

source

fn process(&mut self, clock: &RobotClock, new_msg: Self::Output) -> CuResult<()>

Process is the most critical execution of the task. The goal will be to produce the output message as soon as possible. Use preprocess to prepare the task to make this method as short as possible.

Object Safety§

This trait is not object safe.

Implementors§