Ali Siddiqi wrote:
If no data received
Dan
Discuss-gnuradio Info Page
Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page
Hi,
Here’s a short cut-out with the code I’ve used:
class transceiver(gr.top_block):
def init(self, rx_callback):
gr.top_block.init(self)
self.usrp_decim = 16
u=usrp.source_c(0, self.usrp_decim)
self.rxpath=oqpsk_rx_graph(rx_callback,u)
self.connect(self.rxpath)
self.txpath=transmit_path()
self.connect(self.txpath)
class cs_mac(wx.Frame):
def init(self, parent, id, title):
wx.Frame.init(self, parent, id, title, size=(0, 0))
self.SenseTimer=wx.Timer(self, id=0)
self.Bind(wx.EVT_TIMER, self.OnSenseTimer, id=0)
def OnSenseTimer(self,event):
tb.rxpath.u.tune(tb.rxpath.subdev._which, tb.rxpath.subdev,
2405000000+(op.current_channel-11)*5000000)
class ieee_transceiver(wx.App):
def OnInit(self):
global tb
global frame
frame=cs_mac(None, -1, '')
tb=transceiver(frame.rx_callback)
frame.Show(False)
try:
tb.start()
except:
print "start except"
return True
if name == ‘main’:
try:
application=ieee_transceiver(0)
application.MainLoop()
except KeyboardInterrupt:
pass
As you can see the timer will change rx-frequency on timeout. Hope this
code
will be helpful even though it’s poorly commented.
Regards,
Dan
View this message in context:
http://www.nabble.com/Editing-benchmark_rx.py-for-spectrum-access-tp24528535p24786838.html
Sent from the GnuRadio mailing list archive at Nabble.com.