Add associations to sensors
This adds associations to all the sensors on dbus.
Tested: Mapper has lots of sensor associations now.
Change-Id: I9a1c51d6b139e45a228507d29637c29a84b302d9
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/ADCSensor.cpp b/src/ADCSensor.cpp
index 01edc13..1db036e 100644
--- a/src/ADCSensor.cpp
+++ b/src/ADCSensor.cpp
@@ -65,6 +65,9 @@
"/xyz/openbmc_project/sensors/voltage/" + name,
"xyz.openbmc_project.Sensor.Threshold.Critical");
}
+ association = objectServer.add_interface(
+ "/xyz/openbmc_project/sensors/voltage/" + name,
+ "org.openbmc.Associations");
setInitialProperties(conn);
setupRead();
@@ -80,6 +83,7 @@
objServer.remove_interface(thresholdInterfaceWarning);
objServer.remove_interface(thresholdInterfaceCritical);
objServer.remove_interface(sensorInterface);
+ objServer.remove_interface(association);
}
void ADCSensor::setupRead(void)