control: Split JSON and YAML based binaries
Effectively split the binary built for JSON based configurations from
YAML based configurations. Since each will have objects of the same
name, this split is necessary in order to keep the functional
differences apart while keeping the same object names since the JSON
based objects that are created will eventually replace the others.
Change-Id: I937606781fbfa5d23607f81c0fd445289f2bd036
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/manager.cpp b/control/manager.cpp
index 053861b..8109367 100644
--- a/control/manager.cpp
+++ b/control/manager.cpp
@@ -19,9 +19,6 @@
#include "sdbusplus.hpp"
#include "utility.hpp"
-#ifdef CONTROL_USE_JSON
-#include "json_parser.hpp"
-#endif
#include <unistd.h>
@@ -91,20 +88,7 @@
{
// Create the appropriate Zone objects based on the
// actual system configuration.
-#ifdef CONTROL_USE_JSON
- for (auto& group : getZoneGroups(bus))
- {
- // Create a Zone object for each zone in the group
- for (auto& z : std::get<zoneListPos>(group))
- {
- fs::path path{CONTROL_OBJPATH};
- path /= std::to_string(std::get<zoneNumPos>(z));
- _zones.emplace(
- std::get<zoneNumPos>(z),
- std::make_unique<Zone>(mode, _bus, path.string(), event, z));
- }
- }
-#else
+
// Find the 1 ZoneGroup that meets all of its conditions
for (auto& group : _zoneLayouts)
{
@@ -130,7 +114,6 @@
break;
}
}
-#endif
if (mode == Mode::control)
{
@@ -144,11 +127,7 @@
{
z.second->setFullSpeed();
}
-#ifdef CONTROL_USE_JSON
- auto delay = getPowerOnDelay(_bus, event);
-#else
auto delay = _powerOnDelay;
-#endif
while (delay > 0)
{
delay = sleep(delay);