Skip to main content

SurbBalancerController

Trait SurbBalancerController 

Source
pub trait SurbBalancerController {
    // Required methods
    fn bounds(&self) -> BalancerControllerBounds;
    fn set_target_and_limit(&mut self, bounds: BalancerControllerBounds);
    fn next_control_output(&mut self, current_buffer_level: u64) -> u64;
}
Expand description

Trait abstracting a controller used in the SurbBalancer.

Required Methods§

Source

fn bounds(&self) -> BalancerControllerBounds

Gets the current bounds of the controller.

Source

fn set_target_and_limit(&mut self, bounds: BalancerControllerBounds)

Updates the controller’s target (setpoint) and output limit.

Source

fn next_control_output(&mut self, current_buffer_level: u64) -> u64

Queries the controller for the next control output based on the current_buffer_level of SURBs.

Implementors§