|
ASCO Aerial Autonomy
|
Status of the controller. More...
#include <controller_status.h>
Public Types | |
| enum | Status { Active, Completed, Critical, NotEngaged } |
| Types of status available for a controller. More... | |
Public Member Functions | |
| ControllerStatus (ControllerStatus::Status status=ControllerStatus::NotEngaged, std::string status_description="") | |
| Constructor with default status as not engaged and short message describing the status. More... | |
| std::string | getHtmlStatusString () |
| Get a Html text describing the controller status. More... | |
| void | setStatus (ControllerStatus::Status status, std::string status_description="") |
| Set the internal status of controller status. More... | |
| operator bool () const | |
| Allows for explicit conversion of the class to a boolean variable This is pretty useful to check controller status implies controller convergence or not. For example: if(controller_status) { do something} can be used to perform actions if controller has converged. More... | |
Friends | |
| bool | operator== (const ControllerStatus &controller_status, const Status &status_enum) |
| An overload for comparing against an enum. More... | |
| bool | operator== (const ControllerStatus &lhs_controller_status, const ControllerStatus &rhs_controller_status) |
| An overload function to compare two controller status classes. More... | |
| bool | operator!= (const ControllerStatus &lhs_controller_status, const ControllerStatus &rhs_controller_status) |
| An overload function to compare two controller status classes. More... | |
| ControllerStatus & | operator<< (ControllerStatus &cs, const double &data) |
| Add data to controller status. More... | |
| ControllerStatus & | operator<< (ControllerStatus &cs, const std::string &data) |
| Add header for debug info. More... | |
Status of the controller.
Types of status available for a controller.
| Enumerator | |
|---|---|
| Active |
Controller active. |
| Completed |
Controller completed. |
| Critical |
Controller is critical and unable to continue. |
| NotEngaged |
This status is used when no controller is engaged. |
| ControllerStatus::ControllerStatus | ( | ControllerStatus::Status | status = ControllerStatus::NotEngaged, |
| std::string | status_description = "" |
||
| ) |
Constructor with default status as not engaged and short message describing the status.
| status | Type of status |
| status_description | short message describing the status |
| std::string ControllerStatus::getHtmlStatusString | ( | ) |
Get a Html text describing the controller status.
|
inlineexplicit |
Allows for explicit conversion of the class to a boolean variable This is pretty useful to check controller status implies controller convergence or not. For example: if(controller_status) { do something} can be used to perform actions if controller has converged.
|
inline |
Set the internal status of controller status.
| status | Enum describing the current controller status |
| status_description | Description about the status |
|
friend |
An overload function to compare two controller status classes.
| lhs_controller_status | first controller status |
| rhs_controller_status | second controller status |
|
friend |
Add data to controller status.
| cs | ControllerStatus instance |
| data | data to be input to controller status |
|
friend |
Add header for debug info.
| cs | Controller status instance |
| data | header name |
|
friend |
An overload for comparing against an enum.
| controller_status | The LHS which is a controller status |
| status_enum | The RHS which is an enum |
|
friend |
An overload function to compare two controller status classes.
| lhs_controller_status | first controller status |
| rhs_controller_status | second controller status |
1.8.6