blob: 7f8baa3ff9fdb13c87af550cd82353ef56c64928 [file] [log] [blame]
Matt Spinlere10416e2017-04-10 14:15:53 -05001#pragma once
2
3#include <memory>
4#include <vector>
5#include <sdbusplus/bus.hpp>
6#include "types.hpp"
Matt Spinler57352a32017-04-10 14:48:35 -05007#include "zone.hpp"
Matt Spinlere10416e2017-04-10 14:15:53 -05008
9namespace phosphor
10{
11namespace fan
12{
13namespace control
14{
15
Matt Spinler57352a32017-04-10 14:48:35 -050016using ZoneMap = std::map<unsigned int,
17 std::unique_ptr<Zone>>;
18
Matt Spinlere10416e2017-04-10 14:15:53 -050019/**
20 * @class Fan control manager
21 */
22class Manager
23{
24 public:
25
26 Manager() = delete;
27 Manager(const Manager&) = delete;
28 Manager(Manager&&) = default;
29 Manager& operator=(const Manager&) = delete;
30 Manager& operator=(Manager&&) = delete;
31 ~Manager() = default;
32
33 /**
34 * Constructor
35 * Creates the Zone objects based on the
36 * _zoneLayouts data.
37 *
38 * @param[in] bus - The dbus object
39 */
40 Manager(sdbusplus::bus::bus& bus);
41
42 private:
43
44 /**
45 * The dbus object
46 */
47 sdbusplus::bus::bus& _bus;
48
49 /**
Matt Spinler57352a32017-04-10 14:48:35 -050050 * The fan zones in the system
51 */
52 ZoneMap _zones;
53
54 /**
Matt Spinlere10416e2017-04-10 14:15:53 -050055 * The fan zone layout for the system.
56 * This is generated data.
57 */
58 static const std::vector<ZoneGroup> _zoneLayouts;
59};
60
61
62}
63}
64}