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§
Sourcefn bounds(&self) -> BalancerControllerBounds
fn bounds(&self) -> BalancerControllerBounds
Gets the current bounds of the controller.
Sourcefn set_target_and_limit(&mut self, bounds: BalancerControllerBounds)
fn set_target_and_limit(&mut self, bounds: BalancerControllerBounds)
Updates the controller’s target (setpoint) and output limit.
Sourcefn next_control_output(&mut self, current_buffer_level: u64) -> u64
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.