topic_info.hpp
Go to the documentation of this file.
1 #ifndef TOPICS_RVIZ_PLUGIN_TOPIC_INFO_HPP
2 #define TOPICS_RVIZ_PLUGIN_TOPIC_INFO_HPP
3 
4 #include <QLCDNumber>
5 #include <QLabel>
6 #include <QTime>
7 #include <ros/ros.h>
8 #include <std_msgs/Bool.h>
9 #include <std_msgs/Duration.h>
10 #include <std_msgs/Int8.h>
11 #include <std_msgs/Int16.h>
12 #include <std_msgs/Int32.h>
13 #include <std_msgs/Int64.h>
14 #include <std_msgs/Time.h>
15 #include <std_msgs/UInt8.h>
16 #include <std_msgs/UInt16.h>
17 #include <std_msgs/UInt32.h>
18 #include <std_msgs/UInt64.h>
19 #include <std_msgs/String.h>
20 #include <std_msgs/Float32.h>
21 #include <std_msgs/Float64.h>
22 
23 namespace topics_rviz_plugin
24 {
25 
26 class TopicInfo : public QObject
27 {
28 Q_OBJECT
29 
30 public:
31  TopicInfo(const std::string topic_name,
32  const std::string topic_type,
33  const ros::Duration refresh_duration = ros::Duration(0));
34 
35  virtual ~TopicInfo();
36 
39 
40  const std::string topic_name_;
41  const std::string topic_type_;
42  std::shared_ptr<QLabel> label_;
43  std::shared_ptr<QWidget> display_;
44 
45 Q_SIGNALS:
46  void adjustLCDNumberOfDigits(const long unsigned number);
47 
48 protected:
51 
52 private Q_SLOTS:
53  void adjustLCDNumberOfDigitsHandler(const long unsigned number);
54 
55 private:
58 
59  bool refresh();
60 
61  void boolCallback(const std_msgs::BoolConstPtr &msg);
62  void durationCallback(const std_msgs::DurationConstPtr &msg);
63  void float32Callback(const std_msgs::Float32ConstPtr &msg);
64  void float64Callback(const std_msgs::Float64ConstPtr &msg);
65  void int8Callback(const std_msgs::Int8ConstPtr &msg);
66  void int16Callback(const std_msgs::Int16ConstPtr &msg);
67  void int32Callback(const std_msgs::Int32ConstPtr &msg);
68  void int64Callback(const std_msgs::Int64ConstPtr &msg);
69  void stringCallback(const std_msgs::StringConstPtr &msg);
70  void timeCallback(const std_msgs::TimeConstPtr &msg);
71  void uint8Callback(const std_msgs::UInt8ConstPtr &msg);
72  void uint16Callback(const std_msgs::UInt16ConstPtr &msg);
73  void uint32Callback(const std_msgs::UInt32ConstPtr &msg);
74  void uint64Callback(const std_msgs::UInt64ConstPtr &msg);
75 };
76 
77 }
78 
79 #endif
d
void setMaximumRefreshRate(const ros::Duration d)
Definition: topic_info.cpp:90
void uint64Callback(const std_msgs::UInt64ConstPtr &msg)
Definition: topic_info.cpp:282
void int8Callback(const std_msgs::Int8ConstPtr &msg)
Definition: topic_info.cpp:186
TopicInfo(const std::string topic_name, const std::string topic_type, const ros::Duration refresh_duration=ros::Duration(0))
Definition: topic_info.cpp:6
void adjustLCDNumberOfDigitsHandler(const long unsigned number)
Definition: topic_info.cpp:120
const std::string topic_type_
Definition: topic_info.hpp:41
void float32Callback(const std_msgs::Float32ConstPtr &msg)
Definition: topic_info.cpp:164
void durationCallback(const std_msgs::DurationConstPtr &msg)
Definition: topic_info.cpp:152
void stringCallback(const std_msgs::StringConstPtr &msg)
Definition: topic_info.cpp:231
void float64Callback(const std_msgs::Float64ConstPtr &msg)
Definition: topic_info.cpp:175
const std::string topic_name_
Definition: topic_info.hpp:40
void timeCallback(const std_msgs::TimeConstPtr &msg)
Definition: topic_info.cpp:240
std::shared_ptr< QLabel > label_
Definition: topic_info.hpp:42
ros::Duration maximumRefreshRate()
Definition: topic_info.cpp:97
void int16Callback(const std_msgs::Int16ConstPtr &msg)
Definition: topic_info.cpp:197
static Time now()
std::shared_ptr< QWidget > display_
Definition: topic_info.hpp:43
void uint8Callback(const std_msgs::UInt8ConstPtr &msg)
Definition: topic_info.cpp:251
void uint32Callback(const std_msgs::UInt32ConstPtr &msg)
Definition: topic_info.cpp:271
void int64Callback(const std_msgs::Int64ConstPtr &msg)
Definition: topic_info.cpp:219
void int32Callback(const std_msgs::Int32ConstPtr &msg)
Definition: topic_info.cpp:208
void uint16Callback(const std_msgs::UInt16ConstPtr &msg)
Definition: topic_info.cpp:261
void adjustLCDNumberOfDigits(const long unsigned number)
void boolCallback(const std_msgs::BoolConstPtr &msg)
Definition: topic_info.cpp:139


topics_rviz_plugin
Author(s): Victor Lamoine - Institut Maupertuis
autogenerated on Mon Feb 28 2022 23:53:11