diff options
| author | James Feist <james.feist@linux.intel.com> | 2019-02-26 11:26:36 -0800 |
|---|---|---|
| committer | Patrick Venture <venture@google.com> | 2019-02-26 20:37:47 +0000 |
| commit | f81f28860b91727b03845381f7afcc5c93274d57 (patch) | |
| tree | c52db9764cc7cb7d81ddbbab8a252598a61c3883 /dbus | |
| parent | 3484bedaf611a106eeaf418b6cede2c2e42095c8 (diff) | |
| download | phosphor-pid-control-f81f28860b91727b03845381f7afcc5c93274d57.tar.gz phosphor-pid-control-f81f28860b91727b03845381f7afcc5c93274d57.zip | |
Expand conf namespace
Put rest of conf.hpp in the conf namespace. This is
largely a sed replace, and wrapping from_json in
conf namespace as it failed to build.
Change-Id: I9fe5c7b2fface44618c43af2367035afc39bcb64
Signed-off-by: James Feist <james.feist@linux.intel.com>
Diffstat (limited to 'dbus')
| -rw-r--r-- | dbus/dbusconfiguration.cpp | 14 | ||||
| -rw-r--r-- | dbus/dbuspassive.cpp | 2 | ||||
| -rw-r--r-- | dbus/dbuspassive.hpp | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp index 3c5be34..a0177f5 100644 --- a/dbus/dbusconfiguration.cpp +++ b/dbus/dbusconfiguration.cpp @@ -32,9 +32,9 @@ static constexpr bool DEBUG = false; // enable to print found configuration -extern std::map<std::string, struct SensorConfig> sensorConfig; -extern std::map<int64_t, PIDConf> zoneConfig; -extern std::map<int64_t, struct ZoneConfig> zoneDetailsConfig; +extern std::map<std::string, struct conf::SensorConfig> sensorConfig; +extern std::map<int64_t, conf::PIDConf> zoneConfig; +extern std::map<int64_t, struct conf::ZoneConfig> zoneDetailsConfig; constexpr const char* pidConfigurationInterface = "xyz.openbmc_project.Configuration.Pid"; @@ -315,7 +315,7 @@ void init(sdbusplus::bus::bus& bus) for (const std::string& zone : zones) { size_t index = getZoneIndex(zone, foundZones); - PIDConf& conf = zoneConfig[index]; + conf::PIDConf& conf = zoneConfig[index]; std::vector<std::string> sensorNames = std::get<std::vector<std::string>>(base.at("Inputs")); @@ -395,7 +395,7 @@ void init(sdbusplus::bus::bus& bus) } } - struct ControllerInfo& info = + struct conf::ControllerInfo& info = conf[std::get<std::string>(base.at("Name"))]; info.inputs = std::move(inputs); @@ -462,7 +462,7 @@ void init(sdbusplus::bus::bus& bus) for (const std::string& zone : zones) { size_t index = getZoneIndex(zone, foundZones); - PIDConf& conf = zoneConfig[index]; + conf::PIDConf& conf = zoneConfig[index]; std::vector<std::string> inputs; std::vector<std::string> sensorNames = @@ -504,7 +504,7 @@ void init(sdbusplus::bus::bus& bus) { continue; } - struct ControllerInfo& info = + struct conf::ControllerInfo& info = conf[std::get<std::string>(base.at("Name"))]; info.inputs = std::move(inputs); diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp index 206adbe..ee165b9 100644 --- a/dbus/dbuspassive.cpp +++ b/dbus/dbuspassive.cpp @@ -27,7 +27,7 @@ std::unique_ptr<ReadInterface> DbusPassive::createDbusPassive( sdbusplus::bus::bus& bus, const std::string& type, const std::string& id, - DbusHelperInterface* helper, const SensorConfig* info) + DbusHelperInterface* helper, const conf::SensorConfig* info) { if (helper == nullptr) { diff --git a/dbus/dbuspassive.hpp b/dbus/dbuspassive.hpp index fa9dab7..8cff245 100644 --- a/dbus/dbuspassive.hpp +++ b/dbus/dbuspassive.hpp @@ -37,7 +37,7 @@ class DbusPassive : public ReadInterface static std::unique_ptr<ReadInterface> createDbusPassive(sdbusplus::bus::bus& bus, const std::string& type, const std::string& id, DbusHelperInterface* helper, - const SensorConfig* info); + const conf::SensorConfig* info); DbusPassive(sdbusplus::bus::bus& bus, const std::string& type, const std::string& id, DbusHelperInterface* helper, |

