rosout_publisher.h
Go to the documentation of this file.
1 #ifndef ROSOUT_PUBLISHER_ROS_H
2 #define ROSOUT_PUBLISHER_ROS_H
3 
4 #include <QObject>
5 #include <QtPlugin>
6 #include <QMainWindow>
7 #include <map>
8 #include <ros/ros.h>
10 #include <rosgraph_msgs/Log.h>
11 #include "logwidget.hpp"
12 
13 class RosoutWindow: public QMainWindow
14 {
15  Q_OBJECT
16 public:
17  RosoutWindow():QMainWindow() {}
19 
20  void closeEvent ( QCloseEvent* ) override{
21  emit closed();
22  }
23 signals:
24  void closed();
25 };
26 
27 
28 class RosoutPublisher: public QObject, StatePublisher
29 {
30  Q_OBJECT
31  Q_PLUGIN_METADATA(IID "com.icarustechnology.PlotJuggler.StatePublisher" "../statepublisher.json")
32  Q_INTERFACES(StatePublisher)
33 
34 public:
36 
37  virtual void updateState(double current_time) override;
38  virtual const char* name() const override { return "RosoutPublisherROS"; }
39  virtual ~RosoutPublisher();
40 
41  virtual bool enabled() const override { return _enabled; }
42 
43  virtual void play(double interval) override
44  {
45  //TODO
46  }
47 
48 public slots:
49  virtual void setEnabled(bool enabled) override;
50 
51 private slots:
52 
53  void onWindowClosed();
54 
55 private:
56 
57  bool _enabled;
58  int64_t _minimum_time_usec, _maximum_time_usec;
59 
62 
63  std::vector<const PlotDataAny *> findRosoutTimeseries();
64  void syncWithTableModel(const std::vector<const PlotDataAny *> &logs_timeseries);
65 
67 signals:
68  void timeRangeChanged(TimePoint time_min, TimePoint time_max);
69 };
70 
71 
72 
73 #endif // ROSOUT_PUBLISHER_ROS_H
virtual void play(double interval) override
std::chrono::high_resolution_clock::time_point TimePoint
RosoutWindow * _log_window
int64_t _minimum_time_usec
rqt_console_plus::LogWidget * _log_widget
LogsTableModel * _tablemodel
virtual bool enabled() const override
void closeEvent(QCloseEvent *) override
virtual const char * name() const override


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18