Forum: GNU Radio Terminate the receiver

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4f23ce70930197295cbf054e998c79b9?d=identicon&s=25 Brook Lin (Guest)
on 2009-02-27 04:19
(Received via mailing list)
Hi All,

I am working on the OFDM project. When I run sudo
./benchmark_ofdm_rx_video.py -f 450M -R A -v -d 32 --fft-length 128
--occupied-tones 100 --cp-length 32, I want to terminate the process if
the
pktno>100. I tried:

def main():
    ........
    def rx_callback(ok, payload):
        global n_rcvd, n_right
        n_rcvd += 1
        (pktno,) = struct.unpack('!H', payload[0:2])
        if ok:
            n_right += 1
        print "ok: %r \t pktno: %d \t n_rcvd: %d \t n_right: %d" % (ok,
pktno, n_rcvd, n_right)

        if pktno > 250:
            raise SystemExit(0)
        ......

However, it just stops to receive when pktno>100. The output is like:
......
ok: True    pktno: 249    n_rcvd: 243    n_right: 243
ok: True    pktno: 250    n_rcvd: 244    n_right: 244
ok: True    pktno: 251    n_rcvd: 245    n_right: 245


Actrually, I want to terminate the process, and give a new parameter,
say
sudo ./benchmark_ofdm_rx_video.py -f 460M -R A -v -d 32 --fft-length 128
--occupied-tones 100 --cp-length 32. How can I achieve it?

Thanks,
Brook

--
View this message in context:
http://www.nabble.com/Terminate-the-receiver-tp222...
Sent from the GnuRadio mailing list archive at Nabble.com.
This topic is locked and can not be replied to.