10 #include <QApplication> 12 #include <unordered_map> 13 #include <unordered_set> 42 :
_ptr(reinterpret_cast<const uint8_t*>(first_ptr)),
_size(size)
47 :
_ptr(reinterpret_cast<const uint8_t*>(first_ptr)),
_size(size)
57 const uint8_t*
data()
const 64 return const_cast<uint8_t*
>(
_ptr);
73 const uint8_t*
_ptr =
nullptr;
85 : _plot_data(plot_data), _topic_name(topic_name)
90 virtual bool parseMessage(
const MessageRef serialized_msg,
double& timestamp) = 0;
98 _clamp_large_arrays = clamp;
99 _max_array_size = max_size;
104 return _max_array_size;
109 return _clamp_large_arrays;
126 bool _clamp_large_arrays =
false;
127 unsigned _max_array_size = 10000;
136 using Ptr = std::shared_ptr<ParserFactoryPlugin>;
140 virtual const char* encoding()
const = 0;
146 const std::string& schema,
156 #define ParserFactoryPlugin_iid "facontidavide.PlotJuggler3.ParserFactoryPlugin" PlotData & getOrCreateNumeric(const std::string &name, PlotGroup::Ptr group={})
MessageParser(const std::string &topic_name, PlotDataMapRef &plot_data)
virtual void setLargeArraysPolicy(bool clamp, unsigned max_size)
std::map< QString, std::shared_ptr< ParserFactoryPlugin > > ParserFactories
unsigned maxArraySize() const
PlotDataMapRef & _plot_data
std::shared_ptr< ParserFactoryPlugin > Ptr
std::shared_ptr< MessageParser > MessageParserPtr
StringSeries & getOrCreateStringSeries(const std::string &name, PlotGroup::Ptr group={})
bool clampLargeArray() const
std::string type_name(lua_State *L, type t)
MessageRef(const std::vector< T > &vect)
MessageRef(const std::byte *first_ptr, size_t size)
#define ParserFactoryPlugin_iid
const uint8_t * data() const
The MessageParser is the base class used to parse a message with a specific encoding+schema.
PlotData & getSeries(const std::string &key)
MessageRef(const int8_t *first_ptr, size_t size)
StringSeries & getStringSeries(const std::string &key)
MessageRef(const uint8_t *first_ptr, size_t size)
The PlotJugglerPlugin is the base class of all the plugins.