blob: 1c680ce010f417bf3da87ac9bea5805b9998a49d [file] [log] [blame]
Matthew Barth29e9e382020-01-23 13:40:49 -06001#pragma once
2
3#include <interfaces/manager_interface.hpp>
4#include <sdbusplus/bus.hpp>
5#include <sdbusplus/server/object.hpp>
6
7namespace phosphor::power::regulators
8{
9
10constexpr auto busName = "xyz.openbmc_project.Power.Regulators";
11constexpr auto objPath = "/xyz/openbmc_project/power/regulators/manager";
12
13using ManagerObject = sdbusplus::server::object::object<
14 phosphor::power::regulators::interface::ManagerInterface>;
15
16class Manager : public ManagerObject
17{
18 public:
19 Manager() = delete;
20 Manager(const Manager&) = delete;
21 Manager(Manager&&) = delete;
22 Manager& operator=(const Manager&) = delete;
23 Manager& operator=(Manager&&) = delete;
24 ~Manager() = default;
25
26 /**
27 * Constructor
28 * Creates a manager over the regulators.
29 *
30 * @param[in] bus - the dbus bus
31 */
32 Manager(sdbusplus::bus::bus& bus);
33
34 /**
35 * @brief Overridden manager object's configure method
36 */
37 void configure() override;
38
39 /**
40 * @brief Overridden manager object's monitor method
41 *
42 * @param[in] enable - Enable or disable regulator monitoring
43 */
44 void monitor(bool enable) override;
45
46 private:
47 /**
48 * The dbus bus
49 */
50 sdbusplus::bus::bus& bus;
51};
52
53} // namespace phosphor::power::regulators