twist_mux_diagnostics.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (CC BY-NC-SA 4.0 License)
3  *
4  * Copyright (c) 2014, PAL Robotics, S.L.
5  * All rights reserved.
6  *
7  * This work is licensed under the Creative Commons
8  * Attribution-NonCommercial-ShareAlike 4.0 International License.
9  *
10  * To view a copy of this license, visit
11  * http://creativecommons.org/licenses/by-nc-sa/4.0/
12  * or send a letter to
13  * Creative Commons, 444 Castro Street, Suite 900,
14  * Mountain View, California, 94041, USA.
15  *********************************************************************/
16 
17 /*
18  * @author Enrique Fernandez
19  */
20 
21 #ifndef TWIST_MUX_DIAGNOSTICS_H
22 #define TWIST_MUX_DIAGNOSTICS_H
23 
25 
27 #include <ros/ros.h>
28 
29 #include <boost/shared_ptr.hpp>
30 
31 namespace twist_mux
32 {
33 
34 class TwistMuxDiagnostics
35 {
36  public:
37  typedef TwistMuxDiagnosticsStatus status_type;
38 
39  static constexpr double MAIN_LOOP_TIME_MIN = 0.2; // [s]
40  static constexpr double READING_AGE_MIN = 3.0; // [s]
41 
43  virtual ~TwistMuxDiagnostics();
44 
46 
47  void update();
48 
49  void updateStatus(const status_type::ConstPtr& status);
50 
51  private:
52 
56  enum
57  {
58  OK = diagnostic_msgs::DiagnosticStatus::OK,
59  WARN = diagnostic_msgs::DiagnosticStatus::WARN,
60  ERROR = diagnostic_msgs::DiagnosticStatus::ERROR
61  };
62 
65 };
66 
67 } // namespace twist_mux
68 
69 #endif // TWIST_MUX_DIAGNOSTICS_H
twist_mux::TwistMuxDiagnostics::OK
@ OK
Definition: twist_mux_diagnostics.h:86
twist_mux::TwistMuxDiagnostics::diagnostics
void diagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat)
Definition: twist_mux_diagnostics.cpp:71
twist_mux
Definition: topic_handle.h:38
boost::shared_ptr
twist_mux::TwistMuxDiagnostics::status_
status_type status_
Definition: twist_mux_diagnostics.h:92
twist_mux::TwistMuxDiagnostics::updateStatus
void updateStatus(const status_type::ConstPtr &status)
Definition: twist_mux_diagnostics.cpp:57
ros.h
twist_mux_diagnostics_status.h
twist_mux::TwistMuxDiagnostics::~TwistMuxDiagnostics
virtual ~TwistMuxDiagnostics()
Definition: twist_mux_diagnostics.cpp:49
diagnostic_updater::Updater
twist_mux::TwistMuxDiagnostics::TwistMuxDiagnostics
TwistMuxDiagnostics()
Definition: twist_mux_diagnostics.cpp:43
diagnostic_updater.h
twist_mux::TwistMuxDiagnostics::status_type
TwistMuxDiagnosticsStatus status_type
Definition: twist_mux_diagnostics.h:65
twist_mux::TwistMuxDiagnostics::ERROR
@ ERROR
Definition: twist_mux_diagnostics.h:88
twist_mux::TwistMuxDiagnostics::WARN
@ WARN
Definition: twist_mux_diagnostics.h:87
twist_mux::TwistMuxDiagnostics::MAIN_LOOP_TIME_MIN
static constexpr double MAIN_LOOP_TIME_MIN
Definition: twist_mux_diagnostics.h:67
diagnostic_updater::DiagnosticStatusWrapper
twist_mux::TwistMuxDiagnostics::diagnostic_
diagnostic_updater::Updater diagnostic_
Definition: twist_mux_diagnostics.h:91
twist_mux::TwistMuxDiagnostics::READING_AGE_MIN
static constexpr double READING_AGE_MIN
Definition: twist_mux_diagnostics.h:68
twist_mux::TwistMuxDiagnostics::update
void update()
Definition: twist_mux_diagnostics.cpp:52


twist_mux
Author(s): Enrique Fernandez , Siegfried-A. Gevatter Pujals
autogenerated on Wed Oct 26 2022 02:18:09