当前位置: 首页>>代码示例>>Python>>正文


Python eng_option.eng_option方法代码示例

本文整理汇总了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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:36,代码来源:airspy_fm.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:15,代码来源:wav_44kHz.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:36,代码来源:fcdpp_fm.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:36,代码来源:rtlsdr_fm.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:33,代码来源:fcdpp_usb.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:33,代码来源:airspy_usb_wide.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:33,代码来源:rtlsdr_usb_wide.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:15,代码来源:audio_streamer.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:33,代码来源:rtlsdr_usb.py

示例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 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:33,代码来源:fcdpp_usb_wide.py

示例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 
开发者ID:cyber-atomus,项目名称:autowx,代码行数:10,代码来源:meteor_qpsk.py

示例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 
开发者ID:ClydeSpace-GroundStation,项目名称:GroundStation,代码行数:8,代码来源:top_block.py

示例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 
开发者ID:ClydeSpace-GroundStation,项目名称:GroundStation,代码行数:11,代码来源:top_block.py

示例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() 
开发者ID:drtyhlpr,项目名称:ble_dump,代码行数:36,代码来源:ble_dump.py

示例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) 
开发者ID:itds-consulting,项目名称:tetra-listener,代码行数:37,代码来源:tetra_rx_multi.py


注:本文中的gnuradio.eng_option.eng_option方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。