Go to the documentation of this file.
18 timestamp = ts.
value().get<
double>();
28 flatten = [&](
const std::string& prefix,
const nlohmann::json& value) {
40 flatten(
fmt::format(
"{}[{}]", prefix, i), value[i]);
47 for (
const auto& element : value.items())
49 flatten(
fmt::format(
"{}/{}", prefix, element.key()), element.value());
55 double numeric_value = 0;
56 if (value.is_boolean())
58 numeric_value = value.get<
bool>();
60 else if (value.is_number())
62 numeric_value = value.get<
double>();
70 plot_data->pushBack({ timestamp, numeric_value });
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in BSON format
bool parseMessage(const MessageRef msg, double ×tamp) override
@ object
object (unordered set of name/value pairs)
span_CONFIG_SIZE_TYPE size_t
bool parseMessage(const MessageRef msg, double ×tamp) override
bool parseMessage(const MessageRef msg, double ×tamp) override
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json parse(InputType &&i, const parser_callback_t cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false)
deserialize from a compatible input
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in MessagePack format
PlotData & getSeries(const std::string &key)
bool parseMessageImpl(double ×tamp)
@ array
array (ordered collection of values)
auto format(const text_style &ts, const S &format_str, const Args &... args) -> std::basic_string< Char >
iterator find(KeyT &&key)
find an element in a JSON object
a class to store JSON values
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(InputType &&i, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
create a JSON value from an input in CBOR format
bool parseMessage(const MessageRef msg, double ×tamp) override
std::string _stamp_fieldname
reference value() const
return the value of an iterator
iterator end() noexcept
returns an iterator to one past the last element
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45