Ejemplo n.º 1
0
  def add_options(normal, expert):
    """
    Adds usrp-specific options to the Options Parser
    """
    common_tx_rx_usrp_options(normal,expert)
    transmit_path.add_options(normal,expert)

    normal.add_option("-T", "--tx-subdev-spec", type="subdev", default=None,
                      help="select USRP Tx side A or B")
    expert.add_option("", "--tx-freq", type="eng_float", default=None,
                      help="set transmit frequency to FREQ [default=%default]", metavar="FREQ")
    normal.add_option("", "--measure", action="store_true", default=False,
                      help="enable troughput measure, usrp disabled");
                      
    normal.add_option("", "--dyn-freq", action="store_true", default=False,
                      help="enable troughput measure, usrp disabled");

    expert.add_option("", "--snr", type="eng_float", default=None,
                      help="Simulate AWGN channel");
    expert.add_option("", "--freqoff", type="eng_float", default=None,
                      help="Simulate frequency offset [default=%default]")
    expert.add_option("", "--samplingoffset", type="eng_float", default=None,
                      help="Simulate sampling frequency offset [default=%default]")
    expert.add_option("", "--berm", action="store_true", default=False,
                      help="Enable static AWGN power for BER measurement")

    expert.add_option("", "--online-work", action="store_true", default=False,
                      help="Force the ofdm transmitter to work during file record [default=%default]")
    normal.add_option("", "--from-file", type="string", default=None,
                      help="Sent recorded stream with usrp")
    normal.add_option("", "--to-file", type="string", default=None,
                      help="Record transmitter to disk, not being sent to usrp")

    expert.add_option("", "--force-filter", action="store_true", default=False,
                      help="force filter use while transmitting to file or measuring")
    
    expert.add_option("", "--nullsink", action="store_true",
                      default=False,
                      help="Throw away samples")
    
    normal.add_option("-e", "--interface", type="string", default="eth0",
                          help="select Ethernet interface, default is eth0")
    normal.add_option("-m", "--mac-addr", type="string", default="",
                          help="select USRP by MAC address, default is auto-select")
    normal.add_option("", "--usrp2", action="store_true", default=False,
                      help="Use USRP2 Interface")
    

    expert.add_option("", "--record", action="store_true",
                      default=False,
                      help="Record transmission stream")
    
    expert.add_option("", "--stations", type="intx", default=1,
                      help="Mobile station count")
    
    normal.add_option("", "--coding", action="store_true",
              default=False,
              help="Enable channel coding")
    expert.add_option("", "--est-preamble", type="int", default=1,
                      help="the number of channel estimation preambles (1 or 2)");
Ejemplo n.º 2
0
def main():
    parser = OptionParser(conflict_handler="resolve")
    expert_grp = parser.add_option_group("Expert")

    ofdm_benchmark.add_options(parser, expert_grp)
    transmit_path.add_options(parser, expert_grp)
    receive_path.add_options(parser, expert_grp)
    fusb_options.add_options(expert_grp)

    parser.add_option("-c",
                      "--cfg",
                      action="store",
                      type="string",
                      default=None,
                      help="Specifiy configuration file, default: none",
                      config="false")

    (options, args) = parser.parse_args()

    if options.cfg is not None:
        (options, args) = parser.parse_args(files=[options.cfg])
        print "Using configuration file %s" % (options.cfg)

    benchmark = ofdm_benchmark(options)
    runtime = benchmark

    r = gr.enable_realtime_scheduling()
    if r != gr.RT_OK:
        print "Couldn't enable realtime scheduling"
    else:
        print "Enabled realtime scheduling"

    try:
        orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
        string_benchmark = runtime.dot_graph()

        dot_file = open("benchmark_mimo21.dot", 'w')
        dot_file.write(string_benchmark)
        dot_file.close()

        runtime.start()
        try:
            tx.txpath._control._id_source.ready()
        except:
            pass
        orb.run()
    except KeyboardInterrupt:
        runtime.stop()

        runtime.wait()

    if options.measure:
        print "min", tx.m.get_min()
        print "max", tx.m.get_max()
        print "avg", tx.m.get_avg()
Ejemplo n.º 3
0
def main():
  parser = OptionParser(conflict_handler="resolve")
  expert_grp = parser.add_option_group("Expert")

  ofdm_benchmark.add_options(parser, expert_grp)
  transmit_path.add_options(parser, expert_grp)
  receive_path.add_options(parser, expert_grp)
  fusb_options.add_options(expert_grp)

  parser.add_option( 
    "-c", "--cfg",
    action="store", type="string", default=None,
    help="Specifiy configuration file, default: none",
    config="false" )
  
  (options, args) = parser.parse_args()
  
  if options.cfg is not None:
    (options,args) = parser.parse_args(files=[options.cfg])
    print "Using configuration file %s" % ( options.cfg )

  benchmark = ofdm_benchmark(options)
  runtime = benchmark

  r = gr.enable_realtime_scheduling()
  if r != gr.RT_OK:
    print "Couldn't enable realtime scheduling"
  else:
    print "Enabled realtime scheduling"

  try:
    orb = CORBA.ORB_init(sys.argv,CORBA.ORB_ID)
    string_benchmark = runtime.dot_graph()
    
    dot_file = open("benchmark_mimo.dot",'w')
    dot_file.write(string_benchmark)
    dot_file.close()
    
    runtime.start()
    try:
      tx.txpath._control._id_source.ready()
    except:
      pass
    orb.run()
  except KeyboardInterrupt:
    runtime.stop()

    runtime.wait()
    

  if options.measure:
    print "min",tx.m.get_min()
    print "max",tx.m.get_max()
    print "avg",tx.m.get_avg()
Ejemplo n.º 4
0
    def add_options(normal, expert):
        """
    Adds usrp-specific options to the Options Parser
    """
        common_tx_rx_usrp_options(normal, expert)
        transmit_path.add_options(normal, expert)

        normal.add_option("-T",
                          "--tx-subdev-spec",
                          type="subdev",
                          default=None,
                          help="select USRP Tx side A or B")
        expert.add_option(
            "",
            "--tx-freq",
            type="eng_float",
            default=None,
            help="set transmit frequency to FREQ [default=%default]",
            metavar="FREQ")
        normal.add_option("",
                          "--measure",
                          action="store_true",
                          default=False,
                          help="enable troughput measure, usrp disabled")

        normal.add_option("",
                          "--dyn-freq",
                          action="store_true",
                          default=False,
                          help="enable troughput measure, usrp disabled")

        expert.add_option("",
                          "--snr",
                          type="eng_float",
                          default=None,
                          help="Simulate AWGN channel")
        expert.add_option("",
                          "--freqoff",
                          type="eng_float",
                          default=None,
                          help="Simulate frequency offset [default=%default]")
        expert.add_option(
            "",
            "--samplingoffset",
            type="eng_float",
            default=None,
            help="Simulate sampling frequency offset [default=%default]")
        expert.add_option("",
                          "--berm",
                          action="store_true",
                          default=False,
                          help="Enable static AWGN power for BER measurement")

        expert.add_option(
            "",
            "--online-work",
            action="store_true",
            default=False,
            help=
            "Force the ofdm transmitter to work during file record [default=%default]"
        )
        normal.add_option("",
                          "--from-file",
                          type="string",
                          default=None,
                          help="Sent recorded stream with usrp")
        normal.add_option(
            "",
            "--to-file",
            type="string",
            default=None,
            help="Record transmitter to disk, not being sent to usrp")

        expert.add_option(
            "",
            "--force-filter",
            action="store_true",
            default=False,
            help="force filter use while transmitting to file or measuring")

        expert.add_option("",
                          "--nullsink",
                          action="store_true",
                          default=False,
                          help="Throw away samples")

        normal.add_option("-e",
                          "--interface",
                          type="string",
                          default="eth0",
                          help="select Ethernet interface, default is eth0")
        normal.add_option(
            "-m",
            "--mac-addr",
            type="string",
            default="",
            help="select USRP by MAC address, default is auto-select")
        normal.add_option("",
                          "--usrp2",
                          action="store_true",
                          default=False,
                          help="Use USRP2 Interface")

        expert.add_option("",
                          "--record",
                          action="store_true",
                          default=False,
                          help="Record transmission stream")

        expert.add_option("",
                          "--stations",
                          type="intx",
                          default=1,
                          help="Mobile station count")

        normal.add_option("",
                          "--coding",
                          action="store_true",
                          default=False,
                          help="Enable channel coding")
        expert.add_option(
            "",
            "--est-preamble",
            type="int",
            default=1,
            help="the number of channel estimation preambles (1 or 2)")
Ejemplo n.º 5
0
  def add_options(normal, expert):
    """
    Adds usrp-specific options to the Options Parser
    """
    common_tx_rx_usrp_options(normal,expert)
    transmit_path.add_options(normal,expert)
    receive_path.add_options(normal,expert)

#    normal.add_option("-T", "--tx-subdev-spec", type="subdev", default=None,
#                      help="select USRP Tx side A or B")
#    expert.add_option("", "--tx-freq", type="eng_float", default=None,
#                      help="set transmit frequency to FREQ [default=%default]", metavar="FREQ")
    normal.add_option("", "--measure", action="store_true", default=False,
                      help="enable troughput measure, usrp disabled");
                      
#    normal.add_option("", "--dyn-freq", action="store_true", default=False,
#                      help="enable troughput measure, usrp disabled");

    expert.add_option("", "--snr", type="eng_float", default=None,
                      help="Simulate AWGN channel");
    expert.add_option("", "--freqoff", type="eng_float", default=None,
                      help="Simulate frequency offset [default=%default]")
    expert.add_option("", "--samplingoffset", type="eng_float", default=None,
                      help="Simulate sampling frequency offset [default=%default]")
    expert.add_option("", "--multipath", action="store_true", default=False,
                      help="Enable multipath channel")
    expert.add_option("", "--itu-channel", action="store_true", default=False,
                      help="Enable itu channel model (ported from itpp)")

    expert.add_option("", "--online-work", action="store_true", default=False,
                      help="Force the ofdm transmitter to work during file record [default=%default]")
#    normal.add_option("", "--from-file", type="string", default=None,
#                      help="Sent recorded stream with usrp")
#    normal.add_option("", "--to-file", type="string", default=None,
#                      help="Record transmitter to disk, not being sent to usrp")

    expert.add_option("", "--force-tx-filter", action="store_true", default=False,
                      help="force filter use while transmitting to file or measuring")
    
    expert.add_option("", "--force-rx-filter", action="store_true", default=False,
                      help="force filter use while transmitting to file or measuring")
    
    expert.add_option("", "--nullsink", action="store_true",
                      default=False,
                      help="Throw away samples")

    expert.add_option("", "--record", action="store_true",
                      default=False,
                      help="Record transmission stream")
    expert.add_option("", "--berm", action="store_true",
                      default=False,
                      help="BER measurement -> set fixed noise power ")
    
    expert.add_option("", "--stations", type="intx", default=1,
                      help="Mobile station count")
    
    expert.add_option("", "--sinr-est", action="store_true", default=False,
                      help="Enable SINR per subcarrier estimation [default=%default]")
    
    normal.add_option(
      "", "--event-rxbaseband",
      action="store_true", default=False,
      help = "Enable RX baseband via event channel alps" )
    normal.add_option("", "--with-old-gui", action="store_true", default=False,
                      help="Turn of CORBA interfaces to support old GUI")

    normal.add_option(
      "", "--imgxfer",
      action="store_true", default=False,
      help="Enable IMG Transfer mode")
    
    normal.add_option("", "--coding", action="store_true",
              default=False,
              help="Enable channel coding")
    normal.add_option("", "--nopunct", action="store_true",
              default=False,
              help="Disable puncturing/depuncturing")
    expert.add_option("", "--est-preamble", type="int", default=1,
                      help="the number of channel estimation preambles (1 or 2)");