diff --git a/sensorset.hpp b/sensorset.hpp
index 100ae68..420761f 100644
--- a/sensorset.hpp
+++ b/sensorset.hpp
@@ -4,6 +4,19 @@
 #include <set>
 #include <string>
 
+/**
+ * @class SensorSet
+ * @brief Finds and holds the available hwmon sensors for a device
+ * @details When passed a hwmon device directory on construction,
+ *          this class will find all hwmon sysfs files in that directory
+ *          and store them in a map.  The public begin() and end() methods
+ *          on this class allow traversal of this map.
+ *
+ *          For example, a file named temp5_input will have a map entry of:
+ *
+ *              key:   pair<string, string> = {"temp", "5"}
+ *              value: std::string = "input"
+ */
 class SensorSet
 {
     public:
@@ -12,6 +25,14 @@
         using mapped_type = container_t::mapped_type;
         using key_type = container_t::key_type;
 
+        /**
+         * @brief Constructor
+         * @details Builds a map of the hwmon sysfs files in the passed
+         *          in directory.
+         *
+         * @param[in] path - path to the hwmon device directory
+         *
+         */
         explicit SensorSet(const std::string& path);
         ~SensorSet() = default;
         SensorSet() = delete;
@@ -20,17 +41,34 @@
         SensorSet(SensorSet&&) = default;
         SensorSet& operator=(SensorSet&&) = default;
 
+        /**
+         * @brief Returns an iterator to the beginning of the map
+         *
+         * @return const_iterator
+         */
         container_t::const_iterator begin()
         {
             return const_cast<const container_t&>(container).begin();
         }
 
+        /**
+         * @brief Returns an iterator to the end of the map
+         *
+         * @return const_iterator
+         */
         container_t::const_iterator end()
         {
             return const_cast<const container_t&>(container).end();
         }
 
     private:
+
+        /**
+         * @brief The map of hwmon files in the directory
+         * @details For example:
+         *          key = pair("temp", "1")
+         *          value = "input"
+         */
         container_t container;
 
 };
