options:
  parameters:
    author: ''
    category: Custom
    cmake_opt: ''
    comment: ''
    copyright: ''
    description: Transmit a pre-defined signal (a complex sine) as OFDM packets.
    gen_cmake: 'On'
    gen_linking: dynamic
    generate_options: qt_gui
    hier_block_src_path: '.:'
    id: ofdm_loopback_example
    max_nouts: '0'
    output_language: python
    placement: (0,0)
    qt_qss_theme: ''
    realtime_scheduling: ''
    run: 'True'
    run_command: '{python} -u {filename}'
    run_options: prompt
    sizing_mode: fixed
    thread_safe_setters: ''
    title: OFDM Loopback Example
    window_size: 1280, 1024
  states:
    coordinate: [8, 12.0]
    rotation: 0
    state: enabled

blocks:
- name: fft_len
  id: variable
  parameters:
    comment: ''
    value: '64'
  states:
    coordinate: [408, 20.0]
    rotation: 0
    state: enabled
- name: freq_offset
  id: variable_qtgui_range
  parameters:
    comment: ''
    gui_hint: ''
    label: Frequency Offset (Multiples of Sub-carrier spacing)
    min_len: '200'
    orient: Qt.Horizontal
    rangeType: float
    start: '-3'
    step: '.01'
    stop: '3'
    value: '0'
    widget: counter_slider
  states:
    coordinate: [528, 548.0]
    rotation: 0
    state: enabled
- name: len_tag_key
  id: variable
  parameters:
    comment: ''
    value: '"packet_len"'
  states:
    coordinate: [288, 20.0]
    rotation: 0
    state: enabled
- name: noise_voltage
  id: variable_qtgui_range
  parameters:
    comment: ''
    gui_hint: ''
    label: Noise Amplitude
    min_len: '200'
    orient: Qt.Horizontal
    rangeType: float
    start: '0'
    step: '.01'
    stop: '1'
    value: '0.1'
    widget: counter_slider
  states:
    coordinate: [704, 548.0]
    rotation: 0
    state: enabled
- name: packet_len
  id: variable
  parameters:
    comment: ''
    value: '50'
  states:
    coordinate: [200, 20.0]
    rotation: 0
    state: enabled
- name: samp_rate
  id: variable
  parameters:
    comment: ''
    value: '100000'
  states:
    coordinate: [504, 20.0]
    rotation: 0
    state: enabled
- name: blocks_stream_to_tagged_stream_0
  id: blocks_stream_to_tagged_stream
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    len_tag_key: len_tag_key
    maxoutbuf: '0'
    minoutbuf: '0'
    packet_len: packet_len
    type: byte
    vlen: '1'
  states:
    coordinate: [224, 140.0]
    rotation: 0
    state: enabled
- name: blocks_tag_debug_0
  id: blocks_tag_debug
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    display: 'False'
    filter: '""'
    name: Rx Packets
    num_inputs: '1'
    type: byte
    vlen: '1'
  states:
    coordinate: [352, 508.0]
    rotation: 0
    state: enabled
- name: blocks_throttle_0
  id: blocks_throttle
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    ignoretag: 'True'
    maxoutbuf: '0'
    minoutbuf: '0'
    samples_per_second: samp_rate
    type: complex
    vlen: '1'
  states:
    coordinate: [80, 300.0]
    rotation: 180
    state: enabled
- name: blocks_uchar_to_float_0
  id: blocks_uchar_to_float
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    maxoutbuf: '0'
    minoutbuf: '0'
  states:
    coordinate: [352, 448.0]
    rotation: 0
    state: enabled
- name: blocks_vector_source_x_0
  id: blocks_vector_source_x
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    maxoutbuf: '0'
    minoutbuf: '0'
    repeat: 'True'
    tags: ()
    type: byte
    vector: range(packet_len)
    vlen: '1'
  states:
    coordinate: [16, 132.0]
    rotation: 0
    state: enabled
- name: channels_channel_model_0
  id: channels_channel_model
  parameters:
    affinity: ''
    alias: ''
    block_tags: 'True'
    comment: ''
    epsilon: '1.0'
    freq_offset: freq_offset * 1.0/fft_len
    maxoutbuf: '0'
    minoutbuf: '0'
    noise_voltage: noise_voltage
    seed: '0'
    taps: 1.0 + 1.0j
  states:
    coordinate: [528, 268.0]
    rotation: 180
    state: enabled
- name: digital_ofdm_rx_0
  id: digital_ofdm_rx
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    cp_len: fft_len//4
    fft_len: fft_len
    header_mod: '"BPSK"'
    log: 'False'
    maxoutbuf: '0'
    minoutbuf: '0'
    occupied_carriers: ((-4,-3,-2,-1,1,2,3,4),)
    packet_len_key: '"rx_len"'
    payload_mod: '"QPSK"'
    pilot_carriers: ((-6,-5,5,6),)
    pilot_symbols: ((-1,1,-1,1),)
    scramble_bits: 'False'
    sync_word1: None
    sync_word2: None
  states:
    coordinate: [80, 380.0]
    rotation: 0
    state: enabled
- name: digital_ofdm_tx_0
  id: digital_ofdm_tx
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    cp_len: fft_len//4
    fft_len: fft_len
    header_mod: '"BPSK"'
    log: 'False'
    maxoutbuf: '0'
    minoutbuf: '0'
    occupied_carriers: ((-4,-3,-2,-1,1,2,3,4),)
    packet_len_key: len_tag_key
    payload_mod: '"QPSK"'
    pilot_carriers: ((-6,-5,5,6),)
    pilot_symbols: ((-1,1,-1,1),)
    rolloff: '0'
    scramble_bits: 'False'
    sync_word1: None
    sync_word2: None
  states:
    coordinate: [480, 76.0]
    rotation: 0
    state: enabled
- name: qtgui_freq_sink_x_0
  id: qtgui_freq_sink_x
  parameters:
    affinity: ''
    alias: ''
    alpha1: '1.0'
    alpha10: '1.0'
    alpha2: '1.0'
    alpha3: '1.0'
    alpha4: '1.0'
    alpha5: '1.0'
    alpha6: '1.0'
    alpha7: '1.0'
    alpha8: '1.0'
    alpha9: '1.0'
    autoscale: 'False'
    average: '1.0'
    axislabels: 'True'
    bw: samp_rate
    color1: '"blue"'
    color10: '"dark blue"'
    color2: '"red"'
    color3: '"green"'
    color4: '"black"'
    color5: '"cyan"'
    color6: '"magenta"'
    color7: '"yellow"'
    color8: '"dark red"'
    color9: '"dark green"'
    comment: ''
    ctrlpanel: 'False'
    fc: '0'
    fftsize: '1024'
    freqhalf: 'True'
    grid: 'False'
    gui_hint: ''
    label: Relative Gain
    label1: Rx Spectrum
    label10: ''
    label2: ''
    label3: ''
    label4: ''
    label5: ''
    label6: ''
    label7: ''
    label8: ''
    label9: ''
    legend: 'True'
    maxoutbuf: '0'
    minoutbuf: '0'
    name: Rx Spectrum
    nconnections: '1'
    showports: 'True'
    tr_chan: '0'
    tr_level: '0.0'
    tr_mode: qtgui.TRIG_MODE_FREE
    tr_tag: '""'
    type: complex
    units: dB
    update_time: '0.10'
    width1: '1'
    width10: '1'
    width2: '1'
    width3: '1'
    width4: '1'
    width5: '1'
    width6: '1'
    width7: '1'
    width8: '1'
    width9: '1'
    wintype: window.WIN_BLACKMAN_hARRIS
    ymax: '10'
    ymin: '-140'
  states:
    coordinate: [80, 564.0]
    rotation: 0
    state: enabled
- name: qtgui_time_sink_x_0
  id: qtgui_time_sink_x
  parameters:
    affinity: ''
    alias: ''
    alpha1: '1.0'
    alpha10: '1.0'
    alpha2: '1.0'
    alpha3: '1.0'
    alpha4: '1.0'
    alpha5: '1.0'
    alpha6: '1.0'
    alpha7: '1.0'
    alpha8: '1.0'
    alpha9: '1.0'
    autoscale: 'True'
    axislabels: 'True'
    color1: '"blue"'
    color10: '"blue"'
    color2: '"red"'
    color3: '"green"'
    color4: '"black"'
    color5: '"cyan"'
    color6: '"magenta"'
    color7: '"yellow"'
    color8: '"dark red"'
    color9: '"dark green"'
    comment: ''
    ctrlpanel: 'False'
    entags: 'True'
    grid: 'False'
    gui_hint: ''
    label1: ''
    label10: ''
    label2: ''
    label3: ''
    label4: ''
    label5: ''
    label6: ''
    label7: ''
    label8: ''
    label9: ''
    legend: 'True'
    marker1: '-1'
    marker10: '-1'
    marker2: '-1'
    marker3: '-1'
    marker4: '-1'
    marker5: '-1'
    marker6: '-1'
    marker7: '-1'
    marker8: '-1'
    marker9: '-1'
    name: Scope Plot
    nconnections: '1'
    size: '1024'
    srate: samp_rate
    stemplot: 'False'
    style1: '1'
    style10: '1'
    style2: '1'
    style3: '1'
    style4: '1'
    style5: '1'
    style6: '1'
    style7: '1'
    style8: '1'
    style9: '1'
    tr_chan: '0'
    tr_delay: '0'
    tr_level: '0.0'
    tr_mode: qtgui.TRIG_MODE_FREE
    tr_slope: qtgui.TRIG_SLOPE_POS
    tr_tag: '""'
    type: float
    update_time: '0.10'
    width1: '1'
    width10: '1'
    width2: '1'
    width3: '1'
    width4: '1'
    width5: '1'
    width6: '1'
    width7: '1'
    width8: '1'
    width9: '1'
    ylabel: Amplitude
    ymax: '1'
    ymin: '-1'
    yunit: '""'
  states:
    coordinate: [528, 420.0]
    rotation: 0
    state: enabled

connections:
- [blocks_stream_to_tagged_stream_0, '0', digital_ofdm_tx_0, '0']
- [blocks_throttle_0, '0', digital_ofdm_rx_0, '0']
- [blocks_throttle_0, '0', qtgui_freq_sink_x_0, '0']
- [blocks_uchar_to_float_0, '0', qtgui_time_sink_x_0, '0']
- [blocks_vector_source_x_0, '0', blocks_stream_to_tagged_stream_0, '0']
- [channels_channel_model_0, '0', blocks_throttle_0, '0']
- [digital_ofdm_rx_0, '0', blocks_tag_debug_0, '0']
- [digital_ofdm_rx_0, '0', blocks_uchar_to_float_0, '0']
- [digital_ofdm_tx_0, '0', channels_channel_model_0, '0']

metadata:
  file_format: 1
