blob: ef61aa684418d1f81880fd60ca9383acecf85e64 [file] [log] [blame]
Wludzik, Jozef76833cb2020-12-21 14:42:41 +01001#pragma once
2
3#include <sdbusplus/message/types.hpp>
4
5#include <string>
6#include <tuple>
7#include <utility>
8#include <vector>
9
10namespace discrete
11{
12
13enum class Severity
14{
15 ok = 0,
16 warning,
17 critical
18};
19
20using ThresholdParam = std::tuple<std::string, std::underlying_type_t<Severity>,
21 std::variant<double>, uint64_t>;
22} // namespace discrete
23
24namespace numeric
25{
26
27enum class Type
28{
29 lowerCritical = 0,
30 lowerWarning,
31 upperWarning,
32 upperCritical
33};
34
35enum class Direction
36{
37 either = 0,
38 decreasing,
39 increasing
40};
41
42using ThresholdParam = std::tuple<std::underlying_type_t<Type>, uint64_t,
43 std::underlying_type_t<Direction>, double>;
44} // namespace numeric
45
46using TriggerThresholdParams =
47 std::variant<std::vector<numeric::ThresholdParam>,
48 std::vector<discrete::ThresholdParam>>;