blob: 42f1ab054299963fd4dc0dd24f51c820bb20f68f [file] [log] [blame]
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +00001#pragma once
2
3#include "types/collection_duration.hpp"
4#include "types/collection_time_scope.hpp"
5#include "types/operation_type.hpp"
Szymon Dompke94f71c52021-12-10 07:16:33 +01006#include "types/sensor_types.hpp"
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +00007#include "utils/labeled_tuple.hpp"
8#include "utils/tstring.hpp"
9
10#include <sdbusplus/message/types.hpp>
11
12#include <chrono>
13#include <string>
14#include <tuple>
15#include <type_traits>
16#include <vector>
17
18using ReadingParametersPastVersion =
19 std::vector<std::tuple<sdbusplus::message::object_path, std::string,
20 std::string, std::string>>;
21
Krzysztof Grobelnyb8cc78d2021-11-29 15:54:53 +010022using ReadingParameters = std::vector<std::tuple<
23 std::vector<std::tuple<sdbusplus::message::object_path, std::string>>,
24 std::string, std::string, std::string, uint64_t>>;
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000025
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000026using LabeledMetricParameters = utils::LabeledTuple<
Szymon Dompke94f71c52021-12-10 07:16:33 +010027 std::tuple<std::vector<LabeledSensorInfo>, OperationType, std::string,
Krzysztof Grobelnyb8cc78d2021-11-29 15:54:53 +010028 CollectionTimeScope, CollectionDuration>,
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000029 utils::tstring::SensorPath, utils::tstring::OperationType,
Krzysztof Grobelnyb8cc78d2021-11-29 15:54:53 +010030 utils::tstring::Id, utils::tstring::CollectionTimeScope,
31 utils::tstring::CollectionDuration>;
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000032
Szymon Dompke3eb56862021-09-20 15:32:04 +020033using ReadingData = std::tuple<std::string, std::string, double, uint64_t>;
34
35using Readings = std::tuple<uint64_t, std::vector<ReadingData>>;
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000036
37ReadingParameters
38 toReadingParameters(const std::vector<LabeledMetricParameters>& labeled);
Szymon Dompkeb4ef22e2022-02-07 15:15:12 +010039
40enum class TriggerIdUpdate
41{
42 Add,
43 Remove
44};