def __init__(self, rate=1e6, tx_gain=15, samp_per_sym=4, freq=915e6, dest_addr=86, arq_timeout=.10, max_arq_attempts=10, rx_freq=915e6, rx_gain=15, args="", ampl=0.7, port="12345", radio_addr=0, rx_ant="TX/RX"): grc_wxgui.top_block_gui.__init__(self, title="Simple Trx 2") ################################################## # Parameters ################################################## self.rate = rate self.tx_gain = tx_gain self.samp_per_sym = samp_per_sym self.freq = freq self.dest_addr = dest_addr 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.port = port self.radio_addr = radio_addr self.rx_ant = rx_ant ################################################## # Variables ################################################## self.samp_rate = samp_rate = rate ################################################## # Blocks ################################################## self.virtual_channel_formatter_0 = precog.virtual_channel_formatter(dest_addr,1) 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.heart_beat_0 = precog.heart_beat(0.001,"W","") self.extras_socket_msg_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.extras_socket_msg_0, 0), (self.virtual_channel_formatter_0, 0)) self.connect((self.virtual_channel_formatter_0, 0), (self.simple_mac_0, 1)) self.connect((self.simple_mac_0, 1), (self.extras_socket_msg_0, 0))
def __init__(self, radio_addr=0, rate=1e6, tx_gain=15, samp_per_sym=4, freq=915e6, dest_addr=86, arq_timeout=.10, max_arq_attempts=10, rx_freq=915e6, args="", ampl=0.7, port="12345", rx_gain=20, rx_ant="TX/RX"): grc_wxgui.top_block_gui.__init__(self, title="Simple Trx 1") ################################################## # Parameters ################################################## self.radio_addr = radio_addr self.rate = rate self.tx_gain = tx_gain self.samp_per_sym = samp_per_sym self.freq = freq self.dest_addr = dest_addr self.arq_timeout = arq_timeout self.max_arq_attempts = max_arq_attempts self.rx_freq = rx_freq self.args = args self.ampl = ampl self.port = port self.rx_gain = rx_gain self.rx_ant = rx_ant ################################################## # Variables ################################################## self.samp_rate = samp_rate = rate ################################################## # Blocks ################################################## 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.extras_socket_msg_0 = gr_extras.socket_msg( "TCP", "127.0.0.1", port, 0) ################################################## # Connections ################################################## self.connect((self.radio_hier_0, 0), (self.extras_socket_msg_0, 0)) self.connect((self.extras_socket_msg_0, 0), (self.radio_hier_0, 0))
def __init__( self, args="", rx_gain=15, max_arq_attempts=10, ampl=0.7, dest_addr=86, arq_timeout=0.10, radio_addr=0, samp_per_sym=4, rate=1e6, tx_gain=15, freq=915e6, port="12347", rx_freq=915e6, tx_freq=915e6, rx_antenna="TX/RX", ): 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.args = args self.rx_gain = rx_gain self.max_arq_attempts = max_arq_attempts self.ampl = ampl self.dest_addr = dest_addr self.arq_timeout = arq_timeout self.radio_addr = radio_addr self.samp_per_sym = samp_per_sym self.rate = rate self.tx_gain = tx_gain self.freq = freq self.port = port self.rx_freq = rx_freq self.tx_freq = tx_freq self.rx_antenna = rx_antenna ################################################## # Variables ################################################## self.samp_rate = samp_rate = rate ################################################## # Blocks ################################################## self.virtual_channel_formatter_0 = precog.virtual_channel_formatter(dest_addr, 1) self.simple_mac_0 = precog.simple_mac(radio_addr, arq_timeout, max_arq_attempts) self.radio_hier_0 = radio_hier( rate=samp_rate, tx_gain=tx_gain, rx_freq=rx_freq, args=args, rx_gain=rx_gain, tx_freq=tx_freq, rx_ant=rx_antenna, ampl=ampl, samp_per_sym=samp_per_sym, ) self.heart_beat_0 = precog.heart_beat(0.001, "W", "") self.extras_socket_msg_0 = gr_extras.socket_msg("TCP", "127.0.0.1", port, 0) ################################################## # Connections ################################################## self.connect((self.extras_socket_msg_0, 0), (self.virtual_channel_formatter_0, 0)) self.connect((self.simple_mac_0, 1), (self.extras_socket_msg_0, 0)) self.connect((self.virtual_channel_formatter_0, 0), (self.simple_mac_0, 1)) self.connect((self.heart_beat_0, 0), (self.simple_mac_0, 2)) self.connect((self.radio_hier_0, 0), (self.simple_mac_0, 0)) self.connect((self.simple_mac_0, 0), (self.radio_hier_0, 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))
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))
def __init__(self, max_arq_attempts=10, ampl=0.7, arq_timeout=.10, rate=1e6, rx_antenna="TX/RX", radio_addr=86, lead_limit=0.001, rate_0=1e6, link_speed=200, ampl_0=0.7, dest_addr=85, port="12357", rx_freq=4266e5, tx_freq=4266e5, tx_gain=0, dev_addr=1, freq=426e6, rx_gain=5, args="addr=192.168.10.4", samp_per_sym=5, post_guard=0.003, pre_guard=0.005, hop_interval=0.05, freq_list="4241e5,4251e5,4261e5,4271e5"): gr.top_block.__init__(self, "Simple Trx") ################################################## # Parameters ################################################## self.max_arq_attempts = max_arq_attempts self.ampl = ampl self.arq_timeout = arq_timeout self.rate = rate self.rx_antenna = rx_antenna self.radio_addr = radio_addr self.lead_limit = lead_limit self.rate_0 = rate_0 self.link_speed = link_speed self.ampl_0 = ampl_0 self.dest_addr = dest_addr self.port = port self.rx_freq = rx_freq self.tx_freq = tx_freq self.tx_gain = tx_gain self.dev_addr = dev_addr self.freq = freq self.rx_gain = rx_gain self.args = args self.samp_per_sym = samp_per_sym self.post_guard = post_guard self.pre_guard = pre_guard self.hop_interval = hop_interval self.freq_list = freq_list ################################################## # Variables ################################################## self.samp_rate = samp_rate = rate ################################################## # Blocks ################################################## self.fhah_trx_0 = fhah_trx( lead_limit=0.001, tx_gain=tx_gain, samp_per_sym=samp_per_sym, link_speed=samp_rate/samp_per_sym, pre_guard=pre_guard, rate=rate_0, hop_interval=hop_interval, rx_gain=rx_gain, ampl=ampl, freq=freq, args=args, freq_list=freq_list, post_guard=post_guard, dev_addr=dev_addr, ) self.extras_socket_msg_0_0 = gr_extras.socket_msg("TCP", "127.0.0.1", port, 0) ################################################## # Connections ################################################## self.connect((self.extras_socket_msg_0_0, 0), (self.fhah_trx_0, 0)) self.connect((self.fhah_trx_0, 0), (self.extras_socket_msg_0_0, 0))
def __init__(self, max_arq_attempts=10, ampl=0.7, arq_timeout=.10, rate=1e6, rx_antenna="TX/RX", radio_addr=86, lead_limit=0.001, rate_0=1e6, link_speed=200, ampl_0=0.7, dest_addr=85, port="12357", rx_freq=4266e5, tx_freq=4266e5, tx_gain=0, dev_addr=1, freq=426e6, rx_gain=5, args="addr=192.168.10.4", samp_per_sym=5, post_guard=0.003, pre_guard=0.005, hop_interval=0.05, freq_list="4241e5,4251e5,4261e5,4271e5"): gr.top_block.__init__(self, "Simple Trx") ################################################## # Parameters ################################################## self.max_arq_attempts = max_arq_attempts self.ampl = ampl self.arq_timeout = arq_timeout self.rate = rate self.rx_antenna = rx_antenna self.radio_addr = radio_addr self.lead_limit = lead_limit self.rate_0 = rate_0 self.link_speed = link_speed self.ampl_0 = ampl_0 self.dest_addr = dest_addr self.port = port self.rx_freq = rx_freq self.tx_freq = tx_freq self.tx_gain = tx_gain self.dev_addr = dev_addr self.freq = freq self.rx_gain = rx_gain self.args = args self.samp_per_sym = samp_per_sym self.post_guard = post_guard self.pre_guard = pre_guard self.hop_interval = hop_interval self.freq_list = freq_list ################################################## # Variables ################################################## self.samp_rate = samp_rate = rate ################################################## # Blocks ################################################## self.fhah_trx_0 = fhah_trx( lead_limit=0.001, tx_gain=tx_gain, samp_per_sym=samp_per_sym, link_speed=samp_rate / samp_per_sym, pre_guard=pre_guard, rate=rate_0, hop_interval=hop_interval, rx_gain=rx_gain, ampl=ampl, freq=freq, args=args, freq_list=freq_list, post_guard=post_guard, dev_addr=dev_addr, ) self.extras_socket_msg_0_0 = gr_extras.socket_msg( "TCP", "127.0.0.1", port, 0) ################################################## # Connections ################################################## self.connect((self.extras_socket_msg_0_0, 0), (self.fhah_trx_0, 0)) self.connect((self.fhah_trx_0, 0), (self.extras_socket_msg_0_0, 0))