ros1_parser.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <QCheckBox>
6 #include <QDebug>
7 #include <string>
8 
10 #include "ros_parser.h"
11 #include "PlotJuggler/fmt/format.h"
12 
13 using namespace PJ;
14 
16 {
17  Q_OBJECT
18  Q_PLUGIN_METADATA(IID "facontidavide.PlotJuggler3.ParserFactoryPlugin")
19  Q_INTERFACES(PJ::ParserFactoryPlugin)
20 
21 public:
22  ParserFactoryROS1() = default;
23 
24  const char* name() const override
25  {
26  return "ParserFactoryROS1";
27  }
28  const char* encoding() const override
29  {
30  return "ros1";
31  }
32 
33  MessageParserPtr createParser(const std::string& topic_name,
34  const std::string& type_name,
35  const std::string& schema,
36  PlotDataMapRef& data) override
37  {
38  if(schema.empty())
39  {
40  throw std::runtime_error("ParserFactoryROS1 requires a schema (message definition)");
41  }
42  return std::make_shared<ParserROS>(topic_name, type_name, schema,
44  }
45 };
46 
47 
48 
MessageParserPtr createParser(const std::string &topic_name, const std::string &type_name, const std::string &schema, PlotDataMapRef &data) override
Definition: ros1_parser.h:33
const char * name() const override
Name of the plugin type, NOT the particular instance.
Definition: ros1_parser.h:24
std::shared_ptr< MessageParser > MessageParserPtr
const char * encoding() const override
Definition: ros1_parser.h:28
std::string type_name(lua_State *L, type t)
Definition: sol.hpp:8079
dictionary data
Definition: mqtt_test.py:22
Definition: format.h:895


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:39