style: fixup naming of structures

Fixup naming of structures to UpperCamel.

Change-Id: I6a9bf0b954298089c85d3362e86cd95b3fc5b944
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/conf.hpp b/conf.hpp
index 01968cb..6e2dc32 100644
--- a/conf.hpp
+++ b/conf.hpp
@@ -10,7 +10,7 @@
 /*
  * General sensor structure used for configuration.
  */
-struct sensor
+struct SensorConfig
 {
     /* Used for listen if readpath is passive. */
     std::string type;
@@ -26,7 +26,7 @@
 /*
  * Structure for holding the configuration of a PID.
  */
-struct controller_info
+struct ControllerInfo
 {
     std::string type;                // fan or margin or temp?
     std::vector<std::string> inputs; // one or more sensors.
@@ -43,7 +43,7 @@
  * and a set of configuration settings.  This structure gets filled out with
  * the zone configuration settings and not the PID details.
  */
-struct zone
+struct ZoneConfig
 {
     /* The minimum RPM value we would ever want. */
     float minthermalrpm;
@@ -52,4 +52,4 @@
     float failsafepercent;
 };
 
-using PIDConf = std::map<std::string, struct controller_info>;
+using PIDConf = std::map<std::string, struct ControllerInfo>;
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 0a7c502..9a03c0b 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 sensor> SensorConfig = {};
+std::map<std::string, struct SensorConfig> SensorConfig = {};
 std::map<int64_t, PIDConf> ZoneConfig = {};
-std::map<int64_t, struct zone> ZoneDetailsConfig = {};
+std::map<int64_t, struct ZoneConfig> ZoneDetailsConfig = {};
 
 constexpr const char* pidConfigurationInterface =
     "xyz.openbmc_project.Configuration.Pid";
@@ -397,7 +397,7 @@
                 {
                     continue;
                 }
-                struct controller_info& info =
+                struct ControllerInfo& info =
                     conf[variant_ns::get<std::string>(base.at("Name"))];
                 info.inputs = std::move(inputs);
 
@@ -490,7 +490,7 @@
                 {
                     continue;
                 }
-                struct controller_info& info =
+                struct ControllerInfo& info =
                     conf[variant_ns::get<std::string>(base.at("Name"))];
                 info.inputs = std::move(inputs);
 
diff --git a/main.cpp b/main.cpp
index ff0952d..6b3a417 100644
--- a/main.cpp
+++ b/main.cpp
@@ -46,11 +46,11 @@
 #endif
 
 /* The YAML converted sensor list. */
-extern std::map<std::string, struct sensor> SensorConfig;
+extern std::map<std::string, struct SensorConfig> SensorConfig;
 /* The YAML converted PID list. */
 extern std::map<int64_t, PIDConf> ZoneConfig;
 /* The YAML converted Zone configuration. */
-extern std::map<int64_t, struct zone> ZoneDetailsConfig;
+extern std::map<int64_t, struct ZoneConfig> ZoneDetailsConfig;
 
 int main(int argc, char* argv[])
 {
diff --git a/pid/builder.cpp b/pid/builder.cpp
index 5d8f62f..fece41b 100644
--- a/pid/builder.cpp
+++ b/pid/builder.cpp
@@ -37,8 +37,8 @@
 
 std::unordered_map<int64_t, std::unique_ptr<PIDZone>>
     BuildZones(std::map<int64_t, PIDConf>& zonePids,
-               std::map<int64_t, struct zone>& zoneConfigs, SensorManager& mgr,
-               sdbusplus::bus::bus& modeControlBus)
+               std::map<int64_t, struct ZoneConfig>& zoneConfigs,
+               SensorManager& mgr, sdbusplus::bus::bus& modeControlBus)
 {
     std::unordered_map<int64_t, std::unique_ptr<PIDZone>> zones;
 
@@ -74,7 +74,7 @@
         {
             std::vector<std::string> inputs;
             std::string name = pit.first;
-            const struct controller_info* info = &pit.second;
+            const struct ControllerInfo* info = &pit.second;
 
             std::cerr << "PID name: " << name << "\n";
 
diff --git a/pid/builder.hpp b/pid/builder.hpp
index 9201b9a..8891531 100644
--- a/pid/builder.hpp
+++ b/pid/builder.hpp
@@ -9,5 +9,5 @@
 
 std::unordered_map<int64_t, std::unique_ptr<PIDZone>>
     BuildZones(std::map<int64_t, PIDConf>& zonePids,
-               std::map<int64_t, struct zone>& zoneConfigs, SensorManager& mgr,
-               sdbusplus::bus::bus& modeControlBus);
+               std::map<int64_t, struct ZoneConfig>& zoneConfigs,
+               SensorManager& mgr, sdbusplus::bus::bus& modeControlBus);
diff --git a/pid/builderconfig.cpp b/pid/builderconfig.cpp
index c72ef9e..4909713 100644
--- a/pid/builderconfig.cpp
+++ b/pid/builderconfig.cpp
@@ -35,7 +35,7 @@
     // zone -> pids
     std::map<int64_t, PIDConf> pidConfig;
     // zone -> configs
-    std::map<int64_t, struct zone> zoneConfig;
+    std::map<int64_t, struct ZoneConfig> zoneConfig;
 
     std::cerr << "entered BuildZonesFromConfig\n";
 
@@ -72,7 +72,7 @@
 
             int id;
             PIDConf thisZone;
-            struct zone thisZoneConfig;
+            struct ZoneConfig thisZoneConfig;
 
             zoneSettings.lookupValue("id", id);
 
@@ -88,7 +88,7 @@
                 const Setting& pid = pids[j];
 
                 std::string name;
-                controller_info info;
+                struct ControllerInfo info;
 
                 /*
                  * Mysteriously if you use lookupValue on these, and the type
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index 8be30bb..6f81e82 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -6,7 +6,7 @@
 #include <map>
 #include "conf.hpp"
 
-std::map<std::string, struct sensor> SensorConfig = {
+std::map<std::string, struct SensorConfig> SensorConfig = {
 % for key in sensorDict.iterkeys():
    % if key:
    <%
diff --git a/scripts/writezone.mako.cpp b/scripts/writezone.mako.cpp
index 57b9908..2598613 100644
--- a/scripts/writezone.mako.cpp
+++ b/scripts/writezone.mako.cpp
@@ -6,7 +6,7 @@
 #include <map>
 #include "conf.hpp"
 
-std::map<int64_t, struct zone> ZoneDetailsConfig = {
+std::map<int64_t, struct ZoneConfig> ZoneDetailsConfig = {
 % for zone in ZoneDict.iterkeys():
    % if zone:
    <%
diff --git a/sensors/builder.cpp b/sensors/builder.cpp
index 7927dd0..a43a731 100644
--- a/sensors/builder.cpp
+++ b/sensors/builder.cpp
@@ -36,7 +36,8 @@
 static constexpr bool deferSignals = true;
 static DbusHelper helper;
 
-SensorManager BuildSensors(const std::map<std::string, struct sensor>& config)
+SensorManager
+    BuildSensors(const std::map<std::string, struct SensorConfig>& config)
 {
     SensorManager mgmr;
     auto& HostSensorBus = mgmr.getHostBus();
@@ -48,7 +49,7 @@
         std::unique_ptr<WriteInterface> wi;
 
         std::string name = it.first;
-        const struct sensor* info = &it.second;
+        const struct SensorConfig* info = &it.second;
 
         std::cerr << "Sensor: " << name << " " << info->type << " ";
         std::cerr << info->readpath << " " << info->writepath << "\n";
diff --git a/sensors/builder.hpp b/sensors/builder.hpp
index 78a578a..fdf1c9b 100644
--- a/sensors/builder.hpp
+++ b/sensors/builder.hpp
@@ -9,4 +9,5 @@
 /**
  * Build the sensors and associate them with a SensorManager.
  */
-SensorManager BuildSensors(const std::map<std::string, struct sensor>& config);
+SensorManager
+    BuildSensors(const std::map<std::string, struct SensorConfig>& config);
diff --git a/sensors/builderconfig.cpp b/sensors/builderconfig.cpp
index cb3fd81..f87e572 100644
--- a/sensors/builderconfig.cpp
+++ b/sensors/builderconfig.cpp
@@ -33,7 +33,7 @@
 {
     using namespace libconfig;
 
-    std::map<std::string, struct sensor> config;
+    std::map<std::string, struct SensorConfig> config;
     Config cfg;
 
     std::cerr << "entered BuildSensorsFromConfig\n";
@@ -69,7 +69,7 @@
             const Setting& sensor = sensors[i];
 
             std::string name;
-            struct sensor thisOne;
+            struct SensorConfig thisOne;
 
             /* Not a super fan of using this library for run-time configuration.
              */