datatypes.h
Go to the documentation of this file.
1 
28 #ifndef LOG_VIEW_DATATYPES_H_
29 #define LOG_VIEW_DATATYPES_H_
30 
31 #include <log_view/utils.h>
32 #include <ros/ros.h>
33 #include <rosgraph_msgs/Log.h>
34 
35 namespace log_view {
36 
37 struct LogLine {
38  size_t index;
39  size_t line;
40 };
41 
42 struct LogEntry
43 {
44  LogEntry() = default;
45  LogEntry(const LogEntry& entry) = default;
46  explicit LogEntry(const rosgraph_msgs::Log& log) :
47  stamp(log.header.stamp),
48  seq(log.header.seq),
49  level(log.level),
50  node(log.name),
51  file(log.file),
52  function(log.function),
53  line(log.line),
54  text(split(log.msg, '\n'))
55  {}
56 
58  uint32_t seq;
59  uint8_t level;
60  std::string node;
61  std::string file;
62  std::string function;
63  uint32_t line;
64  std::vector<std::string> text;
65 };
66 
67 struct NodeData {
68  bool exclude = true;
69  size_t count = 0;
70 };
71 
72 } // namespace log_view
73 
74 #endif // LOG_VIEW_DATATYPES_H_
std::vector< std::string > split(const std::string &text, char sep)
Definition: utils.cpp:44
std_msgs::Header * header(M &m)
std::string file
Definition: datatypes.h:61
std::string node
Definition: datatypes.h:60
ros::Time stamp
Definition: datatypes.h:57
std::vector< std::string > text
Definition: datatypes.h:64
LogEntry(const rosgraph_msgs::Log &log)
Definition: datatypes.h:46


log_view
Author(s): Marc Alban
autogenerated on Thu Mar 4 2021 03:21:52