summaryrefslogtreecommitdiff
path: root/grc/data
diff options
context:
space:
mode:
authorjblum2009-03-12 06:53:54 +0000
committerjblum2009-03-12 06:53:54 +0000
commit2c4a4e0c371b1cd0029901aa176915300a02f1b8 (patch)
treee251c87a4929b49e1695f4abb57dbbe1e1b0a000 /grc/data
parent48ecbf1162f9031ab7134bbb571efc345bc8d7bd (diff)
downloadgnuradio-2c4a4e0c371b1cd0029901aa176915300a02f1b8.tar.gz
gnuradio-2c4a4e0c371b1cd0029901aa176915300a02f1b8.tar.bz2
gnuradio-2c4a4e0c371b1cd0029901aa176915300a02f1b8.zip
Added OFDM Mod and Demod to GRC (cough cough... kludge).
Generalized the packet mod and demod stuff to accept the OFDM blocks. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10585 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/data')
-rw-r--r--grc/data/platforms/python/block_tree.xml3
-rw-r--r--grc/data/platforms/python/blocks/Makefile.am2
-rw-r--r--grc/data/platforms/python/blocks/blks2_ofdm_demod.xml122
-rw-r--r--grc/data/platforms/python/blocks/blks2_ofdm_mod.xml135
-rw-r--r--grc/data/platforms/python/blocks/blks2_packet_decoder.xml32
-rw-r--r--grc/data/platforms/python/blocks/blks2_packet_encoder.xml39
6 files changed, 291 insertions, 42 deletions
diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml
index b56073bbf..bb2d681f0 100644
--- a/grc/data/platforms/python/block_tree.xml
+++ b/grc/data/platforms/python/block_tree.xml
@@ -213,6 +213,9 @@
<block>blks2_qamx_mod</block>
<block>blks2_qamx_demod</block>
+ <block>blks2_ofdm_mod</block>
+ <block>blks2_ofdm_demod</block>
+
<block>blks2_synthesis_filterbank</block>
<block>blks2_analysis_filterbank</block>
</cat>
diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am
index 3655b1311..6b09050f3 100644
--- a/grc/data/platforms/python/blocks/Makefile.am
+++ b/grc/data/platforms/python/blocks/Makefile.am
@@ -42,6 +42,8 @@ dist_ourdata_DATA = \
blks2_logpwrfft_x.xml \
blks2_nbfm_rx.xml \
blks2_nbfm_tx.xml \
+ blks2_ofdm_demod.xml \
+ blks2_ofdm_mod.xml \
blks2_packet_decoder.xml \
blks2_packet_encoder.xml \
blks2_qamx_demod.xml \
diff --git a/grc/data/platforms/python/blocks/blks2_ofdm_demod.xml b/grc/data/platforms/python/blocks/blks2_ofdm_demod.xml
new file mode 100644
index 000000000..ac5ee4795
--- /dev/null
+++ b/grc/data/platforms/python/blocks/blks2_ofdm_demod.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##OFDM Demod
+###################################################
+ -->
+<block>
+ <name>OFDM Demod</name>
+ <key>blks2_ofdm_demod</key>
+ <import>from grc_gnuradio import blks2 as grc_blks2</import>
+ <import>from gnuradio import blks2</import>
+ <make>grc_blks2.packet_demod_$(type.fcn)(blks2.ofdm_demod(
+ options=grc_blks2.options(
+ modulation="$modulation",
+ fft_length=$fft_length,
+ occupied_tones=$occupied_tones,
+ cp_length=$cp_length,
+ snr=$snr,
+ log=None,
+ verbose=None,
+ ),
+ callback=lambda ok, payload: self.$(id).recv_pkt(ok, payload),
+ ),
+)</make>
+ <param>
+ <name>Output Type</name>
+ <key>type</key>
+ <value>float</value>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>fcn:c</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>fcn:f</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>fcn:i</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>fcn:s</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>fcn:b</opt>
+ </option>
+ </param>
+ <param>
+ <name>Modulation</name>
+ <key>modulation</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>bpsk</key>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>qpsk</key>
+ </option>
+ <option>
+ <name>8PSK</name>
+ <key>8psk</key>
+ </option>
+ <option>
+ <name>QAM8</name>
+ <key>qam8</key>
+ </option>
+ <option>
+ <name>QAM16</name>
+ <key>qam16</key>
+ </option>
+ <option>
+ <name>QAM64</name>
+ <key>qam64</key>
+ </option>
+ <option>
+ <name>QAM256</name>
+ <key>qam256</key>
+ </option>
+ </param>
+ <param>
+ <name>FFT Length</name>
+ <key>fft_length</key>
+ <value>512</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Occupied Tones</name>
+ <key>occupied_tones</key>
+ <value>200</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Cyclic Prefix Length</name>
+ <key>cp_length</key>
+ <value>128</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>SNR</name>
+ <key>snr</key>
+ <value>10</value>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ </source>
+ <doc>Payload Length: 0 for automatic.</doc>
+</block>
diff --git a/grc/data/platforms/python/blocks/blks2_ofdm_mod.xml b/grc/data/platforms/python/blocks/blks2_ofdm_mod.xml
new file mode 100644
index 000000000..2c54d10f4
--- /dev/null
+++ b/grc/data/platforms/python/blocks/blks2_ofdm_mod.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##OFDM Mod
+###################################################
+ -->
+<block>
+ <name>OFDM Mod</name>
+ <key>blks2_ofdm_mod</key>
+ <import>from grc_gnuradio import blks2 as grc_blks2</import>
+ <import>from gnuradio import blks2</import>
+ <make>grc_blks2.packet_mod_$(type.fcn)(blks2.ofdm_mod(
+ options=grc_blks2.options(
+ modulation="$modulation",
+ fft_length=$fft_length,
+ occupied_tones=$occupied_tones,
+ cp_length=$cp_length,
+ pad_for_usrp=$pad_for_usrp,
+ log=None,
+ verbose=None,
+ ),
+ ),
+ payload_length=$payload_length,
+)</make>
+ <param>
+ <name>Input Type</name>
+ <key>type</key>
+ <value>float</value>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>fcn:c</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>fcn:f</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>fcn:i</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>fcn:s</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>fcn:b</opt>
+ </option>
+ </param>
+ <param>
+ <name>Modulation</name>
+ <key>modulation</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>bpsk</key>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>qpsk</key>
+ </option>
+ <option>
+ <name>8PSK</name>
+ <key>8psk</key>
+ </option>
+ <option>
+ <name>QAM8</name>
+ <key>qam8</key>
+ </option>
+ <option>
+ <name>QAM16</name>
+ <key>qam16</key>
+ </option>
+ <option>
+ <name>QAM64</name>
+ <key>qam64</key>
+ </option>
+ <option>
+ <name>QAM256</name>
+ <key>qam256</key>
+ </option>
+ </param>
+ <param>
+ <name>FFT Length</name>
+ <key>fft_length</key>
+ <value>512</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Occupied Tones</name>
+ <key>occupied_tones</key>
+ <value>200</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Cyclic Prefix Length</name>
+ <key>cp_length</key>
+ <value>128</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Pad for USRP</name>
+ <key>pad_for_usrp</key>
+ <type>enum</type>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+ <param>
+ <name>Payload Length</name>
+ <key>payload_length</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+ <doc>Payload Length: 0 for automatic.</doc>
+</block>
diff --git a/grc/data/platforms/python/blocks/blks2_packet_decoder.xml b/grc/data/platforms/python/blocks/blks2_packet_decoder.xml
index d360bc177..07b0d1f2e 100644
--- a/grc/data/platforms/python/blocks/blks2_packet_decoder.xml
+++ b/grc/data/platforms/python/blocks/blks2_packet_decoder.xml
@@ -8,11 +8,11 @@
<name>Packet Decoder</name>
<key>blks2_packet_decoder</key>
<import>from grc_gnuradio import blks2 as grc_blks2</import>
- <import>from gnuradio import gr</import>
- <make>grc_blks2.packet_decoder(
- item_size_out=$type.size*$vlen,
- access_code=$access_code,
- threshold=$threshold,
+ <make>grc_blks2.packet_demod_$(type.fcn)(grc_blks2.packet_decoder(
+ access_code=$access_code,
+ threshold=$threshold,
+ callback=lambda ok, payload: self.$(id).recv_pkt(ok, payload),
+ ),
)</make>
<param>
<name>Output Type</name>
@@ -22,27 +22,27 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>size:gr.sizeof_gr_complex</opt>
+ <opt>fcn:c</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>size:gr.sizeof_float</opt>
+ <opt>fcn:f</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>size:gr.sizeof_int</opt>
+ <opt>fcn:i</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>size:gr.sizeof_short</opt>
+ <opt>fcn:s</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>size:gr.sizeof_char</opt>
+ <opt>fcn:b</opt>
</option>
</param>
<param>
@@ -57,13 +57,6 @@
<value>-1</value>
<type>int</type>
</param>
- <param>
- <name>Vec Length</name>
- <key>vlen</key>
- <value>1</value>
- <type>int</type>
- </param>
- <check>$vlen &gt; 0</check>
<sink>
<name>in</name>
<type>byte</type>
@@ -71,11 +64,12 @@
<source>
<name>out</name>
<type>$type</type>
- <vlen>$vlen</vlen>
</source>
<doc>
Packet decoder block, for use with the gnuradio demodulator blocks: gmsk, psk, qam.
-Access Code: string of 1's and 0's, leave blank for default.
+Access Code: string of 1's and 0's, leave blank for automatic.
+
+Threshold: -1 for automatic.
</doc>
</block>
diff --git a/grc/data/platforms/python/blocks/blks2_packet_encoder.xml b/grc/data/platforms/python/blocks/blks2_packet_encoder.xml
index ea9927225..b184ebd31 100644
--- a/grc/data/platforms/python/blocks/blks2_packet_encoder.xml
+++ b/grc/data/platforms/python/blocks/blks2_packet_encoder.xml
@@ -8,13 +8,12 @@
<name>Packet Encoder</name>
<key>blks2_packet_encoder</key>
<import>from grc_gnuradio import blks2 as grc_blks2</import>
- <import>from gnuradio import gr</import>
- <make>grc_blks2.packet_encoder(
- item_size_in=$type.size*$vlen,
- samples_per_symbol=$samples_per_symbol,
- bits_per_symbol=$bits_per_symbol,
- access_code=$access_code,
- pad_for_usrp=$pad_for_usrp,
+ <make>grc_blks2.packet_mod_$(type.fcn)(grc_blks2.packet_encoder(
+ samples_per_symbol=$samples_per_symbol,
+ bits_per_symbol=$bits_per_symbol,
+ access_code=$access_code,
+ pad_for_usrp=$pad_for_usrp,
+ ),
payload_length=$payload_length,
)</make>
<param>
@@ -25,27 +24,27 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>size:gr.sizeof_gr_complex</opt>
+ <opt>fcn:c</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>size:gr.sizeof_float</opt>
+ <opt>fcn:f</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>size:gr.sizeof_int</opt>
+ <opt>fcn:i</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>size:gr.sizeof_short</opt>
+ <opt>fcn:s</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>size:gr.sizeof_char</opt>
+ <opt>fcn:b</opt>
</option>
</param>
<param>
@@ -80,29 +79,23 @@
<param>
<name>Payload Length</name>
<key>payload_length</key>
- <value>-1</value>
+ <value>0</value>
<type>int</type>
</param>
- <param>
- <name>Vec Length</name>
- <key>vlen</key>
- <value>1</value>
- <type>int</type>
- </param>
- <check>$vlen &gt; 0</check>
<sink>
<name>in</name>
<type>$type</type>
- <vlen>$vlen</vlen>
</sink>
<source>
<name>out</name>
<type>byte</type>
</source>
<doc>
-Packet encoder block, for use with the gnuradio modulator blocks: gmsk, psk, qam.
+Packet encoder block, for use with the gnuradio modulator blocks: gmsk, dpsk, qam.
+
+Access Code: string of 1's and 0's, leave blank for automatic.
-Access Code: string of 1's and 0's, leave blank for default.
+Payload Length: 0 for automatic.
Bits/Symbol should be set accordingly:
gmsk -> 1