ruby: network: garnet: remove functions for computing power
[gem5.git] / src / dev / terminal.hh
index d2499b6b29f4f91e2ad3d86252a76cf08eb84abe..f7a860ac5c07bde70d678dd1bcfecc5c229814f1 100644 (file)
 
 #include <iostream>
 
+#include "base/callback.hh"
 #include "base/circlebuf.hh"
-#include "cpu/intr_control.hh"
 #include "base/pollevent.hh"
 #include "base/socket.hh"
-#include "sim/sim_object.hh"
+#include "cpu/intr_control.hh"
 #include "params/Terminal.hh"
+#include "sim/sim_object.hh"
 
 class TerminalListener;
-class Uart;
 
 class Terminal : public SimObject
 {
   public:
-    Uart *uart;
+    /**
+     * Register a data available callback into the transport layer.
+     *
+     * The terminal needs to call the underlying transport layer to
+     * inform it of available data. The transport layer uses this
+     * method to register a callback that informs it of pending data.
+     *
+     * @param c Callback instance from transport layer.
+     */
+    void regDataAvailCallback(Callback *c);
+
+  protected:
+    /** Currently registered transport layer callbacks */
+    Callback *termDataAvail;
 
   protected:
     class ListenEvent : public PollEvent