mcx::state_machine::ErrorHandle
5 minute read
mcx::state_machine::ErrorHandle
Inherits from mcx::state_machine::ErrorHandleBase
Public Functions
Name | |
---|---|
ErrorHandle(StateMachine< SUPER_STATE > * state_machine) | |
ErrorHandle() =default | |
ErrorHandle(ErrorHandle & orig) =delete | |
ErrorHandle & | operator=(ErrorHandle & orig) =delete |
virtual | ~ErrorHandle(void ) =default |
void | setStateMachine(StateMachine< SUPER_STATE > * state_machine) |
void | addParameters(const std::string & param_name, parameter_server::Parameter * parent) |
void | setName(const std::string & name) |
const std::string & | getName() const |
void | create(const std::string & name, const char * error_name_prefix, parameter_server::Parameter * parent) |
const std::map< Error, MotorcortexError > & | getActiveErrors() const |
MotorcortexError | getActiveError() const |
virtual bool | empty() override |
virtual bool | hasError(const Error & error) override |
virtual bool | hasErrorLevel(MotorcortexErrorLevel error_level) override |
bool | acknowledgeAll() |
bool | acknowledgeWarnings() |
virtual bool | acknowledge(bool warnings_only =false) override |
virtual bool | warning(const Error & error) override |
virtual bool | forcedDisengaged(const Error & error) override |
virtual bool | shutdown(const Error & error) override |
virtual bool | emergencyStop(const Error & error) override |
void | iterate(double dt_sec) |
const ErrorPublisher & | getErrorPublisher() const |
virtual signal_monitor::SignalMonitorBase * | getSignalMonitor() override |
void | enableErrors(const ErrorGroup & error_group) |
template <class STATE ,typename… STATES> void |
enableErrors(const ErrorGroup & error_group) |
void | disableErrors(const ErrorGroup & error_group) |
template <class STATE ,typename… STATES> void |
disableErrors(const ErrorGroup & error_group) |
void | resetErrors(const ErrorGroup & error_group) |
template <class STATE ,typename… STATES> void |
resetErrors(const ErrorGroup & error_group) |
void | addEmergencyStop(const Error & error_id, bool * input_ptr, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addEmergencyStop(const Error & error_id, const bool && input_val, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addShutdown(const Error & error_id, bool * input_ptr, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addShutdown(const Error & error_id, const bool && input_val, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addForceDisengage(const Error & error_id, bool * input_ptr, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addForceDisengage(const Error & error_id, const bool && input_val, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addWarning(const Error & error_id, bool * input_ptr, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addWarning(const Error & error_id, const bool && input_val, bool objective_val, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
void | addSignal(const Error & error_id, bool * input_val, bool objective_val, const std::function< bool(const Error &signal_id)> & callback, TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS, double start_time_s =0, double stop_time_s =std::numeric_limits< double >::max()) |
Detailed Description
template <typename SUPER_STATE >
class mcx::state_machine::ErrorHandle;
Public Functions Documentation
function ErrorHandle
inline ErrorHandle(
StateMachine< SUPER_STATE > * state_machine
)
function ErrorHandle
ErrorHandle() =default
function ErrorHandle
ErrorHandle(
ErrorHandle & orig
) =delete
function operator=
ErrorHandle & operator=(
ErrorHandle & orig
) =delete
function ~ErrorHandle
virtual ~ErrorHandle(
void
) =default
function setStateMachine
inline void setStateMachine(
StateMachine< SUPER_STATE > * state_machine
)
function addParameters
inline void addParameters(
const std::string & param_name,
parameter_server::Parameter * parent
)
function setName
inline void setName(
const std::string & name
)
function getName
inline const std::string & getName() const
function create
inline void create(
const std::string & name,
const char * error_name_prefix,
parameter_server::Parameter * parent
)
function getActiveErrors
inline const std::map< Error, MotorcortexError > & getActiveErrors() const
function getActiveError
inline MotorcortexError getActiveError() const
function empty
inline virtual bool empty() override
Reimplements: mcx::state_machine::ErrorHandleBase::empty
function hasError
inline virtual bool hasError(
const Error & error
) override
Reimplements: mcx::state_machine::ErrorHandleBase::hasError
function hasErrorLevel
inline virtual bool hasErrorLevel(
MotorcortexErrorLevel error_level
) override
Reimplements: mcx::state_machine::ErrorHandleBase::hasErrorLevel
function acknowledgeAll
inline bool acknowledgeAll()
function acknowledgeWarnings
inline bool acknowledgeWarnings()
function acknowledge
inline virtual bool acknowledge(
bool warnings_only =false
) override
Reimplements: mcx::state_machine::ErrorHandleBase::acknowledge
function warning
inline virtual bool warning(
const Error & error
) override
Reimplements: mcx::state_machine::ErrorHandleBase::warning
function forcedDisengaged
inline virtual bool forcedDisengaged(
const Error & error
) override
Reimplements: mcx::state_machine::ErrorHandleBase::forcedDisengaged
function shutdown
inline virtual bool shutdown(
const Error & error
) override
Reimplements: mcx::state_machine::ErrorHandleBase::shutdown
function emergencyStop
inline virtual bool emergencyStop(
const Error & error
) override
Reimplements: mcx::state_machine::ErrorHandleBase::emergencyStop
function iterate
inline void iterate(
double dt_sec
)
function getErrorPublisher
inline const ErrorPublisher & getErrorPublisher() const
function getSignalMonitor
inline virtual signal_monitor::SignalMonitorBase * getSignalMonitor() override
Reimplements: mcx::state_machine::ErrorHandleBase::getSignalMonitor
function enableErrors
inline void enableErrors(
const ErrorGroup & error_group
)
function enableErrors
template <class STATE ,
typename... STATES>
inline void enableErrors(
const ErrorGroup & error_group
)
function disableErrors
inline void disableErrors(
const ErrorGroup & error_group
)
function disableErrors
template <class STATE ,
typename... STATES>
inline void disableErrors(
const ErrorGroup & error_group
)
function resetErrors
inline void resetErrors(
const ErrorGroup & error_group
)
function resetErrors
template <class STATE ,
typename... STATES>
inline void resetErrors(
const ErrorGroup & error_group
)
function addEmergencyStop
inline void addEmergencyStop(
const Error & error_id,
bool * input_ptr,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addEmergencyStop
inline void addEmergencyStop(
const Error & error_id,
const bool && input_val,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addShutdown
inline void addShutdown(
const Error & error_id,
bool * input_ptr,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addShutdown
inline void addShutdown(
const Error & error_id,
const bool && input_val,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addForceDisengage
inline void addForceDisengage(
const Error & error_id,
bool * input_ptr,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addForceDisengage
inline void addForceDisengage(
const Error & error_id,
const bool && input_val,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addWarning
inline void addWarning(
const Error & error_id,
bool * input_ptr,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addWarning
inline void addWarning(
const Error & error_id,
const bool && input_val,
bool objective_val,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
function addSignal
inline void addSignal(
const Error & error_id,
bool * input_val,
bool objective_val,
const std::function< bool(const Error &signal_id)> & callback,
TriggerType trigger_type =TriggerType::TRIGGER_ALWAYS,
double start_time_s =0,
double stop_time_s =std::numeric_limits< double >::max()
)
Updated on 2022-04-05 at 16:21:27 +0200