コード例 #1
0
ファイル: rx_mimo.py プロジェクト: WindyCitySDR/gr-ofdm
    def __init__(self, options):
        gr.top_block.__init__(self)

        if(options.rx_freq is not None):
            if options.rx_ant == 1:
                self.source = uhd_receiver(options.args,
                                       options.bandwidth, options.rx_freq,
                                       options.lo_offset, options.rx_gain,
                                       options.spec, options.antenna,
                                       options.clock_source, options.time_source,options.verbose)
            else:
                self.source = uhd_mimo_receiver(options.args,
                                       options.bandwidth, options.rx_freq,
                                       options.lo_offset, options.rx_gain,
                                       options.spec, options.antenna,
                                       options.clock_source, options.time_source, options.verbose)
        elif(options.from_file is not None):
            self.source = blocks.file_source(gr.sizeof_gr_complex, options.from_file)
        else:
            self.source = blocks.null_source(gr.sizeof_gr_complex)
        if (options.rx_ant == 1):
            self._setup_rx_path(options)
            self._setup_rpc_manager()
            self.dst    = (self.rxpath,0)
            self.connect((self.source,0), self.dst)
        else:
            self._setup_rx_path(options)
            self._setup_rpc_manager()
            self.dst    = (self.rxpath,0)
            self.dst2     = (self.rxpath,1)
            self.connect((self.source,0), self.dst)
            self.connect((self.source,1), self.dst2)
コード例 #2
0
ファイル: rx.py プロジェクト: luwangg/gr-ofdm-1
    def __init__(self, options):
        gr.top_block.__init__(self)

        if (options.rx_freq is not None):
            if options.rx_ant == 1:
                self.source = uhd_receiver(
                    options.args, options.bandwidth, options.rx_freq,
                    options.lo_offset, options.rx_gain, options.spec,
                    options.antenna, options.clock_source, options.time_source,
                    options.verbose)
            else:
                self.source = uhd_mimo_receiver(
                    options.args, options.bandwidth, options.rx_freq,
                    options.lo_offset, options.rx_gain, options.spec,
                    options.antenna, options.clock_source, options.time_source,
                    options.verbose)
        elif (options.from_file is not None):
            self.file = blocks.file_source(gr.sizeof_gr_complex,
                                           options.from_file)
            self.source = blocks.throttle(gr.sizeof_gr_complex, 1e7)
            self.connect(self.file, self.source)
        else:
            self.source = blocks.null_source(gr.sizeof_gr_complex)
        '''
        if options.tx_ant == 1:
            if options.rx_ant == 1:
                self.rxpath = receive_path(options)
                self._setup_rpc_manager()
                self.connect(self.source, self.rxpath)
            else:
                self.rxpath = receive_path_12(options)
                self._setup_rpc_manager()
                self.connect(self.source, self.rxpath)
                self.connect((self.source,1), (self.rxpath,1))
                '''
        if (options.rx_ant == 1):
            self._setup_rx_path(options)
            self.setup_rpc_manager()
            self.dst = (self.rxpath, 0)
            self.connect((self.source, 0), self.dst)
        else:
            self._setup_rx_path(options)
            self.setup_rpc_manager()
            self.dst = (self.rxpath, 0)
            self.dst2 = (self.rxpath, 1)
            self.connect((self.source, 0), self.dst)
            self.connect((self.source, 1), self.dst2)

        if options.scatterplot:
            print "Scatterplot enabled"
コード例 #3
0
ファイル: rx.py プロジェクト: WindyCitySDR/gr-ofdm
    def __init__(self, options):
        gr.top_block.__init__(self)

        if(options.rx_freq is not None):
            if options.rx_ant == 1:
                self.source = uhd_receiver(options.args,
                                       options.bandwidth, options.rx_freq,
                                       options.lo_offset, options.rx_gain,
                                       options.spec, options.antenna,
                                       options.clock_source, options.time_source,options.verbose)
            else:
                self.source = uhd_mimo_receiver(options.args,
                                       options.bandwidth, options.rx_freq,
                                       options.lo_offset, options.rx_gain,
                                       options.spec, options.antenna,
                                       options.clock_source, options.time_source, options.verbose)
        elif(options.from_file is not None):
            self.file = blocks.file_source(gr.sizeof_gr_complex, options.from_file)
            self.source = blocks.throttle(gr.sizeof_gr_complex,1e7)
            self.connect( self.file, self.source )
        else:
            self.source = blocks.null_source(gr.sizeof_gr_complex)
        '''
        if options.tx_ant == 1:
            if options.rx_ant == 1:
                self.rxpath = receive_path(options)
                self._setup_rpc_manager()
                self.connect(self.source, self.rxpath)
            else:
                self.rxpath = receive_path_12(options)
                self._setup_rpc_manager()
                self.connect(self.source, self.rxpath)
                self.connect((self.source,1), (self.rxpath,1))
                '''
        if (options.rx_ant == 1):
            self._setup_rx_path(options)
            self.setup_rpc_manager()
            self.dst    = (self.rxpath,0)
            self.connect((self.source,0), self.dst)
        else:
            self._setup_rx_path(options)
            self.setup_rpc_manager()
            self.dst    = (self.rxpath,0)
            self.dst2     = (self.rxpath,1)
            self.connect((self.source,0), self.dst)
            self.connect((self.source,1), self.dst2)

        if options.scatterplot:
          print "Scatterplot enabled"