Skip to content

Class custom_diagnostic_tasks::HysteresisStateMachine

ClassList > custom_diagnostic_tasks > HysteresisStateMachine

  • #include <hysteresis_state_machine.hpp>

Public Functions

Type Name
HysteresisStateMachine (const size_t num_frame_transition=1, const bool immediate_error_report=false, const bool immediate_relax_state=true)
DiagnosticStatus_t get_candidate_level ()
size_t get_candidate_num_observation ()
DiagnosticStatus_t get_current_state_level ()
bool get_immediate_error_report_param ()
bool get_immediate_relax_state_param ()
size_t get_num_frame_transition ()
void set_current_state_level (const DiagnosticStatus_t & state)
void update_state (const DiagnosticStatus_t & observation)
update internal state and returns the filtered state

Protected Attributes

Type Name
StateHolder candidate_state_
StateHolder current_state_
bool immediate_error_report_
bool immediate_relax_state_
size_t num_frame_transition_

Public Functions Documentation

function HysteresisStateMachine

inline explicit custom_diagnostic_tasks::HysteresisStateMachine::HysteresisStateMachine (
    const size_t num_frame_transition=1,
    const bool immediate_error_report=false,
    const bool immediate_relax_state=true
) 

to WARN until successive num_frame_transition WARNs are observed.

Parameters:

  • immediate_error_report If true, errors will be reported immediately once observed; otherwise, the hysteresis damping method using num_frame_transition will be adopted
  • immediate_relax_state if true, reported state will immediately change if better state that the current one is observed

function get_candidate_level

inline DiagnosticStatus_t custom_diagnostic_tasks::HysteresisStateMachine::get_candidate_level () 

function get_candidate_num_observation

inline size_t custom_diagnostic_tasks::HysteresisStateMachine::get_candidate_num_observation () 

function get_current_state_level

inline DiagnosticStatus_t custom_diagnostic_tasks::HysteresisStateMachine::get_current_state_level () 

function get_immediate_error_report_param

inline bool custom_diagnostic_tasks::HysteresisStateMachine::get_immediate_error_report_param () 

function get_immediate_relax_state_param

inline bool custom_diagnostic_tasks::HysteresisStateMachine::get_immediate_relax_state_param () 

function get_num_frame_transition

inline size_t custom_diagnostic_tasks::HysteresisStateMachine::get_num_frame_transition () 

function set_current_state_level

inline void custom_diagnostic_tasks::HysteresisStateMachine::set_current_state_level (
    const DiagnosticStatus_t & state
) 

function update_state

update internal state and returns the filtered state

inline void custom_diagnostic_tasks::HysteresisStateMachine::update_state (
    const DiagnosticStatus_t & observation
) 


Protected Attributes Documentation

variable candidate_state_

StateHolder custom_diagnostic_tasks::HysteresisStateMachine::candidate_state_;

variable current_state_

StateHolder custom_diagnostic_tasks::HysteresisStateMachine::current_state_;

variable immediate_error_report_

bool custom_diagnostic_tasks::HysteresisStateMachine::immediate_error_report_;

variable immediate_relax_state_

bool custom_diagnostic_tasks::HysteresisStateMachine::immediate_relax_state_;

variable num_frame_transition_

size_t custom_diagnostic_tasks::HysteresisStateMachine::num_frame_transition_;


The documentation for this class was generated from the following file nebula_ros/include/nebula_ros/common/diagnostics/hysteresis_state_machine.hpp