69 Enum get_raw()
const {
return enum_; }
70 void set_raw(Enum e) {
72 assert(this->is_valid());
75 bool is_valid()
const {
87 bool has_lat()
const {
return (enum_ & Lat) != 0; }
88 bool has_long()
const {
return (enum_ & Long) != 0; }
89 bool has_both()
const {
return enum_ == LatLong; }
90 bool has_control()
const {
return (enum_ & LatLong) != 0; }
91 bool is_standby()
const {
return enum_ == Standby; }
92 bool is_none()
const {
return enum_ == None; }
94 void set_none() { enum_ = None; }
95 void set_standby() { enum_ = Standby; }
96 void set_latlong() { enum_ = LatLong; }
97 void set_lat() { enum_ =
static_cast<Enum
>((enum_ & Long) | Lat); }
98 void set_long() { enum_ =
static_cast<Enum
>((enum_ & Lat) | Long); }
100 bool operator==(
const ActuationLevel& other)
const {
return enum_ == other.enum_; }
101 bool operator!=(
const ActuationLevel& other)
const {
return !operator==(other); }
103 const char* to_human_cstr()
const {
108 return "longitudinal";
112 return "longitudinal and lateral";
120 const char* to_symbol_cstr()
const {
137 const char* to_loud_cstr()
const {
154 const char* to_unicode_cstr()
const {
171 const char* to_cstr()
const {
return this->to_human_cstr(); }
180 inline std::string to_string(
const ActuationLevel::Enum level) {
Definition: actuation_level.hpp:48
nlohmann::json Json
Definition: fable_fwd.hpp:35