template<typename Input, typename Output>
okapi::ControllerRunner class

Constructors, destructors, conversion operators

ControllerRunner(const TimeUtil& itimeUtil, const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger()) explicit
A utility class that runs a closed-loop controller.

Public functions

auto runUntilSettled(const Input itarget, AsyncController<Input, Output>& icontroller) -> Output virtual
Runs the controller until it has settled.
auto runUntilSettled(const Input itarget, IterativeController<Input, Output>& icontroller, ControllerOutput<Output>& ioutput) -> Output virtual
Runs the controller until it has settled.
auto runUntilAtTarget(const Input itarget, AsyncController<Input, Output>& icontroller) -> Output virtual
Runs the controller until it has reached its target, but not necessarily settled.
auto runUntilAtTarget(const Input itarget, IterativeController<Input, Output>& icontroller, ControllerOutput<Output>& ioutput) -> Output virtual
Runs the controller until it has reached its target, but not necessarily settled.

Protected variables

std::shared_ptr<Logger> logger
std::unique_ptr<AbstractRate> rate

Function documentation

template<typename Input, typename Output>
okapi::ControllerRunner<Input, Output>::ControllerRunner(const TimeUtil& itimeUtil, const std::shared_ptr<Logger>& ilogger = Logger::getDefaultLogger()) explicit

A utility class that runs a closed-loop controller.

Parameters
itimeUtil The TimeUtil.
ilogger The logger this instance will log to.

template<typename Input, typename Output>
Output okapi::ControllerRunner<Input, Output>::runUntilSettled(const Input itarget, AsyncController<Input, Output>& icontroller) virtual

Runs the controller until it has settled.

Parameters
itarget the new target
icontroller the controller to run
Returns the error when settled

template<typename Input, typename Output>
Output okapi::ControllerRunner<Input, Output>::runUntilSettled(const Input itarget, IterativeController<Input, Output>& icontroller, ControllerOutput<Output>& ioutput) virtual

Runs the controller until it has settled.

Parameters
itarget the new target
icontroller the controller to run
ioutput the output to write to
Returns the error when settled

template<typename Input, typename Output>
Output okapi::ControllerRunner<Input, Output>::runUntilAtTarget(const Input itarget, AsyncController<Input, Output>& icontroller) virtual

Runs the controller until it has reached its target, but not necessarily settled.

Parameters
itarget the new target
icontroller the controller to run
Returns the error when settled

template<typename Input, typename Output>
Output okapi::ControllerRunner<Input, Output>::runUntilAtTarget(const Input itarget, IterativeController<Input, Output>& icontroller, ControllerOutput<Output>& ioutput) virtual

Runs the controller until it has reached its target, but not necessarily settled.

Parameters
itarget the new target
icontroller the controller to run
ioutput the output to write to
Returns the error when settled