summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-30 19:40:05 -0700
committerPatrick Venture <venture@google.com>2018-10-30 19:43:23 -0700
commitc54fbd88eda50458bc7635b662299eb451bd509c (patch)
tree1c388bc458e589c7e42dd2ab74b09462039fae52 /dbus
parente6a7a2eb20b20ce7fee947eb56451f9723e3d057 (diff)
downloadphosphor-pid-control-c54fbd88eda50458bc7635b662299eb451bd509c.tar.gz
phosphor-pid-control-c54fbd88eda50458bc7635b662299eb451bd509c.zip
style: rename main globals per style
Rename the main global variables per openbmc style. Change-Id: I9de8cf841304f24238ae0275b6904f4926a6892d Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbusconfiguration.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 9a03c0b..067efc7 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -30,9 +30,9 @@
static constexpr bool DEBUG = false; // enable to print found configuration
-std::map<std::string, struct SensorConfig> SensorConfig = {};
-std::map<int64_t, PIDConf> ZoneConfig = {};
-std::map<int64_t, struct ZoneConfig> ZoneDetailsConfig = {};
+std::map<std::string, struct SensorConfig> sensorConfig = {};
+std::map<int64_t, PIDConf> zoneConfig = {};
+std::map<int64_t, struct ZoneConfig> zoneDetailsConfig = {};
constexpr const char* pidConfigurationInterface =
"xyz.openbmc_project.Configuration.Pid";
@@ -75,7 +75,7 @@ void debugPrint(void)
// print sensor config
std::cout << "sensor config:\n";
std::cout << "{\n";
- for (const auto& pair : SensorConfig)
+ for (const auto& pair : sensorConfig)
{
std::cout << "\t{" << pair.first << ",\n\t\t{";
@@ -89,7 +89,7 @@ void debugPrint(void)
std::cout << "}\n\n";
std::cout << "ZoneDetailsConfig\n";
std::cout << "{\n";
- for (const auto& zone : ZoneDetailsConfig)
+ for (const auto& zone : zoneDetailsConfig)
{
std::cout << "\t{" << zone.first << ",\n";
std::cout << "\t\t{" << zone.second.minthermalrpm << ", ";
@@ -98,7 +98,7 @@ void debugPrint(void)
std::cout << "}\n\n";
std::cout << "ZoneConfig\n";
std::cout << "{\n";
- for (const auto& zone : ZoneConfig)
+ for (const auto& zone : zoneConfig)
{
std::cout << "\t{" << zone.first << "\n";
for (const auto& pidconf : zone.second)
@@ -301,7 +301,7 @@ void init(sdbusplus::bus::bus& bus)
index = zoneIndex.end() - it;
}
- auto& details = ZoneDetailsConfig[index];
+ auto& details = zoneDetailsConfig[index];
details.minthermalrpm = variant_ns::apply_visitor(
VariantToFloatVisitor(), zone.at("MinThermalRpm"));
details.failsafepercent = variant_ns::apply_visitor(
@@ -328,7 +328,7 @@ void init(sdbusplus::bus::bus& bus)
{
index = zoneIndex.end() - it;
}
- PIDConf& conf = ZoneConfig[index];
+ PIDConf& conf = zoneConfig[index];
std::vector<std::string> sensorNames =
variant_ns::get<std::vector<std::string>>(
@@ -360,7 +360,7 @@ void init(sdbusplus::bus::bus& bus)
if (sensorPathIfacePair.second == sensorInterface)
{
inputs.push_back(name);
- auto& config = SensorConfig[name];
+ auto& config = sensorConfig[name];
config.type =
variant_ns::get<std::string>(base.at("Class"));
config.readpath = sensorPathIfacePair.first;
@@ -382,7 +382,7 @@ void init(sdbusplus::bus::bus& bus)
}
std::replace(otherSensor.begin(), otherSensor.end(),
' ', '_');
- auto& config = SensorConfig[otherSensor];
+ auto& config = sensorConfig[otherSensor];
config.writepath = sensorPathIfacePair.first;
// todo: un-hardcode this if there are fans with
// different ranges
@@ -456,7 +456,7 @@ void init(sdbusplus::bus::bus& bus)
{
index = zoneIndex.end() - it;
}
- PIDConf& conf = ZoneConfig[index];
+ PIDConf& conf = zoneConfig[index];
std::vector<std::string> inputs;
std::vector<std::string> sensorNames =
@@ -478,7 +478,7 @@ void init(sdbusplus::bus::bus& bus)
}
inputs.push_back(name);
- auto& config = SensorConfig[name];
+ auto& config = sensorConfig[name];
config.readpath = sensorPathIfacePair.first;
config.type = "temp";
// todo: maybe un-hardcode this if we run into slower
@@ -551,7 +551,7 @@ void init(sdbusplus::bus::bus& bus)
{
debugPrint();
}
- if (ZoneConfig.empty())
+ if (zoneConfig.empty())
{
std::cerr << "No fan zones, application pausing until reboot\n";
while (1)
OpenPOWER on IntegriCloud