mainloop: add uniqueness to busname

There can be multiple daemon instances that have the
same devpath which leads to a collision which errors silently.
This adds uniqueness to the path, which was no longer human-readable
to avoid this collision situation.

Tested: Ran on quanta-q71l with unique devices and two instances
pointing to the same device and it correctly set them up with unique
but deterministic bus names.
Change-Id: Id5aea3c3df5f793b28557a74995608ec40792a43
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/mainloop.hpp b/mainloop.hpp
index fec576d..d420c28 100644
--- a/mainloop.hpp
+++ b/mainloop.hpp
@@ -41,6 +41,7 @@
         /** @brief Constructor
          *
          *  @param[in] bus - sdbusplus bus client connection.
+         *  @param[in] param - the path parameter provided
          *  @param[in] path - hwmon sysfs instance to manage
          *  @param[in] devPath - physical device sysfs path.
          *  @param[in] prefix - DBus busname prefix.
@@ -54,6 +55,7 @@
          */
         MainLoop(
             sdbusplus::bus::bus&& bus,
+            const std::string& param,
             const std::string& path,
             const std::string& devPath,
             const char* prefix,
@@ -84,6 +86,8 @@
         sdbusplus::bus::bus _bus;
         /** @brief sdbusplus freedesktop.ObjectManager storage. */
         sdbusplus::server::manager::manager _manager;
+        /** @brief the parameter path used. */
+        std::string _pathParam;
         /** @brief hwmon sysfs class path. */
         std::string _hwmonRoot;
         /** @brief hwmon sysfs instance. */