]> git.gag.com Git - debian/gnuradio/commitdiff
Fixed tunnel.py to properly call send_pkt. Runs on USRP although I can't fully test it.
authortrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 14 Jan 2008 14:06:01 +0000 (14:06 +0000)
committertrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 14 Jan 2008 14:06:01 +0000 (14:06 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7435 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-examples/python/ofdm/tunnel.py

index 952c8dc951b7399a956f70bb5c20725803c9f8a7..74f0f04d7846f3715f1dd75c6144cedbd481a60d 100755 (executable)
@@ -278,7 +278,7 @@ class cs_mac(object):
     def __init__(self, tun_fd, verbose=False):
         self.tun_fd = tun_fd       # file descriptor for TUN/TAP interface
         self.verbose = verbose
-        self.fg = None             # flow graph (access to PHY)
+        self.tb = None             # top block (access to PHY)
 
     def set_flow_graph(self, tb):
         self.tb = tb
@@ -307,7 +307,7 @@ class cs_mac(object):
         while 1:
             payload = os.read(self.tun_fd, 10*1024)
             if not payload:
-                self.tb.send_pkt(eof=True)
+                self.tb.txpath.send_pkt(eof=True)
                 break
 
             if self.verbose:
@@ -320,7 +320,7 @@ class cs_mac(object):
                 if delay < 0.050:
                     delay = delay * 2       # exponential back-off
 
-            self.tb.send_pkt(payload)
+            self.tb.txpath.send_pkt(payload)
 
 
 # /////////////////////////////////////////////////////////////////////////////