control: Add ObjectManager interface
Create the ObjectManager interface on the configured `CONTROL_OBJPATH`
given at configure time which defaults to
`/xyz/openbmc_project/control/thermal`. This is to handle obtaining the
dbus service name regardless if any configured dbus objects(zones)
should be created.
Change-Id: Ie05bc4a1b7bd8aee21df4bf3d38aed1e48be130c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index b29c5e9..4ba61e7 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -29,6 +29,7 @@
#include <nlohmann/json.hpp>
#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server/manager.hpp>
#include <sdeventplus/event.hpp>
#include <sdeventplus/utility/timer.hpp>
@@ -57,6 +58,7 @@
Manager::Manager(const sdeventplus::Event& event) :
_bus(util::SDBusPlus::getBus()), _event(event),
+ _mgr(util::SDBusPlus::getBus(), CONTROL_OBJPATH),
_powerState(std::make_unique<PGoodState>(
util::SDBusPlus::getBus(),
std::bind(std::mem_fn(&Manager::powerStateChanged), this,