HwmonTemp: Support more than 2 temperature readings; add support for MAX31730.
Tested:
All 4 temperature readings of MAX31730 are available in IPMI sensors:
~ # ipmitool sensor list | grep xxx
xxx_1 | 28.000 | degrees C | ok | na...
xxx_2 | 27.000 | degrees C | ok | na...
xxx_3 | 29.000 | degrees C | ok | na...
xxx_4 | 42.000 | degrees C | ok | na...
Signed-off-by: Alex Qiu <xqiu@google.com>
Change-Id: I5325dfcc2c7ee8c2737c05e46560153301b206a5
diff --git a/include/Utils.hpp b/include/Utils.hpp
index 44e7e2e..d97ff9c 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -29,22 +29,16 @@
using BasicVariantType =
std::variant<std::vector<std::string>, std::string, int64_t, uint64_t,
double, int32_t, uint32_t, int16_t, uint16_t, uint8_t, bool>;
-
-using ManagedObjectType = boost::container::flat_map<
- sdbusplus::message::object_path,
- boost::container::flat_map<
- std::string,
- boost::container::flat_map<std::string, BasicVariantType>>>;
-using SensorData = boost::container::flat_map<
- std::string, boost::container::flat_map<std::string, BasicVariantType>>;
+using SensorBaseConfigMap =
+ boost::container::flat_map<std::string, BasicVariantType>;
+using SensorBaseConfiguration = std::pair<std::string, SensorBaseConfigMap>;
+using SensorData = boost::container::flat_map<std::string, SensorBaseConfigMap>;
+using ManagedObjectType =
+ boost::container::flat_map<sdbusplus::message::object_path, SensorData>;
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>>;
-
using Association = std::tuple<std::string, std::string, std::string>;
bool findFiles(const std::filesystem::path dirPath,