Add function to read code version

Read the BMC code version once at startup.  This will
be added to error logs in future commits.

The code is getting the version from a file instead
of from D-Bus in order to reduce dependencies.

Tested: Call the function and check that it returned the
        correct thing.

Change-Id: I9a4729e946a130ec32c375c283fd22a7658121f5
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/log_manager.hpp b/log_manager.hpp
index d62a25e..d5ca4e9 100644
--- a/log_manager.hpp
+++ b/log_manager.hpp
@@ -54,7 +54,8 @@
         Manager(sdbusplus::bus::bus& bus, const char* objPath) :
                 details::ServerObject<details::ManagerIface>(bus, objPath),
                 busLog(bus),
-                entryId(0){};
+                entryId(0),
+                fwVersion(readFWVersion()) {};
 
         /*
          * @fn commit()
@@ -136,6 +137,12 @@
          */
         void journalSync();
 
+        /** @brief Reads the BMC code level
+         *
+         *  @return std::string - the version string
+         */
+        static std::string readFWVersion();
+
         /** @brief Persistent sdbusplus DBus bus connection. */
         sdbusplus::bus::bus& busLog;
 
@@ -150,6 +157,9 @@
 
         /** @brief Id of last error log entry */
         uint32_t entryId;
+
+        /** @brief The BMC firmware version */
+        const std::string fwVersion;
 };
 
 } //namespace internal