Add support to read binary PMBus data
PMBus::readBinary() can read a sysfs file that
contains binary data and returns a vector of bytes
representing that data.
Change-Id: I3c729f502e155b007b9ab22a4eeefec437f150e1
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/pmbus.hpp b/pmbus.hpp
index cad77bf..55e3ff6 100644
--- a/pmbus.hpp
+++ b/pmbus.hpp
@@ -209,6 +209,19 @@
std::string readString(const std::string& name, Type type);
/**
+ * Read data from a binary file in sysfs.
+ *
+ * @param[in] name - path concatenated to basePath to read
+ * @param[in] type - Path type
+ * @param[in] length - length of data to read, in bytes
+ *
+ * @return vector<uint8_t> - The data read from the file.
+ */
+ std::vector<uint8_t> readBinary(const std::string& name,
+ Type type,
+ size_t length);
+
+ /**
* Writes an integer value to the file, therefore doing
* a PMBus write.
*