本文整理匯總了Python中gnuradio.eng_option.eng_option方法的典型用法代碼示例。如果您正苦於以下問題:Python eng_option.eng_option方法的具體用法?Python eng_option.eng_option怎麽用?Python eng_option.eng_option使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gnuradio.eng_option
的用法示例。
在下文中一共展示了eng_option.eng_option方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with an Airspy and streams the FM audio'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"", "--filter-width", dest="filter_width", type="eng_float", default=eng_notation.num_to_str(20000),
help="Set FM filter width [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(50e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例2: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Streams a WAV 44.1kHz file'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--destination", dest="destination", type="string", default='localhost',
help="Set localhost [default=%default]")
parser.add_option(
"-f", "--input-file", dest="input_file", type="string", default='',
help="Set file [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
return parser
示例3: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with a FUNcube Dongle Pro+ and streams the FM audio'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"", "--filter-width", dest="filter_width", type="eng_float", default=eng_notation.num_to_str(20000),
help="Set FM filter width [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(145e6),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(40e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例4: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with an RTL-SDR and streams the FM audio'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"", "--filter-width", dest="filter_width", type="eng_float", default=eng_notation.num_to_str(20000),
help="Set FM filter width [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(50e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例5: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with an FUNcube Dongle Pro+ and streams the USB audio (3kHz filter)'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(145e6),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(30e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例6: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with an Airspy and streams the wide USB audio (24kHz filter)'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(50e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例7: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with an RTL-SDR and streams the wide USB audio (24kHz filter)'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(50e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例8: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Streams an audio source'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default='localhost',
help="Set localhost [default=%default]")
parser.add_option(
"", "--device", dest="device", type="string", default='',
help="Set device [default=%default]")
return parser
示例9: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with an RTL-SDR and streams the USB audio (3kHz filter)'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(50e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例10: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'Receives with a FUNcube Dongle Pro+ and streams the wide USB audio (24kHz filter)'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set baseband gain [default=%default]")
parser.add_option(
"", "--destination", dest="destination", type="string", default="localhost",
help="Set localhost [default=%default]")
parser.add_option(
"-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(145e6),
help="Set frequency [default=%default]")
parser.add_option(
"", "--freq-corr", dest="freq_corr", type="eng_float", default=eng_notation.num_to_str(0),
help="Set frequency correction (ppm) [default=%default]")
parser.add_option(
"", "--gpredict-port", dest="gpredict_port", type="intx", default=4532,
help="Set GPredict port [default=%default]")
parser.add_option(
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(20),
help="Set IF gain [default=%default]")
parser.add_option(
"", "--offset", dest="offset", type="eng_float", default=eng_notation.num_to_str(40e3),
help="Set centre frequency offset [default=%default]")
parser.add_option(
"", "--port", dest="port", type="intx", default=7355,
help="Set port [default=%default]")
parser.add_option(
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(40),
help="Set RF gain [default=%default]")
return parser
示例11: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
description = 'This file will receive Meteor MN2 using RTL-SDR and will create 72k soft-division file. ' \
'It has no GUI. Ctrl+C or something like that kills the program. Based on original by otti.'
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
parser.add_option(
"", "--ppm", dest="ppm", type="intx", default=63,
help="Set rtl_ppm [default=%default]")
return parser
示例12: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
parser.add_option(
"", "--puncpat", dest="puncpat", type="string", default='11',
help="Set puncpat [default=%default]")
return parser
示例13: argument_parser
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def argument_parser():
parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
parser.add_option(
"", "--frame-size", dest="frame_size", type="intx", default=32,
help="Set Frame Size [default=%default]")
parser.add_option(
"", "--puncpat", dest="puncpat", type="string", default='11',
help="Set puncpat [default=%default]")
return parser
示例14: init_opts
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def init_opts(gr):
parser = OptionParser(option_class=eng_option, usage="%prog: [opts]")
# Capture
capture = OptionGroup(parser, 'Capture settings')
capture.add_option("-o", "--pcap_file", type="string", default='', help="PCAP output file or named pipe (FIFO)")
capture.add_option("-m", "--min_buffer_size", type="int", default=65, help="Minimum buffer size [default=%default]")
capture.add_option("-s", "--sample-rate", type="eng_float", default=gr.sample_rate, help="Sample rate [default=%default]")
capture.add_option("-t", "--squelch_threshold", type="eng_float", default=gr.squelch_threshold, help="Squelch threshold (simple squelch) [default=%default]")
# Low Pass filter
filters = OptionGroup(parser, 'Low-pass filter:')
filters.add_option("-C", "--cutoff_freq", type="eng_float", default=gr.cutoff_freq, help="Filter cutoff [default=%default]")
filters.add_option("-T", "--transition_width", type="eng_float", default=gr.transition_width, help="Filter transition width [default=%default]")
# GMSK demodulation
gmsk = OptionGroup(parser, 'GMSK demodulation:')
gmsk.add_option("-S", "--samples_per_symbol", type="eng_float", default=gr.gmsk_sps, help="Samples per symbol [default=%default]")
gmsk.add_option("-G", "--gain_mu", type="eng_float", default=gr.gmsk_gain_mu, help="Gain mu [default=%default]")
gmsk.add_option("-M", "--mu", type="eng_float", default=gr.gmsk_mu, help="Mu [default=%default]")
gmsk.add_option("-O", "--omega_limit", type="eng_float", default=gr.gmsk_omega_limit, help="Omega limit [default=%default]")
# Bluetooth L
ble= OptionGroup(parser, 'Bluetooth LE:')
ble.add_option("-c", "--current_ble_channels", type="string", default='37,38,39', help="BLE channels to scan [default=%default]")
ble.add_option("-w", "--ble_scan_window", type="eng_float", default=10.24, help="BLE scan window [default=%default]")
ble.add_option("-x", "--disable_crc", action="store_true", default=False, help="Disable CRC verification [default=%default]")
ble.add_option("-y", "--disable_dewhitening", action="store_true", default=False, help="Disable De-Whitening [default=%default]")
parser.add_option_group(capture)
parser.add_option_group(filters)
parser.add_option_group(gmsk)
parser.add_option_group(ble)
return parser.parse_args()
示例15: get_options
# 需要導入模塊: from gnuradio import eng_option [as 別名]
# 或者: from gnuradio.eng_option import eng_option [as 別名]
def get_options(self):
parser = OptionParser(option_class=eng_option)
parser.add_option("-a", "--args", type="string", default="",
help="gr-osmosdr device arguments")
parser.add_option("-d", "--debug", action="store_true", default=False,
help="Print out debug informations")
parser.add_option("-f", "--frequency", type="eng_float", default=394.4e6,
help="set receiver center frequency")
parser.add_option("-g", "--gain", type="eng_float", default=None,
help="set receiver gain")
parser.add_option("-p", "--ppm", type="eng_float", default=0.,
help="Frequency correction as PPM")
parser.add_option("-o", "--output", type=str,
help="output URL (eg file:///<FILE_PATH> or udp://DST_IP:PORT, use %d for channel no.")
parser.add_option("-s", "--sample-rate", type="eng_float", default=1800000,
help="set receiver sample rate (default 1800000, must be multiple of 900000)")
parser.add_option("-t", "--auto-tune", type=int, default=None,
help="Enable automatic PPM corection based on channel N")
parser.add_option("--sig-detection-bw", type="eng_float", default=None,
help="Band width used for detection of noise level, values <= 1. are interpreted as a fraction of sample rate.")
parser.add_option("--sig-detection-threshold", type="eng_float", default=6,
help="Signal strenght (above noise) when channel decoding starts")
parser.add_option("-l", "--listen-port", type=int, default=60200,
help="Listen port for XML-RPC server")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
options.sample_rate = int(options.sample_rate)
if options.sample_rate % 900000:
parser.print_help()
raise SystemExit, 1
return (options)