From a8cae8a68933eaaa71ae17d52c52b93257e01ae6 Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Tue, 14 Apr 2015 13:13:48 +0200 Subject: [PATCH] loopback: use channel model block --- examples/wifi_loopback.grc | 1364 ++++++++++++++---------------------- 1 file changed, 519 insertions(+), 845 deletions(-) diff --git a/examples/wifi_loopback.grc b/examples/wifi_loopback.grc index 6270998..7504b80 100644 --- a/examples/wifi_loopback.grc +++ b/examples/wifi_loopback.grc @@ -1,5 +1,5 @@ - + Sat Feb 1 18:28:19 2014 @@ -52,18 +52,10 @@ realtime_scheduling - - thread_safe_setters - - alias - - comment - - _coordinate (7, 4) @@ -91,10 +83,6 @@ alias - - comment - - _coordinate (179, 4) @@ -122,641 +110,9 @@ alias - - comment - - _coordinate - (1136, 147) - - - _rotation - 0 - - - - variable_chooser - - id - encoding - - - _enabled - True - - - label - Encoding - - - value - 0 - - - choices - [0,1,2,3,4,5,6,7] - - - labels - ["BPSK 1/2", "BPSK 3/4", "QPSK 1/2", "QPSK 3/4", "16QAM 1/2", "16QAM 3/4", "64QAM 2/3", "64QAM 3/4"] - - - type - radio_buttons - - - style - wx.RA_HORIZONTAL - - - grid_pos - - - - notebook - - - - alias - - - - comment - - - - _coordinate - (1067, 10) - - - _rotation - 0 - - - - import - - id - import_0 - - - _enabled - True - - - import - import math - - - alias - - - - comment - - - - _coordinate - (422, 11) - - - _rotation - 0 - - - - variable_slider - - id - signal_power - - - _enabled - True - - - label - - - - value - 2.0 - - - min - 0 - - - max - 3 - - - num_steps - 1000 - - - style - wx.SL_HORIZONTAL - - - converver - float_converter - - - grid_pos - - - - notebook - - - - alias - - - - comment - - - - _coordinate - (693, 7) - - - _rotation - 0 - - - - blocks_add_xx - - id - blocks_add_xx_0 - - - _enabled - True - - - type - complex - - - num_inputs - 2 - - - vlen - 1 - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (592, 280) - - - _rotation - 180 - - - - wifi_phy_hier - - id - wifi_phy_hier_0 - - - _enabled - True - - - encoding - encoding - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (384, 264) - - - _rotation - 180 - - - - blocks_multiply_xx - - id - blocks_multiply_xx_0 - - - _enabled - True - - - type - complex - - - num_inputs - 2 - - - vlen - 1 - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (544, 432) - - - _rotation - 0 - - - - analog_sig_source_x - - id - analog_sig_source_x_0 - - - _enabled - True - - - type - complex - - - samp_rate - samp_rate - - - waveform - analog.GR_COS_WAVE - - - freq - freq_offset - - - amp - 1 - - - offset - 0 - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (328, 539) - - - _rotation - 0 - - - - variable_slider - - id - noise_power - - - _enabled - True - - - label - - - - value - 0.1 - - - min - 0.01 - - - max - 5 - - - num_steps - 1000 - - - style - wx.SL_HORIZONTAL - - - converver - float_converter - - - grid_pos - - - - notebook - - - - alias - - - - comment - - - - _coordinate - (814, 8) - - - _rotation - 0 - - - - analog_noise_source_x - - id - analog_noise_source_x_0 - - - _enabled - True - - - type - complex - - - noise_type - analog.GR_GAUSSIAN - - - amp - (noise_power/2.0)**0.5 - - - seed - 0 - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (856, 259) - - - _rotation - 180 - - - - blocks_multiply_const_vxx - - id - blocks_multiply_const_vxx_0 - - - _enabled - True - - - type - complex - - - const - signal_power**.5 - - - vlen - 1 - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (696, 443) - - - _rotation - 0 - - - - foo_wireshark_connector - - id - foo_wireshark_connector_0 - - - _enabled - False - - - tech - 127 - - - debug - False - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (696, 155) - - - _rotation - 0 - - - - blocks_file_sink - - id - blocks_file_sink_0 - - - _enabled - False - - - file - /tmp/ofdm.bin - - - type - byte - - - vlen - 1 - - - unbuffered - True - - - append - False - - - alias - - - - affinity - - - - comment - - - - _coordinate - (888, 155) + (272, 3) _rotation @@ -802,12 +158,184 @@ 0 - comment + _coordinate + (416, 139) + + + _rotation + 0 + + + + blocks_pdu_to_tagged_stream + + id + blocks_pdu_to_tagged_stream_0 + + + _enabled + True + + + type + float + + + tag + packet_len + + + alias + + + + affinity + + + + minoutbuf + 0 + + + maxoutbuf + 0 + + + _coordinate + (136, 635) + + + _rotation + 0 + + + + ieee802_11_ofdm_parse_mac + + id + ieee802_11_ofdm_parse_mac_0 + + + _enabled + True + + + log + True + + + debug + True + + + alias + + + + affinity + + + + minoutbuf + 0 + + + maxoutbuf + 0 + + + _coordinate + (104, 251) + + + _rotation + 180 + + + + blocks_message_strobe + + id + blocks_message_strobe_0 + + + _enabled + True + + + msg + pmt.intern("".join("x" for i in range(pdu_length))) + + + period + interval + + + alias + + + + affinity + + + + minoutbuf + 0 + + + maxoutbuf + 0 + + + _coordinate + (48, 131) + + + _rotation + 0 + + + + variable_static_text + + id + snr_text + + + _enabled + True + + + label + SNR + + + value + str(snr) + + + converver + str_converter + + + formatter + None + + + grid_pos + + + + notebook + + + + alias _coordinate - (416, 139) + (515, 8) _rotation @@ -818,7 +346,7 @@ variable_slider id - freq_offset + snr _enabled @@ -830,15 +358,15 @@ value - 0 + 10 min - -10000 + -15 max - 10000 + 30 num_steps @@ -864,13 +392,9 @@ alias - - comment - - _coordinate - (947, 7) + (656, 11) _rotation @@ -923,13 +447,9 @@ maxoutbuf 0 - - comment - - _coordinate - (320, 395) + (272, 395) _rotation @@ -937,22 +457,38 @@ - blocks_pdu_to_tagged_stream + channels_channel_model id - blocks_pdu_to_tagged_stream_0 + channels_channel_model_0 _enabled True - type - float + noise_voltage + .5**.5 - tag - packet_len + freq_offset + 1 + freq_offset + + + epsilon + 1.0 + + + taps + 1.0 + + + seed + 0 + + + block_tags + False alias @@ -970,107 +506,9 @@ maxoutbuf 0 - - comment - - _coordinate - (136, 635) - - - _rotation - 0 - - - - ieee802_11_ofdm_parse_mac - - id - ieee802_11_ofdm_parse_mac_0 - - - _enabled - True - - - log - True - - - debug - True - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (104, 251) - - - _rotation - 180 - - - - blocks_message_strobe - - id - blocks_message_strobe_0 - - - _enabled - True - - - msg - pmt.intern("".join("x" for i in range(pdu_length))) - - - period - interval - - - alias - - - - affinity - - - - minoutbuf - 0 - - - maxoutbuf - 0 - - - comment - - - - _coordinate - (48, 131) + (632, 395) _rotation @@ -1081,7 +519,7 @@ variable_slider id - pdu_length + freq_offset _enabled @@ -1093,15 +531,15 @@ value - 10 + 1.0 min - 0 + .9 max - 1500 + 1.1 num_steps @@ -1113,7 +551,7 @@ converver - int_converter + float_converter grid_pos @@ -1128,12 +566,90 @@ - comment + _coordinate + (776, 11) + + + _rotation + 0 + + + + variable_chooser + + id + encoding + + + _enabled + True + + + label + Encoding + + + value + 0 + + + choices + [0,1,2,3,4,5,6,7] + + + labels + ["BPSK 1/2", "BPSK 3/4", "QPSK 1/2", "QPSK 3/4", "16QAM 1/2", "16QAM 3/4", "64QAM 2/3", "64QAM 3/4"] + + + type + radio_buttons + + + style + wx.RA_HORIZONTAL + + + grid_pos + + + + notebook + + + + alias _coordinate - (1120, 227) + (888, 11) + + + _rotation + 0 + + + + import + + id + import_0 + + + _enabled + True + + + import + import math + + + alias + + + + _coordinate + (376, 3) _rotation @@ -1190,13 +706,9 @@ alias - - comment - - _coordinate - (1120, 355) + (1064, 11) _rotation @@ -1204,10 +716,139 @@ - variable_static_text + blocks_file_sink id - snr + blocks_file_sink_0 + + + _enabled + False + + + file + /tmp/ofdm.bin + + + type + byte + + + vlen + 1 + + + unbuffered + True + + + append + False + + + alias + + + + affinity + + + + _coordinate + (896, 187) + + + _rotation + 0 + + + + wifi_phy_hier + + id + wifi_phy_hier_0 + + + _enabled + True + + + encoding + encoding + + + alias + + + + affinity + + + + minoutbuf + 0 + + + maxoutbuf + 0 + + + _coordinate + (384, 264) + + + _rotation + 180 + + + + foo_wireshark_connector + + id + foo_wireshark_connector_0 + + + _enabled + False + + + tech + 127 + + + debug + False + + + alias + + + + affinity + + + + minoutbuf + 0 + + + maxoutbuf + 0 + + + _coordinate + (688, 195) + + + _rotation + 0 + + + + variable_slider + + id + pdu_length _enabled @@ -1215,19 +856,31 @@ label - SNR + value - str(10 * math.log10(signal_power/noise_power)) + "dB" + 10 + + + min + 0 + + + max + 1500 + + + num_steps + 1000 + + + style + wx.SL_HORIZONTAL converver - str_converter - - - formatter - None + int_converter grid_pos @@ -1242,12 +895,55 @@ - comment + _coordinate + (1088, 147) + + + _rotation + 0 + + + + blocks_multiply_const_vxx + + id + blocks_multiply_const_vxx_0 + + + _enabled + True + + + type + complex + + + const + (10**(snr/10.0))**.5 + + + vlen + 1 + + + alias + + affinity + + + + minoutbuf + 0 + + + maxoutbuf + 0 + _coordinate - (515, 8) + (440, 427) _rotation @@ -1310,11 +1006,11 @@ average - False + True avg_alpha - 0 + 0.02 show_gauge @@ -1340,49 +1036,15 @@ affinity - - comment - - _coordinate - (672, 563) + (552, 555) _rotation 0 - - analog_sig_source_x_0 - blocks_multiply_xx_0 - 0 - 1 - - - analog_noise_source_x_0 - blocks_add_xx_0 - 0 - 1 - - - blocks_multiply_xx_0 - blocks_multiply_const_vxx_0 - 0 - 0 - - - blocks_multiply_const_vxx_0 - blocks_add_xx_0 - 0 - 0 - - - blocks_add_xx_0 - wifi_phy_hier_0 - 0 - 0 - wifi_phy_hier_0 ieee802_11_ofdm_parse_mac_0 @@ -1395,12 +1057,6 @@ strobe app in - - foo_packet_pad2_0 - blocks_multiply_xx_0 - 0 - 0 - wifi_phy_hier_0 foo_packet_pad2_0 @@ -1413,18 +1069,6 @@ mac_out phy in - - ieee802_11_ofdm_mac_0 - foo_wireshark_connector_0 - phy out - in - - - foo_wireshark_connector_0 - blocks_file_sink_0 - 0 - 0 - ieee802_11_ofdm_mac_0 wifi_phy_hier_0 @@ -1443,4 +1087,34 @@ 0 0 + + channels_channel_model_0 + wifi_phy_hier_0 + 0 + 0 + + + foo_packet_pad2_0 + blocks_multiply_const_vxx_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + channels_channel_model_0 + 0 + 0 + + + foo_wireshark_connector_0 + blocks_file_sink_0 + 0 + 0 + + + wifi_phy_hier_0 + foo_wireshark_connector_0 + mac_out + in +