Use hwmonio for attribute IO
Moves disparate error handling scenarios from the method doing the
IO to the call point.
Resolves openbmc/openbmc#2166
Change-Id: I3b6d2e175433dd8b2946ae60381901f2d7ca1798
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/mainloop.hpp b/mainloop.hpp
index 90f1efa..b62481d 100644
--- a/mainloop.hpp
+++ b/mainloop.hpp
@@ -5,6 +5,7 @@
#include <experimental/any>
#include <sdbusplus/server.hpp>
#include "sensorset.hpp"
+#include "sysfs.hpp"
#include "interface.hpp"
static constexpr auto default_interval = 1000000;
@@ -79,4 +80,6 @@
SensorState state;
/** @brief Sleep interval in microseconds. */
uint64_t _interval = default_interval;
+ /** @brief Hwmon sysfs access. */
+ sysfs::hwmonio::HwmonIO ioAccess;
};