NVMeSensor: Split out NVMeContext

An NVMeContext instance contains some number of NVMeSensors, but
NVMeSenors do not need to be concerned with the implementation details
of NVMeContext. Make it easier to discern what's related to what by
splitting NVMeContext out into its own header and source file.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I812a0f7471b0f7150a76964bc353561ac88ca833
diff --git a/include/NVMeContext.hpp b/include/NVMeContext.hpp
new file mode 100644
index 0000000..f2d804a
--- /dev/null
+++ b/include/NVMeContext.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "NVMeSensor.hpp"
+
+#include <boost/asio/deadline_timer.hpp>
+#include <boost/asio/io_service.hpp>
+#include <boost/asio/ip/tcp.hpp>
+
+#include <memory>
+
+struct NVMeContext : std::enable_shared_from_this<NVMeContext>
+{
+    NVMeContext(boost::asio::io_service& io, int rootBus);
+
+    virtual ~NVMeContext();
+
+    void pollNVMeDevices();
+    void close();
+
+    boost::asio::deadline_timer scanTimer;
+    int rootBus; // Root bus for this drive
+    boost::asio::deadline_timer mctpResponseTimer;
+    boost::asio::ip::tcp::socket nvmeSlaveSocket;
+    std::list<std::shared_ptr<NVMeSensor>> sensors; // used as a poll queue
+};
+
+using NVMEMap = boost::container::flat_map<int, std::shared_ptr<NVMeContext>>;
+
+namespace nvmeMCTP
+{
+void init(void);
+}
+
+NVMEMap& getNVMEMap(void);
diff --git a/include/NVMeSensor.hpp b/include/NVMeSensor.hpp
index 02dd6fc..6727693 100644
--- a/include/NVMeSensor.hpp
+++ b/include/NVMeSensor.hpp
@@ -1,8 +1,6 @@
 #pragma once
 
-#include <boost/asio/deadline_timer.hpp>
 #include <boost/asio/io_service.hpp>
-#include <boost/asio/ip/tcp.hpp>
 #include <sensor.hpp>
 
 class NVMeSensor : public Sensor
@@ -25,28 +23,3 @@
 
     void checkThresholds(void) override;
 };
-
-struct NVMeContext : std::enable_shared_from_this<NVMeContext>
-{
-    NVMeContext(boost::asio::io_service& io, int rootBus);
-
-    virtual ~NVMeContext();
-
-    void pollNVMeDevices();
-    void close();
-
-    boost::asio::deadline_timer scanTimer;
-    int rootBus; // Root bus for this drive
-    boost::asio::deadline_timer mctpResponseTimer;
-    boost::asio::ip::tcp::socket nvmeSlaveSocket;
-    std::list<std::shared_ptr<NVMeSensor>> sensors; // used as a poll queue
-};
-
-using NVMEMap = boost::container::flat_map<int, std::shared_ptr<NVMeContext>>;
-
-namespace nvmeMCTP
-{
-void init(void);
-}
-
-NVMEMap& getNVMEMap(void);