Skip to main content

ClosedLoopKernel

Trait ClosedLoopKernel 

Source
pub trait ClosedLoopKernel {
    type Error;

    // Required methods
    fn switches(&self) -> LayerSwitches;
    fn step_internal(&mut self) -> Result<ControlDirective, Self::Error>;
    fn step_external(
        &mut self,
        telemetry: StepTelemetry,
    ) -> Result<ControlDirective, Self::Error>;
}
Available on crate feature std only.
Expand description

Interface for a kernel that accepts internal steps or external telemetry.

Required Associated Types§

Source

type Error

Error returned when a step cannot be processed.

Required Methods§

Source

fn switches(&self) -> LayerSwitches

Returns the layer switches currently used by the kernel.

Source

fn step_internal(&mut self) -> Result<ControlDirective, Self::Error>

Runs one step using the kernel’s internal world adapters.

Source

fn step_external( &mut self, telemetry: StepTelemetry, ) -> Result<ControlDirective, Self::Error>

Processes one externally measured step and returns the resulting control directive.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§