regs: Add manager object
Create a manager object that extends the manager interface overriding
the configure and monitor methods. This provides the framework for
receiving dbus method calls at the appropriate times during a system
poweron or poweroff.
Tested:
Used `busctl` to call the configure method
Used `busctl` to call the monitor method
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Change-Id: I09db5a800a09205ba182824e62bacb19b10856bd
diff --git a/phosphor-regulators/src/main.cpp b/phosphor-regulators/src/main.cpp
index 5788fb4..e104ef9 100644
--- a/phosphor-regulators/src/main.cpp
+++ b/phosphor-regulators/src/main.cpp
@@ -14,13 +14,20 @@
* limitations under the License.
*/
+#include "manager.hpp"
+
#include <sdbusplus/bus.hpp>
#include <sdeventplus/event.hpp>
int main(void)
{
+ using namespace phosphor::power;
+
auto bus = sdbusplus::bus::new_default();
auto event = sdeventplus::Event::get_default();
bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
+
+ regulators::Manager manager(bus);
+
return event.loop();
}