Remove Configuration interface prefix from utils APIs
This eliminates some repetitive verbosity from daemons that handle a lot
of different sensor types (such as hwmontempsensor and psusensor). It
also positions us to more cleanly use a single data structure for both
existing APIs like GetSensorConfiguration() and
setupPropertiesChangedMatches(), as well as upcoming I2C
device-management support.
Tested: hwmontempsensor and adcsensor on romed8hm3 continue to behave as
they did previously.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I9d80475ca4160c8d2ff0afab942709496d51238d
diff --git a/include/sensor.hpp b/include/sensor.hpp
index 2bc55f5..290b78b 100644
--- a/include/sensor.hpp
+++ b/include/sensor.hpp
@@ -63,7 +63,8 @@
std::shared_ptr<sdbusplus::asio::connection>& conn,
PowerState readState = PowerState::always) :
name(sensor_paths::escapePathForDbus(name)),
- configurationPath(configurationPath), objectType(objectType),
+ configurationPath(configurationPath),
+ objectType(configInterfaceName(objectType)),
isSensorSettable(isSettable), isValueMutable(isMutable), maxValue(max),
minValue(min), thresholds(std::move(thresholdData)),
hysteresisTrigger((max - min) * 0.01),