3 # Copyright 2007 Free Software Foundation, Inc.
5 # This file is part of GNU Radio
7 # GNU Radio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
12 # GNU Radio is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Radio; see the file COPYING. If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street,
20 # Boston, MA 02110-1301, USA.
23 from gnuradio import gr, eng_notation
24 from gnuradio.eng_option import eng_option
25 from optparse import OptionParser
26 from dect_receiver import dect_receiver
30 parser = OptionParser(option_class=eng_option)
31 parser.add_option("-R", "--rx-subdev-spec", type="subdev", default=None,
32 help="select USRP Rx side A or B (default=first one with a daughterboard)")
33 parser.add_option("-f", "--freq", type="eng_float", default=None,
34 help="set frequency to FREQ", metavar="FREQ")
35 parser.add_option("", "--calibration", type="eng_float", default=0.0,
36 help="set frequency calibration offset to FREQ")
37 parser.add_option("-g", "--gain", type="eng_float", default=None,
38 help="set gain in dB (default is midpoint)")
39 parser.add_option("-v", "--verbose", action="store_true", default=False,
40 help="print extra debugging info")
41 parser.add_option("", "--log-baseband", default=None,
42 help="log filtered baseband to file")
43 parser.add_option("", "--log-demod", default=None,
44 help="log demodulator output to file")
45 (options, args) = parser.parse_args()
47 if len(sys.argv) == 1 or len(args) != 0:
51 # Create an instance of a hierarchical block
52 top_block = dect_receiver(options)
57 except KeyboardInterrupt:
61 if __name__ == '__main__':