<?xml version="1.0"?>
<block>
  <name>OFDM Receiver</name>
  <key>digital_ofdm_rx</key>
  <import>from gnuradio import digital</import>
  <make>digital.ofdm_rx(
	  fft_len=$fft_len, cp_len=$cp_len,
	  frame_length_tag_key='frame_'+$packet_len_key,
	  packet_length_tag_key=$packet_len_key,
	  #if $occupied_carriers()
	  occupied_carriers=$occupied_carriers,
	  #end if
	  #if $pilot_carriers()
	  pilot_carriers=$pilot_carriers,
	  #end if
	  #if $pilot_symbols()
	  pilot_symbols=$pilot_symbols,
	  #end if
	  #if $sync_word1()
	  sync_word1=$sync_word1,
	  #end if
	  #if $sync_word2()
	  sync_word2=$sync_word2,
	  #end if
	  bps_header=$header_mod.bps,
	  bps_payload=$payload_mod.bps,
	  debug_log=$log,
	  scramble_bits=$scramble_bits
	 )</make>
  <param>
    <name>FFT Length</name>
    <key>fft_len</key>
    <value>64</value>
    <type>int</type>
  </param>
  <param>
    <name>Cyclic Prefix Length</name>
    <key>cp_len</key>
    <value>16</value>
    <type>int</type>
  </param>
  <param>
    <name>Packet Length Tag Key</name>
    <key>packet_len_key</key>
    <value>"length"</value>
    <type>string</type>
  </param>
  <param>
    <name>Occupied Carriers</name>
    <key>occupied_carriers</key>
    <value>()</value>
    <type>raw</type>
    <hide>
      #if $occupied_carriers()
        none
      #else
        part
      #end if
    </hide>
  </param>
  <param>
    <name>Pilot Carriers</name>
    <key>pilot_carriers</key>
    <value>()</value>
    <type>raw</type>
    <hide>
      #if $pilot_carriers()
        none
      #else
        part
      #end if
    </hide>
  </param>
  <param>
    <name>Pilot Symbols</name>
    <key>pilot_symbols</key>
    <value>()</value>
    <type>raw</type>
    <hide>
      #if $pilot_symbols()
        none
      #else
        part
      #end if
    </hide>
  </param>
  <param>
    <name>Sync Word 1</name>
    <key>sync_word1</key>
    <value>()</value>
    <type>raw</type>
    <hide>
      #if $sync_word1()
        none
      #else
        part
      #end if
    </hide>
  </param>
  <param>
    <name>Sync Word 2</name>
    <key>sync_word2</key>
    <value>()</value>
    <type>raw</type>
    <hide>
      #if $sync_word2()
        none
      #else
        part
      #end if
    </hide>
  </param>
  <param>
    <name>Header Modulation</name>
    <key>header_mod</key>
    <type>enum</type>
    <option>
      <name>BPSK</name>
      <key>"BPSK"</key>
      <opt>bps:1</opt>
    </option>
    <option>
      <name>QPSK</name>
      <key>"QPSK"</key>
      <opt>bps:2</opt>
    </option>
  </param>
  <param>
    <name>Payload Modulation</name>
    <key>payload_mod</key>
    <type>enum</type>
    <option>
      <name>BPSK</name>
      <key>"BPSK"</key>
      <opt>bps:1</opt>
    </option>
    <option>
      <name>QPSK</name>
      <key>"QPSK"</key>
      <opt>bps:2</opt>
    </option>
    <option>
      <name>8-PSK</name>
      <key>"8-PSK"</key>
      <opt>bps:3</opt>
    </option>
  </param>
  <param>
    <name>Scramble Bits</name>
    <key>scramble_bits</key>
    <value>False</value>
    <type>enum</type>
    <hide> #if $scramble_bits then 'part' else 'none'#</hide>
    <option>
      <name>No</name>
      <key>False</key>
    </option>
    <option>
      <name>Yes</name>
      <key>True</key>
    </option>
  </param>
  <param>
    <name>Log Debug Info</name>
    <key>log</key>
    <value>False</value>
    <type>enum</type>
    <hide> #if $log then 'none' else 'part'#</hide>
    <option>
      <name>No</name>
      <key>False</key>
    </option>
    <option>
      <name>Yes</name>
      <key>True</key>
    </option>
  </param>
  <check>$fft_len &gt; 0</check>
  <check>$cp_len &gt; 0</check>
  <check>$cp_len &lt; $fft_len</check>
  <sink>
    <name>in</name>
    <type>complex</type>
  </sink>
  <source>
    <name>out</name>
    <type>byte</type>
  </source>
</block>

