template<typename Input, typename Output>
ClosedLoopController class
An abstract closed-loop controller.
Template parameters | |
---|---|
Input | The target/input type. |
Output | The error/output type. |
Contents
Base classes
-
template<typename T>class ControllerOutput
Derived classes
-
template<typename Input, typename Output>class AsyncController
- Closed-loop controller that steps on its own in another thread and automatically writes to the output.
-
template<typename Input, typename Output>class IterativeController
- Closed-loop controller that steps iteratively using the step method below.
Constructors, destructors, conversion operators
- ~ClosedLoopController() defaulted virtual
Public functions
- void setTarget(Input itarget) pure virtual
- Sets the target for the controller.
- auto getTarget() -> Input pure virtual
- Gets the last set target, or the default target if none was set.
- auto getProcessValue() const -> Input pure virtual
- auto getError() const -> Output pure virtual
- Returns the last error of the controller.
- auto isSettled() -> bool pure virtual
- Returns whether the controller has settled at the target.
- void reset() pure virtual
- Resets the controller's internal state so it is similar to when it was first initialized, while keeping any user-configured information.
- void flipDisable() pure virtual
- Changes whether the controller is off or on.
- void flipDisable(bool iisDisabled) pure virtual
- Sets whether the controller is off or on.
- auto isDisabled() const -> bool pure virtual
- Returns whether the controller is currently disabled.
Function documentation
template<typename Input, typename Output>
void okapi:: ClosedLoopController<Input, Output>:: setTarget(Input itarget) pure virtual
Sets the target for the controller.
Parameters | |
---|---|
itarget | the new target |
template<typename Input, typename Output>
Input okapi:: ClosedLoopController<Input, Output>:: getTarget() pure virtual
Gets the last set target, or the default target if none was set.
Returns | the last target |
---|
template<typename Input, typename Output>
Input okapi:: ClosedLoopController<Input, Output>:: getProcessValue() const pure virtual
Returns | The most recent value of the process variable. |
---|
template<typename Input, typename Output>
Output okapi:: ClosedLoopController<Input, Output>:: getError() const pure virtual
Returns the last error of the controller.
Returns | the last error |
---|
Does not update when disabled.
template<typename Input, typename Output>
bool okapi:: ClosedLoopController<Input, Output>:: isSettled() pure virtual
Returns whether the controller has settled at the target.
Returns | whether the controller is settled |
---|
Determining what settling means is implementation-dependent.
If the controller is disabled, this method must return true
.
template<typename Input, typename Output>
void okapi:: ClosedLoopController<Input, Output>:: flipDisable() pure virtual
Changes whether the controller is off or on.
Turning the controller on after it was off will cause the controller to move to its last set target, unless it was reset in that time.
template<typename Input, typename Output>
void okapi:: ClosedLoopController<Input, Output>:: flipDisable(bool iisDisabled) pure virtual
Sets whether the controller is off or on.
Parameters | |
---|---|
iisDisabled | whether the controller is disabled |
Turning the controller on after it was off will cause the controller to move to its last set target, unless it was reset in that time.
template<typename Input, typename Output>
bool okapi:: ClosedLoopController<Input, Output>:: isDisabled() const pure virtual
Returns whether the controller is currently disabled.
Returns | whether the controller is currently disabled |
---|