Go to the documentation of this file.
20 auto callback = [
this, timestamp](
const std::string& series_name,
22 auto name =
fmt::format(
"{}/{}", topic_name_, series_name);
23 auto& plot_data = _plot_data.getOrCreateNumeric(name);
25 double value = std::visit([](
auto&& v) {
return static_cast<double>(v); },
var);
27 plot_data.pushBack({ timestamp, value });
34 serialized_msg.
size() };
36 const uint32_t mask_size = DataTamerParser::Deserialize<uint32_t>(msg_buffer);
41 const uint32_t payload_size = DataTamerParser::Deserialize<uint32_t>(msg_buffer);
65 const std::string& schema,
68 return std::make_shared<MsgParserImpl>(topic_name,
type_name, schema,
data);
DataTamer uses a simple "flat" schema of key/value pairs (each pair is a "field").
std::shared_ptr< MessageParser > MessageParserPtr
std::vector< TimeSeries > timeseries_
BufferSpan payload
serialized data containing all the values, ordered as in the schema
const uint8_t * data() const
std::string type_name(lua_State *L, type t)
std::variant< bool, char, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double > VarNumber
Schema BuilSchemaFromText(const std::string &txt)
MsgParserImpl(const std::string &topic_name, const std::string &type_name, const std::string &schema, PJ::PlotDataMapRef &data)
The MessageParser is the base class used to parse a message with a specific encoding+schema.
auto format(const text_style &ts, const S &format_str, const Args &... args) -> std::basic_string< Char >
bool parseMessage(const MessageRef serialized_msg, double ×tamp) override
DataTamerParser::Schema schema_
DataTamerParser::BasicType type
bool ParseSnapshot(const Schema &schema, SnapshotView snapshot, const NumberCallback &callback_number, const CustomCallback &callback_custom=NullCustomCallback)
PJ::MessageParserPtr createParser(const std::string &topic_name, const std::string &type_name, const std::string &schema, PJ::PlotDataMapRef &data) override
size_t schema_hash
Unique identifier of the schema.
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44