Example #1
0
    def __init__(self, rx_callback, options):

        gr.hier_block2.__init__(self, "receive_path",
                                gr.io_signature(1, 1, gr.sizeof_gr_complex),
                                gr.io_signature(0, 0, 0))

        options = copy.copy(
            options)  # make a copy so we can destructively modify

        self._verbose = options.verbose
        self._log = options.log
        self._rx_callback = rx_callback  # this callback is fired when there's a packet available

        # receiver
        self.ofdm_rx = ofdm.ofdm_demod(options, callback=self._rx_callback)

        # Carrier Sensing Blocks
        alpha = 0.001
        thresh = 30  # in dB, will have to adjust
        self.probe = gr.probe_avg_mag_sqrd_c(thresh, alpha)

        self.connect(self, self.ofdm_rx)
        self.connect(self.ofdm_rx, self.probe)
        #        if options.precoding:
        #            self.connect((self.ofdm_rx,1), (self,0))  # output CFO value

        # Display some information about the setup
        if self._verbose:
            self._print_verbage()
Example #2
0
    def __init__(self, rx_callback, options):

	gr.hier_block2.__init__(self, "receive_path",
				gr.io_signature(1, 1, gr.sizeof_gr_complex),
				gr.io_signature(0, 0, 0))


        options = copy.copy(options)    # make a copy so we can destructively modify

        self._verbose     = options.verbose
        self._log         = options.log
        self._rx_callback = rx_callback      # this callback is fired when there's a packet available

        # receiver
        self.ofdm_rx = ofdm.ofdm_demod(options,
                                          callback=self._rx_callback)

        # Carrier Sensing Blocks
        alpha = 0.001
        thresh = 30   # in dB, will have to adjust
        self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha)

        self.connect(self, self.ofdm_rx)
        self.connect(self.ofdm_rx, self.probe)
#        if options.precoding:
#            self.connect((self.ofdm_rx,1), (self,0))  # output CFO value

        # Display some information about the setup
        if self._verbose:
            self._print_verbage()
Example #3
0
    def __init__(self, rx_callback, options):

        gr.hier_block2.__init__(
            self, "receive_path", gr.io_signature(1, 1, gr.sizeof_gr_complex), gr.io_signature(0, 0, 0)
        )

        options = copy.copy(options)  # make a copy so we can destructively modify

        self._verbose = options.verbose
        self._log = options.log
        self._rx_callback = rx_callback  # this callback is fired when there's a packet available

        coder = None
        if options.rs_n and options.rs_k:
            if module_exists("reedsolomon"):
                print "INIT REED SOLOMON WITH " + str(options.rs_n) + "/" + str(options.rs_k)
                import reedsolomon

                coder = reedsolomon.Codec(options.rs_n, options.rs_k)

        # receiver
        self.ofdm_rx = ofdm_demod(options, callback=self._rx_callback, coder=coder)
        # Carrier Sensing Blocks
        alpha = 0.001
        thresh = 30  # in dB, will have to adjust
        self.probe = gr.probe_avg_mag_sqrd_c(thresh, alpha)

        self.connect(self, self.ofdm_rx)
        self.connect(self.ofdm_rx, self.probe)

        # Display some information about the setup
        if self._verbose:
            self._print_verbage()
Example #4
0
	def __init__(self, rx_callback, options):
		gr.hier_block2.__init__(self, "receive_path",
				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
				gr.io_signature(0, 0, 0))                    # Output signature

		options = copy.copy(options)    # make a copy so we can destructively modify

		self._verbose            = options.verbose
		self._log         = options.log
		self._rx_callback   = rx_callback      # this callback is fired when there's a packet available

		self.ofdm_rx = ofdm.ofdm_demod(options, callback=self._rx_callback)

		self.connect(self, self.ofdm_rx)

		if self._verbose:
			self._print_verbage()