A bit of buffer metadata reshuffling to accommodate flow_id
[vpp.git] / src / vpp-api / vom / hw.hpp
index 77ae5c3..9ba4750 100644 (file)
 
 #include <deque>
 #include <map>
+#include <queue>
 #include <sstream>
 #include <string>
 #include <thread>
 
+#include "vom/cmd.hpp"
 #include "vom/connection.hpp"
 #include "vom/types.hpp"
 
@@ -212,16 +214,6 @@ public:
      */
     virtual void enqueue(std::queue<cmd*>& c);
 
-    /**
-     * dequeue a command from the Q.
-     */
-    virtual void dequeue(cmd* c);
-
-    /**
-     * dequeue a command from the Q.
-     */
-    virtual void dequeue(std::shared_ptr<cmd> c);
-
     /**
      * Write all the commands to HW
      */
@@ -230,7 +222,12 @@ public:
     /**
      * Blocking Connect to VPP - call once at bootup
      */
-    void connect();
+    virtual bool connect();
+
+    /**
+     * Disconnect to VPP
+     */
+    virtual void disconnect();
 
     /**
      * Disable the passing of commands to VPP. Whilst disabled all
@@ -309,16 +306,6 @@ public:
    */
   static void enqueue(std::queue<cmd*>& c);
 
-  /**
-   * dequeue A command for execution
-   */
-  static void dequeue(cmd* f);
-
-  /**
-   * dequeue A command for execution
-   */
-  static void dequeue(std::shared_ptr<cmd> c);
-
   /**
    * Write/Execute all commands hitherto enqueued.
    */
@@ -327,7 +314,12 @@ public:
   /**
    * Blocking Connect to VPP
    */
-  static void connect();
+  static bool connect();
+
+  /**
+   * Disconnect to VPP
+   */
+  static void disconnect();
 
   /**
    * Blocking pool of the HW connection