Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "types/collection_duration.hpp" |
| 4 | #include "types/collection_time_scope.hpp" |
| 5 | #include "types/operation_type.hpp" |
Szymon Dompke | 94f71c5 | 2021-12-10 07:16:33 +0100 | [diff] [blame] | 6 | #include "types/sensor_types.hpp" |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 7 | #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 | |
| 18 | using ReadingParametersPastVersion = |
| 19 | std::vector<std::tuple<sdbusplus::message::object_path, std::string, |
| 20 | std::string, std::string>>; |
| 21 | |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 22 | using 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 Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 25 | |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 26 | using LabeledMetricParameters = utils::LabeledTuple< |
Szymon Dompke | 94f71c5 | 2021-12-10 07:16:33 +0100 | [diff] [blame] | 27 | std::tuple<std::vector<LabeledSensorInfo>, OperationType, std::string, |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 28 | CollectionTimeScope, CollectionDuration>, |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 29 | utils::tstring::SensorPath, utils::tstring::OperationType, |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 30 | utils::tstring::Id, utils::tstring::CollectionTimeScope, |
| 31 | utils::tstring::CollectionDuration>; |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 32 | |
Szymon Dompke | 3eb5686 | 2021-09-20 15:32:04 +0200 | [diff] [blame] | 33 | using ReadingData = std::tuple<std::string, std::string, double, uint64_t>; |
| 34 | |
| 35 | using Readings = std::tuple<uint64_t, std::vector<ReadingData>>; |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 36 | |
| 37 | ReadingParameters |
| 38 | toReadingParameters(const std::vector<LabeledMetricParameters>& labeled); |
Szymon Dompke | b4ef22e | 2022-02-07 15:15:12 +0100 | [diff] [blame^] | 39 | |
| 40 | enum class TriggerIdUpdate |
| 41 | { |
| 42 | Add, |
| 43 | Remove |
| 44 | }; |