Imported Upstream version 3.2.2
[debian/gnuradio] / grc / blocks / blks2_error_rate.xml
diff --git a/grc/blocks/blks2_error_rate.xml b/grc/blocks/blks2_error_rate.xml
new file mode 100644 (file)
index 0000000..91a3032
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Error Rate:
+##     Custom blks2 block
+###################################################
+ -->
+<block>
+       <name>Error Rate</name>
+       <key>blks2_error_rate</key>
+       <import>from grc_gnuradio import blks2 as grc_blks2</import>
+       <make>grc_blks2.error_rate(
+       type=$type,
+       win_size=$win_size,
+       bits_per_symbol=$bits_per_symbol,
+)</make>
+       <param>
+               <name>Type</name>
+               <key>type</key>
+               <type>enum</type>
+               <option>
+                       <name>Bit Error Rate</name>
+                       <key>'BER'</key>
+                       <opt>hide_bps:</opt>
+               </option>
+               <option>
+                       <name>Symbol Error Rate</name>
+                       <key>'SER'</key>
+                       <opt>hide_bps:all</opt>
+               </option>
+       </param>
+       <param>
+               <name>Window Size</name>
+               <key>win_size</key>
+               <value>1000</value>
+               <type>int</type>
+       </param>
+       <param>
+               <name>Bits per Symbol</name>
+               <key>bits_per_symbol</key>
+               <value>2</value>
+               <type>int</type>
+               <hide>$type.hide_bps</hide>
+       </param>
+       <sink>
+               <name>ref</name>
+               <type>byte</type>
+       </sink>
+       <sink>
+               <name>in</name>
+               <type>byte</type>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>float</type>
+       </source>
+       <doc>
+Calculate the bit error rate (BER) or the symbol error rate (SER) over a number of samples given by the window size. \
+The actual window size will start at size one and grow to the full window size as new samples arrive. \
+Once the window has reached full size, old samples are shifted out of the window and new samples shfited in.
+
+The error block compares the input byte stream to the reference byte stream. \
+For example, the reference byte stream could be the input to a modulator, \
+and the input byte stream could be the output of a modulator.
+
+Each byte in the incoming stream represents one symbol. \
+The bits per symbol parameter is only useful for calculating the BER.
+       </doc>
+</block>