blob: 5229e5e7286d3ef10f14b2c9b00893eafa1a9e85 [file] [log] [blame]
Cezary Zwolak4416fce2021-03-17 03:21:06 +01001#pragma once
2
3#include "interfaces/json_storage.hpp"
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +00004#include "types/trigger_types.hpp"
Cezary Zwolak4416fce2021-03-17 03:21:06 +01005
6namespace utils
7{
8
9class ToLabeledThresholdParamConversion
10{
11 public:
12 LabeledTriggerThresholdParams operator()(const std::monostate& arg) const;
13 LabeledTriggerThresholdParams
14 operator()(const std::vector<numeric::ThresholdParam>& arg) const;
15 LabeledTriggerThresholdParams
16 operator()(const std::vector<discrete::ThresholdParam>& arg) const;
17};
18
19class FromLabeledThresholdParamConversion
20{
21 public:
22 TriggerThresholdParams operator()(
23 const std::vector<numeric::LabeledThresholdParam>& arg) const;
24 TriggerThresholdParams operator()(
25 const std::vector<discrete::LabeledThresholdParam>& arg) const;
26};
27
28SensorsInfo fromLabeledSensorsInfo(const std::vector<LabeledSensorInfo>& infos);
29
30nlohmann::json labeledThresholdParamsToJson(
31 const LabeledTriggerThresholdParams& labeledThresholdParams);
32
33} // namespace utils