Beispiel #1
0
    def __init__(self):
        grc_wxgui.top_block_gui.__init__(self, title="Mux Work")
        _icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png"
        self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 32000

        ##################################################
        # Blocks
        ##################################################
        self.virtual_channel_mux_0 = precog.virtual_channel_mux(4)
        self.virtual_channel_demux_0 = precog.virtual_channel_demux(3)
        self.precog_msg_to_stdout_0 = precog.msg_to_stdout()
        self.heart_beat_0 = precog.heart_beat(1, "key", "value1")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.virtual_channel_mux_0, 0), (self.virtual_channel_demux_0, 0))
        self.connect((self.virtual_channel_demux_0, 0), (self.precog_msg_to_stdout_0, 0))
        self.connect((self.heart_beat_0, 0), (self.virtual_channel_mux_0, 0))
Beispiel #2
0
	def __init__(self):
		grc_wxgui.top_block_gui.__init__(self, title="Mux Work")
		_icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png"
		self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = 32000

		##################################################
		# Blocks
		##################################################
		self.virtual_channel_mux_0 = precog.virtual_channel_mux(4)
		self.virtual_channel_demux_0 = precog.virtual_channel_demux(3)
		self.precog_msg_to_stdout_0 = precog.msg_to_stdout()
		self.heart_beat_0 = precog.heart_beat(1,"key","value1")

		##################################################
		# Connections
		##################################################
		self.connect((self.virtual_channel_mux_0, 0), (self.virtual_channel_demux_0, 0))
		self.connect((self.virtual_channel_demux_0, 0), (self.precog_msg_to_stdout_0, 0))
		self.connect((self.heart_beat_0, 0), (self.virtual_channel_mux_0, 0))
Beispiel #3
0
    def __init__(self,
                 rate=1e6,
                 tx_gain=15,
                 samp_per_sym=4,
                 freq=915e6,
                 arq_timeout=.10,
                 max_arq_attempts=10,
                 rx_freq=915e6,
                 rx_gain=15,
                 args="",
                 ampl=0.7,
                 port1="12345",
                 port2="12346",
                 radio_addr=0,
                 dest_addr_1=86,
                 dest_addr_2=87):
        grc_wxgui.top_block_gui.__init__(self, title="Simple Trx")
        _icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png"
        self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))

        ##################################################
        # Parameters
        ##################################################
        self.rate = rate
        self.tx_gain = tx_gain
        self.samp_per_sym = samp_per_sym
        self.freq = freq
        self.arq_timeout = arq_timeout
        self.max_arq_attempts = max_arq_attempts
        self.rx_freq = rx_freq
        self.rx_gain = rx_gain
        self.args = args
        self.ampl = ampl
        self.port1 = port1
        self.port2 = port2
        self.radio_addr = radio_addr
        self.dest_addr_1 = dest_addr_1
        self.dest_addr_2 = dest_addr_2

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = rate

        ##################################################
        # Blocks
        ##################################################
        self.virtual_channel_mux_0 = precog.virtual_channel_mux(2)
        self.virtual_channel_formatter_0_0 = precog.virtual_channel_formatter(
            dest_addr_2, 1)
        self.virtual_channel_formatter_0 = precog.virtual_channel_formatter(
            dest_addr_1, 1)
        self.virtual_channel_demux_0 = precog.virtual_channel_demux(2)
        self.simple_mac_0 = precog.simple_mac(radio_addr, arq_timeout,
                                              max_arq_attempts)
        self.radio_hier_0 = radio_hier(
            rx_gain=rx_gain,
            ampl=ampl,
            tx_gain=tx_gain,
            rx_freq=rx_freq,
            args=args,
            samp_per_sym=samp_per_sym,
            tx_freq=freq,
            rate=rate,
            rx_ant='TX/RX',
        )
        self.heart_beat_0 = precog.heart_beat(0.001, "W", "")
        self.extras_socket_msg_0_0 = gr_extras.socket_msg(
            "TCP", "127.0.0.1", port2, 0)
        self.extras_socket_msg_0 = gr_extras.socket_msg(
            "TCP", "127.0.0.1", port1, 0)

        ##################################################
        # Connections
        ##################################################
        self.connect((self.heart_beat_0, 0), (self.simple_mac_0, 2))
        self.connect((self.simple_mac_0, 0), (self.radio_hier_0, 0))
        self.connect((self.radio_hier_0, 0), (self.simple_mac_0, 0))
        self.connect((self.extras_socket_msg_0, 0),
                     (self.virtual_channel_formatter_0, 0))
        self.connect((self.extras_socket_msg_0_0, 0),
                     (self.virtual_channel_formatter_0_0, 0))
        self.connect((self.virtual_channel_demux_0, 1),
                     (self.extras_socket_msg_0, 0))
        self.connect((self.simple_mac_0, 1), (self.virtual_channel_demux_0, 0))
        self.connect((self.virtual_channel_demux_0, 0),
                     (self.extras_socket_msg_0_0, 0))
        self.connect((self.virtual_channel_mux_0, 0), (self.simple_mac_0, 1))
        self.connect((self.virtual_channel_formatter_0_0, 0),
                     (self.virtual_channel_mux_0, 0))
        self.connect((self.virtual_channel_formatter_0, 0),
                     (self.virtual_channel_mux_0, 1))
Beispiel #4
0
	def __init__(self, rate=1e6, tx_gain=15, samp_per_sym=4, freq=915e6, arq_timeout=.10, max_arq_attempts=10, rx_freq=915e6, rx_gain=15, args="", radio_addr=0, dest_addr=86, port="12346", ampl=0.7, rx_ant="TX/RX"):
		grc_wxgui.top_block_gui.__init__(self, title="Simple Trx 4")

		##################################################
		# Parameters
		##################################################
		self.rate = rate
		self.tx_gain = tx_gain
		self.samp_per_sym = samp_per_sym
		self.freq = freq
		self.arq_timeout = arq_timeout
		self.max_arq_attempts = max_arq_attempts
		self.rx_freq = rx_freq
		self.rx_gain = rx_gain
		self.args = args
		self.radio_addr = radio_addr
		self.dest_addr = dest_addr
		self.port = port
		self.ampl = ampl
		self.rx_ant = rx_ant

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = rate

		##################################################
		# Blocks
		##################################################
		self.virtual_channel_mux_0 = precog.virtual_channel_mux(2)
		self.virtual_channel_formatter_0_0 = precog.virtual_channel_formatter(dest_addr,1)
		self.virtual_channel_formatter_0 = precog.virtual_channel_formatter(dest_addr,0)
		self.virtual_channel_demux_0 = precog.virtual_channel_demux(2)
		self.simple_mac_0 = precog.simple_mac(radio_addr,arq_timeout,max_arq_attempts)
		self.radio_hier_0 = radio_hier(
			rx_gain=rx_gain,
			ampl=ampl,
			tx_gain=tx_gain,
			rx_freq=rx_freq,
			args=args,
			samp_per_sym=samp_per_sym,
			tx_freq=freq,
			rate=rate,
			rx_ant=rx_ant,
		)
		self.precog_msg_to_stdout_0 = precog.msg_to_stdout()
		self.heart_beat_0_0 = precog.heart_beat(1,"W","beacon_message")
		self.heart_beat_0 = precog.heart_beat(0.001,"W","")
		self.extras_socket_msg_0_0 = gr_extras.socket_msg("TCP", "127.0.0.1", port, 0)

		##################################################
		# Connections
		##################################################
		self.connect((self.heart_beat_0, 0), (self.simple_mac_0, 2))
		self.connect((self.simple_mac_0, 0), (self.radio_hier_0, 0))
		self.connect((self.radio_hier_0, 0), (self.simple_mac_0, 0))
		self.connect((self.simple_mac_0, 1), (self.virtual_channel_demux_0, 0))
		self.connect((self.virtual_channel_demux_0, 1), (self.extras_socket_msg_0_0, 0))
		self.connect((self.virtual_channel_demux_0, 0), (self.precog_msg_to_stdout_0, 0))
		self.connect((self.virtual_channel_formatter_0, 0), (self.virtual_channel_mux_0, 0))
		self.connect((self.virtual_channel_formatter_0_0, 0), (self.virtual_channel_mux_0, 1))
		self.connect((self.heart_beat_0_0, 0), (self.virtual_channel_formatter_0, 0))
		self.connect((self.extras_socket_msg_0_0, 0), (self.virtual_channel_formatter_0_0, 0))
		self.connect((self.virtual_channel_mux_0, 0), (self.simple_mac_0, 1))
Beispiel #5
0
	def __init__(self, rate=1e6, tx_gain=15, samp_per_sym=4, freq=915e6, arq_timeout=.10, max_arq_attempts=10, rx_freq=915e6, rx_gain=15, args="", ampl=0.7, port1="12345", port2="12346", radio_addr=0, dest_addr_1=86, dest_addr_2=87):
		grc_wxgui.top_block_gui.__init__(self, title="Simple Trx")
		_icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png"
		self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))

		##################################################
		# Parameters
		##################################################
		self.rate = rate
		self.tx_gain = tx_gain
		self.samp_per_sym = samp_per_sym
		self.freq = freq
		self.arq_timeout = arq_timeout
		self.max_arq_attempts = max_arq_attempts
		self.rx_freq = rx_freq
		self.rx_gain = rx_gain
		self.args = args
		self.ampl = ampl
		self.port1 = port1
		self.port2 = port2
		self.radio_addr = radio_addr
		self.dest_addr_1 = dest_addr_1
		self.dest_addr_2 = dest_addr_2

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = rate

		##################################################
		# Blocks
		##################################################
		self.virtual_channel_mux_0 = precog.virtual_channel_mux(2)
		self.virtual_channel_formatter_0_0 = precog.virtual_channel_formatter(dest_addr_2,1)
		self.virtual_channel_formatter_0 = precog.virtual_channel_formatter(dest_addr_1,1)
		self.virtual_channel_demux_0 = precog.virtual_channel_demux(2)
		self.simple_mac_0 = precog.simple_mac(radio_addr,arq_timeout,max_arq_attempts)
		self.radio_hier_0 = radio_hier(
			rx_gain=rx_gain,
			ampl=ampl,
			tx_gain=tx_gain,
			rx_freq=rx_freq,
			args=args,
			samp_per_sym=samp_per_sym,
			tx_freq=freq,
			rate=rate,
			rx_ant='TX/RX',
		)
		self.heart_beat_0 = precog.heart_beat(0.001,"W","")
		self.extras_socket_msg_0_0 = gr_extras.socket_msg("TCP", "127.0.0.1", port2, 0)
		self.extras_socket_msg_0 = gr_extras.socket_msg("TCP", "127.0.0.1", port1, 0)

		##################################################
		# Connections
		##################################################
		self.connect((self.heart_beat_0, 0), (self.simple_mac_0, 2))
		self.connect((self.simple_mac_0, 0), (self.radio_hier_0, 0))
		self.connect((self.radio_hier_0, 0), (self.simple_mac_0, 0))
		self.connect((self.extras_socket_msg_0, 0), (self.virtual_channel_formatter_0, 0))
		self.connect((self.extras_socket_msg_0_0, 0), (self.virtual_channel_formatter_0_0, 0))
		self.connect((self.virtual_channel_demux_0, 1), (self.extras_socket_msg_0, 0))
		self.connect((self.simple_mac_0, 1), (self.virtual_channel_demux_0, 0))
		self.connect((self.virtual_channel_demux_0, 0), (self.extras_socket_msg_0_0, 0))
		self.connect((self.virtual_channel_mux_0, 0), (self.simple_mac_0, 1))
		self.connect((self.virtual_channel_formatter_0_0, 0), (self.virtual_channel_mux_0, 0))
		self.connect((self.virtual_channel_formatter_0, 0), (self.virtual_channel_mux_0, 1))