Rename Sensor class variable
The name of the entity-manager D-Bus interface the sensor was created
from was stored in a variable called objectType. Rename that to
configInterface to make it obvious it's an interface name.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5258ebf12c6aa565a6a2ea286cd2724fd54cf986
diff --git a/src/HwmonTempMain.cpp b/src/HwmonTempMain.cpp
index 557fe3c..fda3053 100644
--- a/src/HwmonTempMain.cpp
+++ b/src/HwmonTempMain.cpp
@@ -615,7 +615,7 @@
{
if ((sensorIt->second->configurationPath == path) &&
(std::find(interfaces.begin(), interfaces.end(),
- sensorIt->second->objectType) != interfaces.end()))
+ sensorIt->second->configInterface) != interfaces.end()))
{
sensorIt = sensors.erase(sensorIt);
}
diff --git a/src/NVMeSensorMain.cpp b/src/NVMeSensorMain.cpp
index 9483a3d..237c37d 100644
--- a/src/NVMeSensorMain.cpp
+++ b/src/NVMeSensorMain.cpp
@@ -235,7 +235,7 @@
}
auto interface = std::find(interfaces.begin(), interfaces.end(),
- (*sensor)->objectType);
+ (*sensor)->configInterface);
if (interface == interfaces.end())
{
continue;
diff --git a/src/sensor.hpp b/src/sensor.hpp
index 27bbd1a..17ed488 100644
--- a/src/sensor.hpp
+++ b/src/sensor.hpp
@@ -66,7 +66,7 @@
PowerState readState = PowerState::always) :
name(sensor_paths::escapePathForDbus(name)),
configurationPath(configurationPath),
- objectType(configInterfaceName(objectType)),
+ configInterface(configInterfaceName(objectType)),
isSensorSettable(isSettable), isValueMutable(isMutable), maxValue(max),
minValue(min), thresholds(std::move(thresholdData)),
hysteresisTrigger((max - min) * 0.01),
@@ -80,7 +80,7 @@
virtual void checkThresholds(void) = 0;
std::string name;
std::string configurationPath;
- std::string objectType;
+ std::string configInterface;
bool isSensorSettable;
/* A flag indicates if properties of xyz.openbmc_project.Sensor.Value
@@ -154,7 +154,7 @@
if ((inst.numCollectsGood == 0) && (inst.numCollectsMiss == 0))
{
std::cerr << "Sensor " << name << ": Configuration min=" << minValue
- << ", max=" << maxValue << ", type=" << objectType
+ << ", max=" << maxValue << ", type=" << configInterface
<< ", path=" << configurationPath << "\n";
}
@@ -304,7 +304,7 @@
[&, label, thresSize](const double& request, double& oldValue) {
oldValue = request; // todo, just let the config do this?
threshold.value = request;
- thresholds::persistThreshold(configurationPath, objectType,
+ thresholds::persistThreshold(configurationPath, configInterface,
threshold, dbusConnection,
thresSize, label);
// Invalidate previously remembered value,