ros_interface.h
Go to the documentation of this file.
1 // Provides a ROS interface for controlling rosmon
2 // Author: Max Schwarz <max.schwarz@uni-bonn.de>
3 
4 #ifndef ROS_INTERFACE_H
5 #define ROS_INTERFACE_H
6 
7 #include "monitor/monitor.h"
9 
10 #include <ros/node_handle.h>
11 
12 #include <rosmon_msgs/StartStop.h>
13 
14 namespace rosmon
15 {
16 
18 {
19 public:
20  ROSInterface(monitor::Monitor* monitor, bool enableDiagnostics=false,
21  const std::string& diagnosticsPrefix={}
22  );
23 
24  void shutdown();
25 private:
26  void update();
27  bool handleStartStop(rosmon_msgs::StartStopRequest& req, rosmon_msgs::StartStopResponse& resp);
28 
30 
32 
34 
36 
38 
40  std::unique_ptr<DiagnosticsPublisher> m_diagnosticsPublisher;
41 };
42 
43 }
44 
45 #endif
46 
ros::NodeHandle m_nh
Definition: ros_interface.h:31
std::unique_ptr< DiagnosticsPublisher > m_diagnosticsPublisher
Definition: ros_interface.h:40
ros::ServiceServer m_srv_startStop
Definition: ros_interface.h:37
ROSInterface(monitor::Monitor *monitor, bool enableDiagnostics=false, const std::string &diagnosticsPrefix={})
monitor::Monitor * m_monitor
Definition: ros_interface.h:29
bool handleStartStop(rosmon_msgs::StartStopRequest &req, rosmon_msgs::StartStopResponse &resp)
ros::WallTimer m_updateTimer
Definition: ros_interface.h:33
ros::Publisher m_pub_state
Definition: ros_interface.h:35


rosmon_core
Author(s): Max Schwarz
autogenerated on Wed Jul 10 2019 03:10:12