[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] displaying data
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] displaying data |
Date: |
Tue, 6 Jan 2009 21:45:46 -0800 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Jan 07, 2009 at 12:52:50PM +0800, Joreen Tan wrote:
>
> Hi,
>
> How do i display the data received from benchmark_rx.py?
>
> As in, after this line, "demods = modulation_utils.type_1_demods()"
> which also means demodulating the received signal. how do i actually make use
> of the signal received and then print it out on the terminal?Regards,Joreen
def rx_callback(ok, payload):
global n_rcvd, n_right
(pktno,) = struct.unpack('!H', payload[0:2])
n_rcvd += 1
if ok:
n_right += 1
print "ok = %5s pktno = %4d n_rcvd = %4d n_right = %4d" % (
ok, pktno, n_rcvd, n_right)
# do whatever you like with payload. We just stuck a packet
# number in the first two bytes for testing...
If this doesn't make sense, be sure to spend some time with the
excellent python tutorial http://www.python.org/doc
Eric