summaryrefslogtreecommitdiffstats
path: root/monitor/types.hpp
blob: 795db007229e4cb7670d9a5b2abb89151c13fc8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once

#include <functional>
#include <string>
#include <tuple>
#include <vector>
#include "trust_group.hpp"

namespace phosphor
{
namespace fan
{
namespace monitor
{

using CreateGroupFunction =
        std::function<std::unique_ptr<trust::Group>()>;

constexpr auto sensorNameField = 0;
constexpr auto hasTargetField = 1;

using SensorDefinition = std::tuple<std::string, bool>;

constexpr auto fanNameField = 0;
constexpr auto timeoutField = 1;
constexpr auto fanDeviationField = 2;
constexpr auto numSensorFailsForNonfuncField = 3;
constexpr auto sensorListField = 4;

using FanDefinition = std::tuple<std::string,
                                 size_t,
                                 size_t,
                                 size_t,
                                 std::vector<SensorDefinition>>;

}
}
}
OpenPOWER on IntegriCloud