1 #ifndef FIVEAI_STAMPED_DIAGNOSTIC_H 2 #define FIVEAI_STAMPED_DIAGNOSTIC_H 30 namespace serialization
35 template<
typename Stream,
typename T>
inline static void allInOne(
Stream& stream, T m)
37 stream.next(m.status);
47 template<
typename Stream,
typename T>
inline static void allInOne(
Stream& stream, T m)
49 stream.next(m.diagnostics);
68 static std::string temp =
"b47994f5f7cab18367c65bedb56d7f75";
74 static std::unordered_set<std::string> temp = { getCompatibleKey() };
80 double timestamp)
override 88 if( _use_header_stamp )
90 timestamp = it.stamp.toSec();
92 const char *start_ptr = it.value.data();
95 if( start_ptr == res.ptr )
continue;
97 auto data_it = _data.find( it.key );
98 if( data_it == _data.end() )
100 data_it = _data.emplace( std::piecewise_construct,
101 std::forward_as_tuple(it.key),
102 std::forward_as_tuple(it.key)
105 data_it->second.pushBack( { timestamp, val } );
111 for (
auto& it: _data)
120 std::unordered_map<std::string,PlotData>
_data;
125 #endif // FIVEAI_STAMPED_DIAGNOSTIC_H std::unordered_map< std::string, PlotData > _data
virtual void pushMessageRef(const std::string &, const MessageRef &msg, double timestamp) override
#define ROS_DECLARE_ALLINONE_SERIALIZER
const std::unordered_set< std::string > & getCompatibleKeys() const override
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
void extractData(PlotDataMapRef &plot_map, const std::string &prefix) override
std::vector< StampedDiagnostic_ > diagnostics
const uint8_t * data() const
static void allInOne(Stream &stream, T m)
static const std::string & getCompatibleKey()
from_chars_result from_chars(const char *first, const char *last, double &value, chars_format fmt)
static void allInOne(Stream &stream, T m)
void deserialize(Stream &stream, T &t)