Add function to handle a new input history record

This function will take a raw input power history
record and add it to the record manager cache.

The record manager will parse the raw record, validate
its sequence ID, and place it in the front of its
internal queue.  It prunes its queue if it needs to
or clears it out if the sequence ID is out of order.

Change-Id: I25eca05f30b45ae97801ff99a083cc8fd97a688a
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-supply/record_manager.hpp b/power-supply/record_manager.hpp
index 73459df..e1a2cfc 100644
--- a/power-supply/record_manager.hpp
+++ b/power-supply/record_manager.hpp
@@ -53,6 +53,7 @@
 
         static constexpr auto RAW_RECORD_SIZE = 5;
         static constexpr auto RAW_RECORD_ID_OFFSET = 0;
+        static constexpr auto FIRST_SEQUENCE_ID = 0;
         static constexpr auto LAST_SEQUENCE_ID = 0xFF;
 
         using DBusRecord = std::tuple<uint64_t, int64_t>;
@@ -91,6 +92,22 @@
         }
 
         /**
+         * @brief Adds a new entry to the history
+         *
+         * Also checks to see if the old history should be
+         * cleared, such as when there is an invalid record
+         * sequence ID or if there was no data from the PS.
+         *
+         * @param[in] rawRecord - the record data straight
+         *                    from the power supply
+         *
+         * @return bool - If there has been a change to the
+         *                history records that needs to be
+         *                reflected in D-Bus.
+         */
+        bool add(const std::vector<uint8_t>& rawRecord);
+
+        /**
          * @brief Converts a Linear Format power number to an integer
          *
          * The PMBus spec describes a 2 byte Linear Format