Add functions to return the averages and maximums
Add functions to return the input history in a format
that can be used to write the D-Bus properties.
Change-Id: I7a395568dcdce89b5f3e4b6a73d58dc84adaaa7c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-supply/record_manager.hpp b/power-supply/record_manager.hpp
index e1a2cfc..8504803 100644
--- a/power-supply/record_manager.hpp
+++ b/power-supply/record_manager.hpp
@@ -108,6 +108,24 @@
bool add(const std::vector<uint8_t>& rawRecord);
/**
+ * @brief Returns the history of average input power
+ * in a representation used by D-Bus.
+ *
+ * @return DBusRecordList - A list of averages with
+ * a timestamp for each entry.
+ */
+ DBusRecordList getAverageRecords();
+
+ /**
+ * @brief Returns the history of maximum input power
+ * in a representation used by D-Bus.
+ *
+ * @return DBusRecordList - A list of maximums with
+ * a timestamp for each entry.
+ */
+ DBusRecordList getMaximumRecords();
+
+ /**
* @brief Converts a Linear Format power number to an integer
*
* The PMBus spec describes a 2 byte Linear Format