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 
35 {
36  public:
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 
64  status_type status_;
65 };
66 
67 } // namespace twist_mux
68 
69 #endif // TWIST_MUX_DIAGNOSTICS_H
void updateStatus(const status_type::ConstPtr &status)
void diagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat)
static constexpr double MAIN_LOOP_TIME_MIN
diagnostic_updater::Updater diagnostic_
static constexpr double READING_AGE_MIN
TwistMuxDiagnosticsStatus status_type


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