xref: /openbmc/telemetry/src/types/readings.hpp (revision cff70c14)
1 #pragma once
2 
3 #include "utils/labeled_tuple.hpp"
4 #include "utils/tstring.hpp"
5 
6 using ReadingData = std::tuple<std::string, double, uint64_t>;
7 using Readings = std::tuple<uint64_t, std::vector<ReadingData>>;
8 
9 using LabeledReadingData =
10     utils::LabeledTuple<ReadingData, utils::tstring::MetricProperty,
11                         utils::tstring::MetricValue, utils::tstring::Timestamp>;
12 
13 using LabeledReadings =
14     utils::LabeledTuple<std::tuple<uint64_t, std::vector<LabeledReadingData>>,
15                         utils::tstring::Timestamp, utils::tstring::Readings>;
16 
17 namespace utils
18 {
19 
20 LabeledReadings toLabeledReadings(const Readings&);
21 Readings toReadings(const LabeledReadings&);
22 
23 } // namespace utils
24