Add ability to enable input history collection

Calling the enableHistory() function will create new
RecordManager, Average, and Maximum instances.

Future commits will build on this to do the collection
if these classes were created.

Change-Id: I6453d303eb09bdfd1a6f0b520369adb51ca7162c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index f8c86e3..00e3b8c 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -749,6 +749,25 @@
     }
 }
 
+void PowerSupply::enableHistory(const std::string& objectPath,
+                                size_t numRecords,
+                                const std::string& syncGPIOPath,
+                                size_t syncGPIONum)
+{
+    historyObjectPath = objectPath;
+    syncGPIODevPath = syncGPIOPath;
+    syncGPIONumber = syncGPIONum;
+
+    recordManager = std::make_unique<history::RecordManager>(numRecords);
+
+    auto avgPath = historyObjectPath + '/' + history::Average::name;
+    auto maxPath = historyObjectPath + '/' + history::Maximum::name;
+
+    average = std::make_unique<history::Average>(bus, avgPath);
+
+    maximum = std::make_unique<history::Maximum>(bus, maxPath);
+}
+
 }
 }
 }