ExitAirSensor: Get power readings from PSU
Now that PSU Sensors work, remove todo. Also fix
a bug where a int32 should have been a double as the
value from d-bus is a double.
Tested: Ipmitool sensor list
Change-Id: Ic7b31c1091b8178dc23ca79fdc189b973095a8e3
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/Utils.hpp b/include/Utils.hpp
index 7f24e21..d65fb83 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -26,6 +26,9 @@
using SensorData = boost::container::flat_map<
std::string, boost::container::flat_map<std::string, BasicVariantType>>;
+using GetSubTreeType = std::vector<
+ std::pair<std::string,
+ std::vector<std::pair<std::string, std::vector<std::string>>>>>;
using SensorBaseConfiguration =
std::pair<std::string,
boost::container::flat_map<std::string, BasicVariantType>>;
@@ -57,6 +60,20 @@
always
};
+namespace mapper
+{
+constexpr const char* busName = "xyz.openbmc_project.ObjectMapper";
+constexpr const char* path = "/xyz/openbmc_project/object_mapper";
+constexpr const char* interface = "xyz.openbmc_project.ObjectMapper";
+constexpr const char* subtree = "GetSubTree";
+} // namespace mapper
+
+namespace properties
+{
+constexpr const char* interface = "org.freedesktop.DBus.Properties";
+constexpr const char* get = "Get";
+} // namespace properties
+
template <typename T>
inline T loadVariant(
const boost::container::flat_map<std::string, BasicVariantType>& data,