summaryrefslogtreecommitdiff
path: root/gr-fec
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fec')
-rw-r--r--gr-fec/CMakeLists.txt5
-rw-r--r--gr-fec/doc/fec.dox348
-rw-r--r--gr-fec/examples/CMakeLists.txt36
-rw-r--r--gr-fec/examples/ber_curve_gen.grc1633
-rw-r--r--gr-fec/examples/ber_test.grc1538
-rw-r--r--gr-fec/examples/fecapi_async_decoders.grc2153
-rw-r--r--gr-fec/examples/fecapi_async_encoders.grc1591
-rw-r--r--gr-fec/examples/fecapi_async_packed_decoders.grc1839
-rw-r--r--gr-fec/examples/fecapi_async_to_stream.grc2081
-rw-r--r--gr-fec/examples/fecapi_cc_decoders.grc1316
-rw-r--r--gr-fec/examples/fecapi_decoders.grc1983
-rw-r--r--gr-fec/examples/fecapi_encoders.grc1696
-rw-r--r--gr-fec/examples/fecapi_tagged_decoders.grc2106
-rw-r--r--gr-fec/examples/fecapi_tagged_encoders.grc2613
-rw-r--r--gr-fec/grc/fec_async_decoder.xml61
-rw-r--r--gr-fec/grc/fec_async_encoder.xml77
-rw-r--r--gr-fec/grc/fec_ber_bf.xml54
-rw-r--r--gr-fec/grc/fec_bercurve_generator.xml95
-rw-r--r--gr-fec/grc/fec_block_tree.xml42
-rw-r--r--gr-fec/grc/fec_decode_ccsds_27_fb.xml24
-rw-r--r--gr-fec/grc/fec_decoder.xml91
-rw-r--r--gr-fec/grc/fec_depuncture_bb.xml45
-rw-r--r--gr-fec/grc/fec_encoder.xml91
-rw-r--r--gr-fec/grc/fec_extended_async_encoder.xml38
-rw-r--r--gr-fec/grc/fec_extended_decoder.xml72
-rw-r--r--gr-fec/grc/fec_extended_encoder.xml57
-rw-r--r--gr-fec/grc/fec_extended_tagged_decoder.xml58
-rw-r--r--gr-fec/grc/fec_extended_tagged_encoder.xml43
-rw-r--r--gr-fec/grc/fec_puncture_xx.xml53
-rw-r--r--gr-fec/grc/fec_tagged_decoder.xml67
-rw-r--r--gr-fec/grc/fec_tagged_encoder.xml67
-rw-r--r--gr-fec/grc/variable_cc_decoder_def_list.xml146
-rw-r--r--gr-fec/grc/variable_cc_encoder_def_list.xml139
-rw-r--r--gr-fec/grc/variable_ccsds_encoder_def_list.xml103
-rw-r--r--gr-fec/grc/variable_dummy_decoder_def_list.xml73
-rw-r--r--gr-fec/grc/variable_dummy_encoder_def_list.xml73
-rw-r--r--gr-fec/grc/variable_repetition_decoder_def_list.xml87
-rw-r--r--gr-fec/grc/variable_repetition_encoder_def_list.xml80
-rw-r--r--gr-fec/include/gnuradio/fec/CMakeLists.txt22
-rw-r--r--gr-fec/include/gnuradio/fec/async_decoder.h103
-rw-r--r--gr-fec/include/gnuradio/fec/async_encoder.h99
-rw-r--r--gr-fec/include/gnuradio/fec/ber_bf.h52
-rw-r--r--gr-fec/include/gnuradio/fec/cc_common.h51
-rw-r--r--gr-fec/include/gnuradio/fec/cc_decoder.h144
-rw-r--r--gr-fec/include/gnuradio/fec/cc_encoder.h140
-rw-r--r--gr-fec/include/gnuradio/fec/ccsds_encoder.h117
-rw-r--r--gr-fec/include/gnuradio/fec/conv_bit_corr_bb.h62
-rw-r--r--gr-fec/include/gnuradio/fec/decoder.h97
-rw-r--r--gr-fec/include/gnuradio/fec/depuncture_bb.h111
-rw-r--r--gr-fec/include/gnuradio/fec/dummy_decoder.h76
-rw-r--r--gr-fec/include/gnuradio/fec/dummy_encoder.h76
-rw-r--r--gr-fec/include/gnuradio/fec/encoder.h76
-rw-r--r--gr-fec/include/gnuradio/fec/generic_decoder.h242
-rw-r--r--gr-fec/include/gnuradio/fec/generic_encoder.h152
-rw-r--r--gr-fec/include/gnuradio/fec/puncture_bb.h105
-rw-r--r--gr-fec/include/gnuradio/fec/puncture_ff.h104
-rw-r--r--gr-fec/include/gnuradio/fec/repetition_decoder.h82
-rw-r--r--gr-fec/include/gnuradio/fec/repetition_encoder.h78
-rw-r--r--gr-fec/include/gnuradio/fec/tagged_decoder.h95
-rw-r--r--gr-fec/include/gnuradio/fec/tagged_encoder.h75
-rw-r--r--gr-fec/lib/CMakeLists.txt50
-rw-r--r--gr-fec/lib/async_decoder_impl.cc223
-rw-r--r--gr-fec/lib/async_decoder_impl.h69
-rw-r--r--gr-fec/lib/async_encoder_impl.cc194
-rw-r--r--gr-fec/lib/async_encoder_impl.h71
-rw-r--r--gr-fec/lib/ber_bf_impl.cc143
-rw-r--r--gr-fec/lib/ber_bf_impl.h56
-rw-r--r--gr-fec/lib/ber_tools.cc106
-rw-r--r--gr-fec/lib/ber_tools.h73
-rw-r--r--gr-fec/lib/cc_decoder_impl.cc503
-rw-r--r--gr-fec/lib/cc_decoder_impl.h106
-rw-r--r--gr-fec/lib/cc_encoder_impl.cc204
-rw-r--r--gr-fec/lib/cc_encoder_impl.h75
-rw-r--r--gr-fec/lib/ccsds_encoder_impl.cc152
-rw-r--r--gr-fec/lib/ccsds_encoder_impl.h64
-rw-r--r--gr-fec/lib/conv_bit_corr_bb_impl.cc258
-rw-r--r--gr-fec/lib/conv_bit_corr_bb_impl.h97
-rw-r--r--gr-fec/lib/decode_ccsds_27_fb_impl.cc16
-rw-r--r--gr-fec/lib/decoder_impl.cc120
-rw-r--r--gr-fec/lib/decoder_impl.h56
-rw-r--r--gr-fec/lib/depuncture_bb_impl.cc153
-rw-r--r--gr-fec/lib/depuncture_bb_impl.h58
-rw-r--r--gr-fec/lib/dummy_decoder_impl.cc124
-rw-r--r--gr-fec/lib/dummy_decoder_impl.h61
-rw-r--r--gr-fec/lib/dummy_encoder_impl.cc99
-rw-r--r--gr-fec/lib/dummy_encoder_impl.h57
-rw-r--r--gr-fec/lib/encoder_impl.cc113
-rw-r--r--gr-fec/lib/encoder_impl.h59
-rw-r--r--gr-fec/lib/generic_decoder.cc168
-rw-r--r--gr-fec/lib/generic_encoder.cc120
-rw-r--r--gr-fec/lib/puncture_bb_impl.cc153
-rw-r--r--gr-fec/lib/puncture_bb_impl.h58
-rw-r--r--gr-fec/lib/puncture_ff_impl.cc153
-rw-r--r--gr-fec/lib/puncture_ff_impl.h58
-rw-r--r--gr-fec/lib/repetition_decoder_impl.cc144
-rw-r--r--gr-fec/lib/repetition_decoder_impl.h67
-rw-r--r--gr-fec/lib/repetition_encoder_impl.cc108
-rw-r--r--gr-fec/lib/repetition_encoder_impl.h58
-rw-r--r--gr-fec/lib/tagged_decoder_impl.cc92
-rw-r--r--gr-fec/lib/tagged_decoder_impl.h55
-rw-r--r--gr-fec/lib/tagged_encoder_impl.cc93
-rw-r--r--gr-fec/lib/tagged_encoder_impl.h55
-rw-r--r--gr-fec/python/fec/CMakeLists.txt12
-rw-r--r--gr-fec/python/fec/__init__.py17
-rwxr-xr-xgr-fec/python/fec/_qa_helper.py90
-rw-r--r--gr-fec/python/fec/bercurve_generator.py95
-rw-r--r--gr-fec/python/fec/bitflip.py80
-rw-r--r--gr-fec/python/fec/capillary_threaded_decoder.py100
-rw-r--r--gr-fec/python/fec/capillary_threaded_encoder.py102
-rw-r--r--gr-fec/python/fec/extended_async_encoder.py67
-rw-r--r--gr-fec/python/fec/extended_decoder.py176
-rw-r--r--gr-fec/python/fec/extended_encoder.py74
-rw-r--r--gr-fec/python/fec/extended_tagged_decoder.py175
-rw-r--r--gr-fec/python/fec/extended_tagged_encoder.py82
-rw-r--r--gr-fec/python/fec/fec_test.py123
-rw-r--r--gr-fec/python/fec/qa_depuncture.py192
-rw-r--r--gr-fec/python/fec/qa_fecapi_cc.py195
-rw-r--r--gr-fec/python/fec/qa_fecapi_dummy.py190
-rw-r--r--gr-fec/python/fec/qa_fecapi_repetition.py161
-rw-r--r--gr-fec/python/fec/qa_puncture.py244
-rw-r--r--gr-fec/python/fec/threaded_decoder.py60
-rw-r--r--gr-fec/python/fec/threaded_encoder.py59
-rw-r--r--gr-fec/swig/fec_swig.i61
123 files changed, 31895 insertions, 35 deletions
diff --git a/gr-fec/CMakeLists.txt b/gr-fec/CMakeLists.txt
index b40023766b..393e5423e0 100644
--- a/gr-fec/CMakeLists.txt
+++ b/gr-fec/CMakeLists.txt
@@ -28,6 +28,7 @@ include(GrBoost)
include(GrComponent)
GR_REGISTER_COMPONENT("gr-fec" ENABLE_GR_FEC
+ ENABLE_VOLK
Boost_FOUND
ENABLE_GNURADIO_RUNTIME
ENABLE_GR_BLOCKS
@@ -40,6 +41,8 @@ GR_SET_GLOBAL(GR_FEC_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/include
)
+SET(GR_PKG_FEC_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/fec)
+
########################################################################
# Begin conditional configuration
########################################################################
@@ -89,7 +92,7 @@ if(ENABLE_PYTHON)
add_subdirectory(python/fec)
add_subdirectory(grc)
endif(ENABLE_PYTHON)
-#add_subdirectory(examples)
+add_subdirectory(examples)
add_subdirectory(doc)
########################################################################
diff --git a/gr-fec/doc/fec.dox b/gr-fec/doc/fec.dox
index c8114eeedb..7fbbdda6e3 100644
--- a/gr-fec/doc/fec.dox
+++ b/gr-fec/doc/fec.dox
@@ -21,4 +21,352 @@ by using:
help(fec)
\endcode
+
+\section fec_using Using the FEC API
+
+FEC is a complex issue to implement in a generic, generally usable
+way. To help with these issues, the FEC API operates on two levels:
+the coder variables and the coder deployments. The variables implement
+the encoding and decoding methods whereas the deployments set up the
+variables, make sure the input data is formatted properly, run the
+coder variable, and then pass on the data for follow-on processing.
+
+In a GNU Radio flowgraph, the deployments are GNU Radio blocks that we
+insert into the flowgraph. The deployments use the API of the coder
+variables to interact with the scheduler and set up the input/output
+item buffers that move data between blocks. The intent of the API is
+to be able to build the coding variables that are general enough for
+easy use in multiple situations. We then construct deployments to
+control the interaction between the data and the variable. GNU Radio
+provides deployments for a number of situations, but these should not
+be considered the only ways to deploy the decoders.
+
+
+\subsection fec_deployments Deployments
+
+Generally speaking, encoder deployments take in bits and produce
+bits (i.e., unpacked bytes with 1 bit per byte). Decoder deployments
+take in floats and produce bits. The floats are generally meant to
+represent soft decisions. If the demodulator does not produce soft
+decisions, an easy alternative is to convert the hard decision 0's and
+1's to -1 and +1 floats. The main departure from this model is when
+using a PDU-based modulator or demodulator, for which we can look at
+using the asynchronous message passing system. In this instance,
+passing bits is not natural, so we need to create a deployment that
+can handle packed bytes. GNU Radio has the gr::fec::asycn_encoder and
+gr::fec::async_decoder deployments that work in this mode.
+
+Some coding variables handle inputs and outputs differently than the
+described deployments. Using the FEC API provides concepts of input
+and output conversion properties that help us create deployments to
+convert the data streams to the required format of the variable.
+
+\subsubsection fec_deploy_simple Streaming Deployments
+
+For the encoder deployments, the gr::fec::encoder block is a
+relatively simple deployment for the encoding variables. It uses the
+encoding object information about the input/output sizes and
+input/output item sizes to set up the interaction with the
+scheduler. Typically, a coder will add redundancy to the stream making
+the output longer by some amount than the input stream. This block
+simply takes in an encoder object, specifically an object that derives
+from gr::fec::generic_encoder. It also takes in the input and output
+items sizes that the encoder will expect, which we can just ask the
+encoder for. Typically, the encodes expect unpacked bytes in and
+unpacked bytes out.
+
+The gr::fec::decoder block is a similarly simple deployment for the
+decoding variables. It uses the decoding variable information about
+the input/output sizes and input/output item sizes to set up the
+interaction with the scheduler. Since a decoder typically uses the
+redundancy from the input stream to correct for errors, the input
+stream will be longer than the output stream by the rate of the
+code. This block simply takes in an decoder object, specifically an
+object that derives from gr::fec::generic_decoder. It also takes in
+the input and output items sizes that the decoder will expect, which
+we can just ask the encoder for. The deployment expects a floating
+point stream input, though the decoder variables may take a float
+input or a byte. If using a byte format, it could be a hard decision
+or a quantized soft decision, depending on how the decoder object
+behaves.
+
+Normally, though, we don't work directly with these simple encoder()
+or decoder() deployments but a wrapper around those blocks. GNU
+Radio's gr-fec package comes with two Python deployments to make
+things easier: fec.extended_encoder and fec.extended_decoder. For one
+thing, these extended hier_block2 blocks take care of the puncturing
+and depuncturing operations often found in FEC codes. The other thing
+that these blocks do for us is read the API of the encoder/decoder
+variables to properly convert the data in or out, depending on how the
+coding object works.
+
+For instance, a generic_decoder takes in floating point values (which
+should be soft decisions). However, a decoder might instead want to
+work on 8-bit quantized soft decisions and so expects unsigned
+chars. Specifying 'uchar' as the
+gr::fec::generic_decoder::get_input_conversion() of the decoder block tells the
+fec.extended_decoder to convert the float to a byte.
+
+In GRC, we would add an "FEC Extended Encoder" to our transmitter or
+an "FEC Extended Decoder" to the receiver. We would then use one of
+the encoder or decoder FEC variable blocks to define the parameters of
+the particular code we want to use. We can find these codes under the
+[Error Coding] category in GRC. The encoders are found under
+[Encoders] and similarly the decoders under the [Decoders]
+categories. Putting these onto the canvas creates a variable that we
+can then pass to the extended encoder or decoder deployment blocks.
+
+Most of the parameters of the encoder and decoder definitions should
+be fairly obvious based on the type of code. See the documentation for
+each coding object for more details. In the following section \ref
+fec_parallelism, we explain the Parallelism and Dimension properties.
+
+See fec/fecapi_encoders.grc and fec/fecapi_decoders.grc in the
+installed examples for an example of how to work with these
+deployments given the three initial FEC coders available.
+
+\subsubsection fec_deploy_tag_stream Tagged Stream Deployments
+
+GNU Radio's gr-fec also comes with simple deployments for \ref
+page_tagged_stream_blocks blocks. These deployments work similarly to
+the normal streaming deployments but fit into a tagged stream system
+by setting a tagged stream tag to control the frame size. Like all
+tagged stream blocks, they expect the tag to be located in the stream
+in order to properly function.
+
+The simplest form of the tagged stream deployments are just the C++
+blocks gr::fec::tagged_encoder and gr::fec::tagged_decoder. These do
+not handle any input or output conversion. They expect the inputs to
+be already properly formatted for the encoding/decoding variables, and
+the outputs will be whatever the variable naturally produce.
+
+In the tagged stream deployments, the frame size set for a variable is
+no longer the static frame size like we expected in the streaming data
+implementations. Instead, we look at the frame size of the
+encoder/decoder variable during construction of the deployment as the
+maximum frame size, or a maximum transmission unit (MTU). This allows
+us to set up some internal memory to handle up to the required maximum
+length. When a tagged stream comes into this block, the frame size is
+then set based on that tagged stream information. If the frame is
+larger than the established MTU, a warning is sent out and the
+deployment only handles up to the MTU of the given frame.
+
+The extended Python tagged deployments, fec.extended_tagged_encoder
+and fec.extended_tagged_decoder, offer additional handling of the FEC
+API like we saw with the fec.extended_encoder and
+fec.extended_decoder. These extended deployments wrap up the
+puncturing and depuncturing as well as use the FEC API to do any input
+and output translation for the formatting of data streams. The
+fec.extended_tagged_encoder expects unpacked bits in and produces
+unpacked bits out. The fec.extended_tagged_decoder takes in floats
+(generally soft decisions from -1 to 1) and produces unpacked bits.
+
+See fec/fecapi_tagged_encoders.grc and fec/fecapi_tagged_decoders.grc
+in the installed examples for an example of how to work with these
+deployments given the three initial FEC coders available.
+
+
+
+\subsubsection fec_deploy_async Asynchronous Deployments
+
+The final standard deployment shipped with GNU Radio is for
+asynchronous \ref page_msg_passing and handling PDUs:
+gr::fec::async_encoder and gr::fec::async_decoder.
+
+Unlike the other deployments, these C++ deployments do not also have
+an extended Python deployment. Because this deployment uses message
+passing, we cannot easily build up a hierarchical block of message
+passing blocks to satisfy the input/output translations like we've
+done with the other forms of deployment. Instead, the input/output
+formatting is taken care of inside this deployment itself. Further,
+because this form of moving data anticipates data being moved in
+packets, these deployments cannot work with any FEC code that requires
+a history (see generic_decoder::get_history). Right now, this means
+that the async message passing deployments cannot work with
+convolutional codes (gr::fec::code::cc_encoder and
+gr::fec::code::cc_decoder) in streaming mode because it would require
+data from the next frame to finish off decoding the current frame.
+
+These deployments also work in two distinct modes. They can work in
+unpacked mode where inputs are messages of bits, or they may work in
+packed mode where messages are PDUs. The distinction is that the
+packed mode PDU's are the standard protocol data units (PDUs) that
+encompass full packets of data. This allows these async deployments to
+be used easily within PDU-based applications, such as encoding a
+packet with a CRC attached.
+
+When in packed or PDU mode, the encoder deployment has the option of
+reversing the bits during unpacking and packing. Like the extended
+deployments for the other data modes, these deployments manipulate the
+input data to the format expected by the encoding or decoding
+variables using calls to the FEC API. Because most of the coders work
+off unpacked bits, the incoming PDUs must first be unpacked into bits
+and the repacked again into the original PDU. The
+gr::blocks::kernel::pack_k_bits and gr::blocks::kernel::unpack_k_bits
+kernels are used here, and they can change the direction on how to
+pack and unpack. Because different data processing blocks, framing,
+deframing, and other operations may arbitrarily set the format of the
+bits and the ordering, we provide the options of unpacking and packing
+directions in the deployments. However, the gr::fec::async_decoder
+still expects the input to be soft decisions with one decision per
+item, so we only say whether this deployment outputs packed PDUs or
+not and the packing direction.
+
+For an example of using the asynchronous in PDU mode, see
+fec/fecapi_async_packed_decoders.grc. See
+fec/fecapi_async_to_stream.grc for an example of mixing the packed PDU
+mode encoder with a tagged stream decoder. This example shows the PDU
+input having a CRC32 appended to the uncoded stream that is then
+checked after the packet is decoded.
+
+For an example of the async deployment using unpacked bits, see
+fec/fecapi_async_encoders.grc and fec/fecapi_async_decoders.grc.
+
+
+\subsection fec_coding_vars Encoding/Decoding Variables
+
+GNU Radio currently has a minor subset of coders available:
+
+Coders:
+
+\li gr::fec::code::dummy_encoder
+\li gr::fec::code::repetition_encoder
+\li gr::fec::code::cc_encoder
+\li gr::fec::code::ccsds_encoder
+
+Decoders:
+\li gr::fec::code::dummy_decoder
+\li gr::fec::code::repetition_decoder
+\li gr::fec::code::cc_decoder
+
+
+When building a new FECAPI encoder or decoder variable, the dummy
+encoder/decoder block would be a good place to start. This coding set
+does no processing on the data. For the encoder, each bit is simply
+passed through directly. For the dummy decoder, the input data are
+floats, so -1's become 0 and 1's stay as 1, but nothing else is done
+to the data. Mainly, these blocks are used for references and to make
+it easy to compare implementations with and without codes by easily
+dropping in these objects instead of restructuring the entire
+flowgraph. The ber_curve_gen.grc example file uses the dummy codes to
+show the curve to compare against the actual codes.
+
+Although mentioned in the convolutional coder and decoder classes, it
+is worth another mention. The cc_encoder is a generic convolutional
+encoder that can take any value of K, rate, and polynomials to encode
+a data stream. However, the cc_decoder is not as general, even though
+it is technically parameterized as such. The cc_decoder block
+currently <i>only</i> uses K=7, rate=2, and two polynomials (because
+the rate is two). We can, in fact, alter the polynomials, but a
+default of [109, 79] is typically. Eventually, we will make this block
+more generic for different rates and constraint lengths and take this
+particular code implementation as the set CCSDS decoder, much like we
+have the ccsds_encoder class.
+
+
+\subsection fec_parallelism Parallelism
+
+The code variables in GNU Radio Companion have the ability to create
+multiple encoder/decoder variables by selecting the level of
+parallelism. It is up the encoder to understand how to handle the
+parallelism. The following discussion explains the difference between
+the two levels and how and when to use. Generally, normal applications
+will just use a single level of parallelism.
+
+The GRC variable declarations for the different coders has a setting
+for <i>Parallelism</i>, which can be either 1 or 2. If set to 1, then
+the resulting variable is a list of coder blocks with the same
+settings. If set to 2, then the resulting variable is a list of lists
+of coder blocks. The code that accepts these variables must understand
+how to handle the parallelism. Most applications would set this to 1.
+
+The standard fec.extended_encoder ("FEC Extended Encoder" in GRC) and
+fec.extended_decoder ("FEC Extended Decoder" in GRC) can handle a
+Parallelism of 1. They accept a list of coder variables as defined by
+Dimension 1 and can multithread the application based on the
+"Threading Type" setting:
+
+\li <b>None</b>: does no parallel threading of the coders. Even if
+Dimension 1 is > 1, the encoder/decoder will ignore this setting and
+only use the first object in the list.
+
+\li <b>Ordinary</b>: all "Dimension 1" number (N) of encoder/decoder
+blocks will be used in parallel. The hier_block2 will block
+deinterleave the packets into N streams (using
+gr::blocks::deinterleave with a value of blocksize as the frame length
+and no relative rate changes) and pass these to each of the N coders
+to process the frames in parallel. The output of each coder is then
+interleaved back together to make a single output stream.
+
+\li <b>Capillary</b>: all "Dimension 1" number (N) of encoder/decoder
+blocks will be used in parallel, much like in the <b>Ordinary</b>
+mode. In this mode, however, the frames get split up in a tree-like
+fashion, where each branch launches 2 more branches. This means that N
+must be a factor of 2 for this mode to work. It tends to handle the
+load of the encoders/decoders better than the <b>Ordinary</b> mode.
+
+Note that the threading modes only work when using constant-length
+frames. If using the coders in tagged stream mode where the frame
+lengths may change, the <b>Ordinary</b> and <b>Capillary</b> modes are
+not available.
+
+The GRC example "ber_curve_gen.grc" uses a Parallelism of 2. This
+creates a list of lists of coders. The first dimension of the list
+corresponds to the number of Es/N0 values being used in the BER
+simulation. This allows the application to process all values of Es/N0
+simultaneously. Dimension 2 in this case allows the same concept of
+parallelism discussed above with the <b>None</b>, <b>Ordinary</b>, and
+<b>Capillary</b> models of threading.
+
+
+\section fec_api The API of the FECAPI
+
+The FECAPI defined by the parent generic_encoder and generic_decoder
+classes defines a set of virtual functions, some pure virtual, to
+allow the encoders/decoders to interact with the GNU Radio blocks. See
+the associated documentation of the generic_encoder and
+generic_decoder classes to know more about each of the API functions,
+some of which a child class is <i>required</i> to implement.
+
+The functions of the encoder and decoder are:
+
+\li double gr::fec::generic_encoder::rate()
+\li int gr::fec::generic_encoder::get_input_size()
+\li int gr::fec::generic_encoder::get_output_size()
+\li int gr::fec::generic_encoder::get_history()
+\li float gr::fec::generic_encoder::get_shift()
+\li const char* gr::fec::generic_encoder::get_input_conversion()
+\li const char* gr::fec::generic_encoder::get_output_conversion()
+\li bool gr::fec::generic_encoder::set_frame_size(unsigned int frame_size)
+
+Note: there is no get_input_item_size (or output) as the encoders
+always expect to work on bits.
+
+\li double gr::fec::generic_decoder::rate()
+\li int gr::fec::generic_decoder::get_input_size()
+\li int gr::fec::generic_decoder::get_output_size()
+\li int gr::fec::generic_decoder::get_history()
+\li float gr::fec::generic_decoder::get_shift()
+\li int gr::fec::generic_decoder::get_input_item_size()
+\li int gr::fec::generic_decoder::get_output_item_size()
+\li const char* gr::fec::generic_decoder::get_input_conversion()
+\li const char* gr::fec::generic_decoder::get_output_conversion()
+\li bool gr::fec::generic_decoder::set_frame_size(unsigned int frame_size)
+
+Whenever an FECAPI object refers to the frame size, it always means
+the number of bits in the uncoded frame. This means the number of bits
+going into an encoder and the number of bits coming out of a decoder.
+
+\section fec_examples FEC Examples
+
+\li ber_curve_gen.grc
+\li ber_test.grc
+\li fecapi_decoders.grc
+\li fecapi_encoders.grc
+\li fecapi_tagged_decoders.grc
+\li fecapi_tagged_encoders.grc
+\li fecapi_async_decoders.grc
+\li fecapi_async_encoders.grc
+\li fecapi_async_to_stream.grc
+
*/
diff --git a/gr-fec/examples/CMakeLists.txt b/gr-fec/examples/CMakeLists.txt
new file mode 100644
index 0000000000..b203e9cc8b
--- /dev/null
+++ b/gr-fec/examples/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+include(GrPython)
+
+install(
+ FILES
+ ber_test.grc
+ ber_curve_gen.grc
+ fecapi_decoders.grc
+ fecapi_encoders.grc
+ fecapi_async_decoders.grc
+ fecapi_async_encoders.grc
+ fecapi_async_to_stream.grc
+ fecapi_async_packed_decoders.grc
+ fecapi_tagged_decoders.grc
+ fecapi_tagged_encoders.grc
+ DESTINATION ${GR_PKG_FEC_EXAMPLES_DIR}
+ COMPONENT "fec_python"
+)
diff --git a/gr-fec/examples/ber_curve_gen.grc b/gr-fec/examples/ber_curve_gen.grc
new file mode 100644
index 0000000000..455dca4cf5
--- /dev/null
+++ b/gr-fec/examples/ber_curve_gen.grc
@@ -0,0 +1,1633 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 13 19:32:00 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>ber_curve_gen</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>35000000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(12, 99)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(16, 370)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[79, 109]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(110, 371)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(249, 373)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>4096</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(160, 101)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>esno_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>numpy.arange(0, 8, .5) </value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(13, 193)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>len(esno_0)</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(594, 604)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>len(esno_0)</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(592, 455)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>len(esno_0)</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(301, 455)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>len(esno_0)</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_STREAMING</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(13, 451)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>len(esno_0)</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_STREAMING</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(15, 705)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>len(esno_0)</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>prob</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(301, 626)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_bercurve_generator</key>
+ <param>
+ <key>id</key>
+ <value>fec_bercurve_generator_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>esno</key>
+ <value>esno_0</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate_0</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>"capillary"</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>-100</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(481, 9)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <bus_source>1</bus_source>
+ </block>
+ <block>
+ <key>fec_bercurve_generator</key>
+ <param>
+ <key>id</key>
+ <value>fec_bercurve_generator_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>esno</key>
+ <value>esno_0</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate_0</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>"capillary"</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>-100</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(481, 132)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <bus_source>1</bus_source>
+ </block>
+ <block>
+ <key>fec_bercurve_generator</key>
+ <param>
+ <key>id</key>
+ <value>fec_bercurve_generator_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>esno</key>
+ <value>esno_0</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate_0</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>"capillary"</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>-100</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(481, 260)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <bus_source>1</bus_source>
+ </block>
+ <block>
+ <key>qtgui_bercurve_sink</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_bercurve_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>esno</key>
+ <value>esno_0</value>
+ </param>
+ <param>
+ <key>berminerrors</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>berlimit</key>
+ <value>-10</value>
+ </param>
+ <param>
+ <key>num_curves</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>curvenames</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-10</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.10</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>Rep. (Rate=3)</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>5</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(925, 56)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <bus_sink>1</bus_sink>
+ </block>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>2</source_key>
+ <sink_key>2</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>3</source_key>
+ <sink_key>3</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>4</source_key>
+ <sink_key>4</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>5</source_key>
+ <sink_key>5</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>6</source_key>
+ <sink_key>6</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>7</source_key>
+ <sink_key>7</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>8</source_key>
+ <sink_key>8</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>9</source_key>
+ <sink_key>9</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>10</source_key>
+ <sink_key>10</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>11</source_key>
+ <sink_key>11</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>12</source_key>
+ <sink_key>12</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>13</source_key>
+ <sink_key>13</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>14</source_key>
+ <sink_key>14</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>15</source_key>
+ <sink_key>15</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>16</source_key>
+ <sink_key>16</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>17</source_key>
+ <sink_key>17</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>18</source_key>
+ <sink_key>18</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>19</source_key>
+ <sink_key>19</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>20</source_key>
+ <sink_key>20</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>21</source_key>
+ <sink_key>21</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>22</source_key>
+ <sink_key>22</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>23</source_key>
+ <sink_key>23</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>24</source_key>
+ <sink_key>24</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>25</source_key>
+ <sink_key>25</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>26</source_key>
+ <sink_key>26</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>27</source_key>
+ <sink_key>27</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>28</source_key>
+ <sink_key>28</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>29</source_key>
+ <sink_key>29</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>30</source_key>
+ <sink_key>30</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>31</source_key>
+ <sink_key>31</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>32</source_key>
+ <sink_key>96</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>32</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>33</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>2</source_key>
+ <sink_key>34</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>3</source_key>
+ <sink_key>35</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>4</source_key>
+ <sink_key>36</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>5</source_key>
+ <sink_key>37</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>6</source_key>
+ <sink_key>38</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>7</source_key>
+ <sink_key>39</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>8</source_key>
+ <sink_key>40</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>9</source_key>
+ <sink_key>41</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>10</source_key>
+ <sink_key>42</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>11</source_key>
+ <sink_key>43</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>12</source_key>
+ <sink_key>44</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>13</source_key>
+ <sink_key>45</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>14</source_key>
+ <sink_key>46</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>15</source_key>
+ <sink_key>47</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>16</source_key>
+ <sink_key>48</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>17</source_key>
+ <sink_key>49</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>18</source_key>
+ <sink_key>50</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>19</source_key>
+ <sink_key>51</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>20</source_key>
+ <sink_key>52</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>21</source_key>
+ <sink_key>53</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>22</source_key>
+ <sink_key>54</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>23</source_key>
+ <sink_key>55</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>24</source_key>
+ <sink_key>56</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>25</source_key>
+ <sink_key>57</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>26</source_key>
+ <sink_key>58</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>27</source_key>
+ <sink_key>59</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>28</source_key>
+ <sink_key>60</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>29</source_key>
+ <sink_key>61</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>30</source_key>
+ <sink_key>62</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>31</source_key>
+ <sink_key>63</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>32</source_key>
+ <sink_key>97</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>64</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>65</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>2</source_key>
+ <sink_key>66</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>3</source_key>
+ <sink_key>67</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>4</source_key>
+ <sink_key>68</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>5</source_key>
+ <sink_key>69</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>6</source_key>
+ <sink_key>70</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>7</source_key>
+ <sink_key>71</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>8</source_key>
+ <sink_key>72</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>9</source_key>
+ <sink_key>73</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>10</source_key>
+ <sink_key>74</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>11</source_key>
+ <sink_key>75</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>12</source_key>
+ <sink_key>76</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>13</source_key>
+ <sink_key>77</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>14</source_key>
+ <sink_key>78</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>15</source_key>
+ <sink_key>79</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>16</source_key>
+ <sink_key>80</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>17</source_key>
+ <sink_key>81</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>18</source_key>
+ <sink_key>82</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>19</source_key>
+ <sink_key>83</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>20</source_key>
+ <sink_key>84</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>21</source_key>
+ <sink_key>85</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>22</source_key>
+ <sink_key>86</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>23</source_key>
+ <sink_key>87</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>24</source_key>
+ <sink_key>88</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>25</source_key>
+ <sink_key>89</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>26</source_key>
+ <sink_key>90</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>27</source_key>
+ <sink_key>91</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>28</source_key>
+ <sink_key>92</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>29</source_key>
+ <sink_key>93</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>30</source_key>
+ <sink_key>94</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>31</source_key>
+ <sink_key>95</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_bercurve_generator_0</source_block_id>
+ <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+ <source_key>32</source_key>
+ <sink_key>98</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/ber_test.grc b/gr-fec/examples/ber_test.grc
new file mode 100644
index 0000000000..3d3a5510db
--- /dev/null
+++ b/gr-fec/examples/ber_test.grc
@@ -0,0 +1,1538 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Mon May 12 21:49:02 2014</timestamp>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(241, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>berminerrs</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(433, 12)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>noise</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>numpy.sqrt((10.0**(-esno/10.0))/2.0)</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(428, 93)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(337, 12)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>4096</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(155, 89)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>35000000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(12, 91)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[79, 109]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(290, 91)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_unpacked_to_packed_xx</key>
+ <param>
+ <key>id</key>
+ <value>blocks_unpacked_to_packed_xx_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>bits_per_chunk</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>endianness</key>
+ <value>gr.GR_LSB_FIRST</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(932, 412)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_decoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1026, 258)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1125, 194)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(942, 194)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>capillary</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(628, 163)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(90, 337)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_unpack_k_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_unpack_k_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(402, 194)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_fastnoise_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_fastnoise_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
+ </param>
+ <param>
+ <key>amp</key>
+ <value>noise</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>samples</key>
+ <value>8192</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(963, 29)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_add_xx</key>
+ <param>
+ <key>id</key>
+ <value>blocks_add_xx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1358, 162)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_number_sink</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_number_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>avg</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>graph_type</key>
+ <value>qtgui.NUM_GRAPH_HORIZ</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>-10</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.10</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>BER</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>("blue", "red")</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>("black", "black")</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1504, 446)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>QT GUI Plot</value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-1.25</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.25</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.10</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1515, 115)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_ber_bf</key>
+ <param>
+ <key>id</key>
+ <value>fec_ber_bf_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>test_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>berminerrors</key>
+ <value>berminerrs</value>
+ </param>
+ <param>
+ <key>berlimit</key>
+ <value>-7.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1244, 455)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(89, 186)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_STREAMING</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(28, 419)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>framebits</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_STREAMING</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(318, 419)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_qtgui_range</key>
+ <param>
+ <key>id</key>
+ <value>esno</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>EsN0</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>stop</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>step</key>
+ <value>0.25</value>
+ </param>
+ <param>
+ <key>widget</key>
+ <value>counter_slider</value>
+ </param>
+ <param>
+ <key>orient</key>
+ <value>Qt.Horizontal</value>
+ </param>
+ <param>
+ <key>min_len</key>
+ <value>200</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(614, 535)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>ber_test</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_decoder_0</source_block_id>
+ <sink_block_id>blocks_unpacked_to_packed_xx_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_add_xx_0</source_block_id>
+ <sink_block_id>fec_extended_decoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>fec_ber_bf_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_unpack_k_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1</source_block_id>
+ <sink_block_id>blocks_add_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_0</source_block_id>
+ <sink_block_id>digital_map_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpacked_to_packed_xx_0_0</source_block_id>
+ <sink_block_id>fec_ber_bf_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_fastnoise_source_x_0</source_block_id>
+ <sink_block_id>blocks_add_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_add_xx_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_ber_bf_0</source_block_id>
+ <sink_block_id>qtgui_number_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_async_decoders.grc b/gr-fec/examples/fecapi_async_decoders.grc
new file mode 100644
index 0000000000..42429ec6c7
--- /dev/null
+++ b/gr-fec/examples/fecapi_async_decoders.grc
@@ -0,0 +1,2153 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 20 15:23:14 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_async_decoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 73)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(264, 535)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(308, 600)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 536)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(785, 473)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(171, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(282, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(366, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(109, 224)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(599, 538)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(598, 636)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_to_pdu</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tagged_stream_to_pdu_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(364, 143)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_stream_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_stream_to_tagged_stream_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>packet_len</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(69, 281)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_pdu_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_pdu_to_tagged_stream_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(411, 239)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1,1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(409, 311)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(781, 538)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>prob</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(781, 651)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(137, 354)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(420, 430)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>512</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>Decoded</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>Input</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>Rep. (Rate=3)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1059, 368)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_async_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_async_decoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>decoder</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>packed</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>rev_pack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(852, 142)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_pdu_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_pdu_to_tagged_stream_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(860, 224)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(865, 308)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_to_pdu</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tagged_stream_to_pdu_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(601, 375)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(frame_size/15)*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(60, 140)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(50, 502)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(401, 510)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(401, 687)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_ccsds_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(992, 537)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_async_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_async_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>packed</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>rev_unpack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>rev_pack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(600, 143)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.10</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(639, 250)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(408, 375)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_stream_to_tagged_stream_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_async_decoder_0</source_block_id>
+ <sink_block_id>blocks_pdu_to_tagged_stream_0_0</sink_block_id>
+ <source_key>out</source_key>
+ <sink_key>pdus</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0_0</source_block_id>
+ <sink_block_id>blocks_tagged_stream_to_pdu_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tagged_stream_to_pdu_0</source_block_id>
+ <sink_block_id>fec_async_encoder_0</sink_block_id>
+ <source_key>pdus</source_key>
+ <sink_key>in</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_pdu_to_tagged_stream_0</source_block_id>
+ <sink_block_id>digital_map_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>blocks_tagged_stream_to_pdu_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_0_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_pdu_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tagged_stream_to_pdu_1</source_block_id>
+ <sink_block_id>fec_async_decoder_0</sink_block_id>
+ <source_key>pdus</source_key>
+ <sink_key>in</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_async_encoder_0</source_block_id>
+ <sink_block_id>blocks_pdu_to_tagged_stream_0</sink_block_id>
+ <source_key>out</source_key>
+ <sink_key>pdus</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_async_encoders.grc b/gr-fec/examples/fecapi_async_encoders.grc
new file mode 100644
index 0000000000..3dd0d0f8fe
--- /dev/null
+++ b/gr-fec/examples/fecapi_async_encoders.grc
@@ -0,0 +1,1591 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Mon May 19 16:19:57 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_async_encoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(421, 102)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(396, 166)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(354, 102)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 73)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(171, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(282, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(366, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(frame_size/15)*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(61, 140)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_pdu_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_pdu_to_tagged_stream_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(577, 297)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>QT GUI Plot</value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>Rep. (Rate=3)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1226, 359)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(950, 400)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(43, 436)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(57, 219)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_stream_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_stream_to_tagged_stream_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>packet_len</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(58, 273)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_to_pdu</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tagged_stream_to_pdu_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(100, 345)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_STREAMING</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(378, 490)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(575, 490)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(575, 570)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(686, 148)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_STREAMING</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(489, 69)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(686, 69)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_async_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_async_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>packed</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>rev_unpack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>rev_pack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(349, 296)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(804, 273)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1034, 297)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(331, 376)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(553, 384)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_stream_to_tagged_stream_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_tagged_stream_to_pdu_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tagged_stream_to_pdu_0</source_block_id>
+ <sink_block_id>fec_async_encoder_0</sink_block_id>
+ <source_key>pdus</source_key>
+ <sink_key>in</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_pdu_to_tagged_stream_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_async_encoder_0</source_block_id>
+ <sink_block_id>blocks_pdu_to_tagged_stream_0</sink_block_id>
+ <source_key>out</source_key>
+ <sink_key>pdus</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_async_packed_decoders.grc b/gr-fec/examples/fecapi_async_packed_decoders.grc
new file mode 100644
index 0000000000..8d1affe628
--- /dev/null
+++ b/gr-fec/examples/fecapi_async_packed_decoders.grc
@@ -0,0 +1,1839 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 20 15:19:00 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_async_decoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(785, 473)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 536)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(308, 600)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(264, 535)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 73)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(171, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(282, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(366, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(109, 224)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(50, 502)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(frame_size/15)*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(60, 140)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(781, 538)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>prob</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(781, 651)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(865, 308)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_pdu_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_pdu_to_tagged_stream_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(860, 224)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_stream_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_stream_to_tagged_stream_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>packet_len</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(93, 328)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(362, 429)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_pdu_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_pdu_to_tagged_stream_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(408, 190)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(544, 256)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1,1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(379, 280)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_to_pdu</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tagged_stream_to_pdu_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(583, 367)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>512</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>140</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>Decoded</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>Input</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>Rep. (Rate=3)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1059, 368)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(598, 636)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(599, 538)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(401, 510)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(402, 687)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_to_pdu</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tagged_stream_to_pdu_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(363, 112)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(372, 367)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_ccsds_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1032, 503)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_async_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_async_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>packed</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>rev_unpack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>rev_pack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(599, 112)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_async_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_async_decoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>decoder</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>packed</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>rev_pack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(851, 111)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>note</key>
+ <param>
+ <key>id</key>
+ <value>note_ccsds</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>note</key>
+ <value>When using CCSDS encoder, turn Rev. Unpacking to Off/False in the Async Decoder</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1034, 617)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_stream_to_tagged_stream_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_async_decoder_0</source_block_id>
+ <sink_block_id>blocks_pdu_to_tagged_stream_0_0</sink_block_id>
+ <source_key>out</source_key>
+ <sink_key>pdus</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_0_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_pdu_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_tagged_stream_to_pdu_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>digital_map_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_pdu_to_tagged_stream_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tagged_stream_to_pdu_1</source_block_id>
+ <sink_block_id>fec_async_decoder_0</sink_block_id>
+ <source_key>pdus</source_key>
+ <sink_key>in</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_async_encoder_0</source_block_id>
+ <sink_block_id>blocks_pdu_to_tagged_stream_0</sink_block_id>
+ <source_key>out</source_key>
+ <sink_key>pdus</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tagged_stream_to_pdu_0</source_block_id>
+ <sink_block_id>fec_async_encoder_0</sink_block_id>
+ <source_key>pdus</source_key>
+ <sink_key>in</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>blocks_tagged_stream_to_pdu_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_async_to_stream.grc b/gr-fec/examples/fecapi_async_to_stream.grc
new file mode 100644
index 0000000000..78a6e50c84
--- /dev/null
+++ b/gr-fec/examples/fecapi_async_to_stream.grc
@@ -0,0 +1,2081 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 20 15:21:44 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_async_decoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 73)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(264, 535)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(308, 600)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 536)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(171, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(282, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(366, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(frame_size/15)*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(61, 140)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(109, 224)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_stream_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_stream_to_tagged_stream_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>packet_len</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(83, 279)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_to_pdu</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tagged_stream_to_pdu_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(83, 369)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_crc32_async_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_crc32_async_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>check</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(101, 441)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(50, 502)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1,1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(713, 279)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(452, 354)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_pdu_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_pdu_to_tagged_stream_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>tag</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(400, 252)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(598, 509)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(598, 588)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(780, 509)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>prob</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(782, 603)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>512</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>140</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>Input</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>Dummy</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>Rep. (Rate=3)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1364, 167)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(707, 188)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>5120</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-2</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>Input</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>Dummy</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>Rep. (Rate=3)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(865, 58)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_decoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(875, 164)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(400, 684)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>8000</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(401, 510)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(925, 309)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1200, 191)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_crc32_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_crc32_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>check</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>lengthtagname</key>
+ <value>pkt_len</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1214, 332)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_async_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_async_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>packed</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>rev_unpack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>rev_pack</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(429, 148)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_stream_to_tagged_stream_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tagged_stream_to_pdu_0</source_block_id>
+ <sink_block_id>digital_crc32_async_bb_0</sink_block_id>
+ <source_key>pdus</source_key>
+ <sink_key>in</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_crc32_async_bb_0</source_block_id>
+ <sink_block_id>fec_async_encoder_0</sink_block_id>
+ <source_key>out</source_key>
+ <sink_key>in</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_async_encoder_0</source_block_id>
+ <sink_block_id>blocks_pdu_to_tagged_stream_0</sink_block_id>
+ <source_key>out</source_key>
+ <sink_key>pdus</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_tagged_stream_to_pdu_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_0_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_crc32_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_pdu_to_tagged_stream_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>digital_map_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>fec_extended_tagged_decoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_decoder_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0_0</source_block_id>
+ <sink_block_id>digital_crc32_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_cc_decoders.grc b/gr-fec/examples/fecapi_cc_decoders.grc
new file mode 100644
index 0000000000..26f5b03a91
--- /dev/null
+++ b/gr-fec/examples/fecapi_cc_decoders.grc
@@ -0,0 +1,1316 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Mon May 12 22:11:14 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_cc_decoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>3000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(9, 95)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[79, 109]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(363, 697)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(304, 615)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(221, 700)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(405, 612)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(420, 9)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(102, 328)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(57, 525)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(frame_size/15)*[1, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(59, 200)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>60</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(249, 7)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>ordinary</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(425, 399)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_decoder_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>capillary</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1153, 391)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(923, 430)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(740, 429)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1462, 432)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(552, 13)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>QT GUI Plot</value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.10</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>Dummy Code</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1763, 317)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(501, 616)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(797, 614)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_unpack_k_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_unpack_k_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(105, 430)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(450, 299)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_unpack_k_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_decoder_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1</source_block_id>
+ <sink_block_id>fec_extended_decoder_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_0</source_block_id>
+ <sink_block_id>digital_map_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_decoders.grc b/gr-fec/examples/fecapi_decoders.grc
new file mode 100644
index 0000000000..5b4f323f77
--- /dev/null
+++ b/gr-fec/examples/fecapi_decoders.grc
@@ -0,0 +1,1983 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 20 13:32:56 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_decoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>3000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 74)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(58, 562)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(123, 562)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(98, 623)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(171, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(280, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(361, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(553, 562)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TAILBITING</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(174, 688)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_ccsds_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TAILBITING</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(189, 562)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_decoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(842, 401)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>capillary</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(321, 409)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(545, 425)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(684, 425)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_decoder_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(842, 213)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_1_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>capillary</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(321, 221)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(543, 237)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(680, 237)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_decoder_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(842, 306)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(682, 330)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(545, 330)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>capillary</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(321, 314)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(frame_size/15)*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(56, 139)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_unpack_k_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_unpack_k_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(116, 371)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(54, 464)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(99, 267)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>prob</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(553, 674)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1067, 330)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1064, 237)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1064, 425)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>Input</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>Dummy</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>Rep. (Rate=3)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1292, 178)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(322, 152)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(371, 562)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(371, 656)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_0_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>2</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>3</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_1_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_1_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_1_0</source_block_id>
+ <sink_block_id>digital_map_bb_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_2</source_block_id>
+ <sink_block_id>fec_extended_decoder_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0_2_0</source_block_id>
+ <sink_block_id>fec_extended_decoder_0_1_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_1_0_0</source_block_id>
+ <sink_block_id>digital_map_bb_0_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0_0_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0</source_block_id>
+ <sink_block_id>fec_extended_decoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_1</source_block_id>
+ <sink_block_id>digital_map_bb_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_unpack_k_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_decoder_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_decoder_0_1_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_decoder_0_1</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_encoders.grc b/gr-fec/examples/fecapi_encoders.grc
new file mode 100644
index 0000000000..683ff476a7
--- /dev/null
+++ b/gr-fec/examples/fecapi_encoders.grc
@@ -0,0 +1,1696 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Sat May 17 17:08:36 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_encoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(67, 488)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(92, 424)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(24, 424)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 73)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>60</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(170, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(279, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(372, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(frame_size/15)*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(17, 139)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(52, 221)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_unpack_k_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_unpack_k_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(63, 268)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(20, 320)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(158, 424)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_ccsds_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(356, 424)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(549, 424)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>frame_size*8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(747, 424)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(567, 231)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(567, 309)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(568, 154)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(347, 293)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(347, 138)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_encoder_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>none</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(347, 215)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.05</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>packet_len</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>CC</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(760, 130)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.05</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>CC</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(762, 250)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_unpack_k_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_0_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_1</source_block_id>
+ <sink_block_id>blocks_char_to_float_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_encoder_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_tagged_decoders.grc b/gr-fec/examples/fecapi_tagged_decoders.grc
new file mode 100644
index 0000000000..8bae5bd249
--- /dev/null
+++ b/gr-fec/examples/fecapi_tagged_decoders.grc
@@ -0,0 +1,2106 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 20 15:45:42 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_tagged_decoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>3000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(72, 584)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(97, 520)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(12, 73)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"packet_len"</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(101, 73)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(30, 520)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(365, 759)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(211, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>MTU</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>MTU</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(291, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(371, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(487, 12)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(12, 142)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>4*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(149, 152)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(365, 168)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_stream_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_stream_to_tagged_stream_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>packet_len</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(551, 160)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(561, 614)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(561, 519)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_decoder_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(991, 440)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1257, 464)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1256, 363)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(813, 443)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(811, 363)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_decoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_dummy</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(990, 238)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value></value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_NORM</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.1</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>Rep (Rate=3)</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value>CC (K=7, Rate=2)</value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1465, 333)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1258, 262)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(810, 284)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_decoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_decoder_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(991, 339)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(673, 284)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 268)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>packet_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(64, 276)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(674, 363)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_map_bb</key>
+ <param>
+ <key>id</key>
+ <value>digital_map_bb_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>map</key>
+ <value>[-1, 1]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(674, 443)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 427)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 347)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(362, 519)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(166, 519)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>rep</value>
+ </param>
+ <param>
+ <key>prob</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(362, 631)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
+ <param>
+ <key>id</key>
+ <value>dec_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>state_end</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>padding</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(166, 693)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_stream_to_tagged_stream_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_decoder_0_1</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_decoder_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_1</source_block_id>
+ <sink_block_id>fec_extended_tagged_decoder_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1</source_block_id>
+ <sink_block_id>fec_extended_tagged_decoder_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>2</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_decoder_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_2</source_block_id>
+ <sink_block_id>fec_extended_tagged_decoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0_1</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_map_bb_0_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_0</source_block_id>
+ <sink_block_id>digital_map_bb_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_0_0</source_block_id>
+ <sink_block_id>digital_map_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_0_1</source_block_id>
+ <sink_block_id>digital_map_bb_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/examples/fecapi_tagged_encoders.grc b/gr-fec/examples/fecapi_tagged_encoders.grc
new file mode 100644
index 0000000000..2617593b26
--- /dev/null
+++ b/gr-fec/examples/fecapi_tagged_encoders.grc
@@ -0,0 +1,2613 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Sat May 17 17:13:34 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>fecapi_tagged_encoders</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>2000,2000</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>qt_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(10, 9)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>7</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(20, 548)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(86, 548)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[109, 79]</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(61, 610)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(11, 72)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"packet_len"</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(100, 72)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(211, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>MTU</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>MTU</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(292, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frame Size</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>30</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>intx</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(373, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_ctrlport_monitor_performance</key>
+ <param>
+ <key>id</key>
+ <value>blocks_ctrlport_monitor_performance_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>en</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(482, 12)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>4*[0, 0, 1, 0, 3, 0, 7, 0, 15, 0, 31, 0, 63, 0, 127]</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(65, 137)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>ignoretag</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(65, 218)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_stream_to_tagged_stream</key>
+ <param>
+ <key>id</key>
+ <value>blocks_stream_to_tagged_stream_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>packet_len</key>
+ <value>frame_size</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(65, 267)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_repack_bits_bb</key>
+ <param>
+ <key>id</key>
+ <value>blocks_repack_bits_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>packet_len</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>swap</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(71, 333)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_3</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.05</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value>3,0,1,1</value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>packet_len</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>CC</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>CC</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(819, 378)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.05</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value>2,0,1,1</value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>packet_len</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>CCSDS</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>CC</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(819, 282)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.05</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value>1,0,1,1</value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>packet_len</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>Rep (Rate=3)</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>CC</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(819, 185)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(643, 374)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_3</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(376, 358)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(643, 295)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(376, 279)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(642, 216)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(376, 200)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_1_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(643, 137)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fec_extended_tagged_encoder</key>
+ <param>
+ <key>id</key>
+ <value>fec_extended_tagged_encoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>encoder_list</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>lentagname</key>
+ <value>length_tag</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(376, 121)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>2048</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>update_time</key>
+ <value>0.05</value>
+ </param>
+ <param>
+ <key>entags</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value>0,0,1,1</value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_FREE</value>
+ </param>
+ <param>
+ <key>tr_slope</key>
+ <value>qtgui.TRIG_SLOPE_POS</value>
+ </param>
+ <param>
+ <key>tr_level</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>tr_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>packet_len</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha1</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label2</key>
+ <value>CC</value>
+ </param>
+ <param>
+ <key>width2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color2</key>
+ <value>"red"</value>
+ </param>
+ <param>
+ <key>style2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker2</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha2</key>
+ <value>0.6</value>
+ </param>
+ <param>
+ <key>label3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color3</key>
+ <value>"green"</value>
+ </param>
+ <param>
+ <key>style3</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker3</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha3</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color4</key>
+ <value>"black"</value>
+ </param>
+ <param>
+ <key>style4</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker4</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha4</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color5</key>
+ <value>"cyan"</value>
+ </param>
+ <param>
+ <key>style5</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker5</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha5</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color6</key>
+ <value>"magenta"</value>
+ </param>
+ <param>
+ <key>style6</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker6</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha6</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color7</key>
+ <value>"yellow"</value>
+ </param>
+ <param>
+ <key>style7</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker7</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha7</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color8</key>
+ <value>"dark red"</value>
+ </param>
+ <param>
+ <key>style8</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker8</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha8</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color9</key>
+ <value>"dark green"</value>
+ </param>
+ <param>
+ <key>style9</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker9</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha9</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>label10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>width10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color10</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style10</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>marker10</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>alpha10</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(819, 88)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_random_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_random_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>256</value>
+ </param>
+ <param>
+ <key>num_samps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(53, 447)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_cc_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_cc</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>k</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>rate</value>
+ </param>
+ <param>
+ <key>polys</key>
+ <value>polys</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(153, 547)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_repetition_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_rep</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>rep</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(541, 611)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_ccsds_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_ccsds</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>state_start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>fec.CC_TERMINATED</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(349, 595)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_dummy_encoder_def</key>
+ <param>
+ <key>id</key>
+ <value>enc_dummy</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"ok"</value>
+ </param>
+ <param>
+ <key>ndim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>dim2</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>framebits</key>
+ <value>MTU*8</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(738, 627)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>analog_random_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0_1_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_stream_to_tagged_stream_0_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_stream_to_tagged_stream_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_3</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_tagged_encoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_3</source_block_id>
+ <sink_block_id>blocks_char_to_float_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_2</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_1</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_tagged_encoder_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_1_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_3</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_char_to_float_1_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-fec/grc/fec_async_decoder.xml b/gr-fec/grc/fec_async_decoder.xml
new file mode 100644
index 0000000000..30bf0d1f92
--- /dev/null
+++ b/gr-fec/grc/fec_async_decoder.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Async Decoder</name>
+ <key>fec_async_decoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.async_decoder($decoder, $packed, $rev_pack)</make>
+
+ <param>
+ <name>Decoder Obj.</name>
+ <key>decoder</key>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Packed</name>
+ <key>packed</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Rev. Packing</name>
+ <key>rev_pack</key>
+ <value>True</value>
+ <type>enum</type>
+ <hide>#if $packed() == 'True' then 'part' else 'all'#</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+
+ <doc>
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_async_encoder.xml b/gr-fec/grc/fec_async_encoder.xml
new file mode 100644
index 0000000000..55b1acd707
--- /dev/null
+++ b/gr-fec/grc/fec_async_encoder.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Async Encoder</name>
+ <key>fec_async_encoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.async_encoder($encoder, $packed, $rev_unpack, $rev_pack)</make>
+
+ <param>
+ <name>Encoder Obj.</name>
+ <key>encoder</key>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Packed</name>
+ <key>packed</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Rev. Unpacking</name>
+ <key>rev_unpack</key>
+ <value>True</value>
+ <type>enum</type>
+ <hide>#if $packed() == 'True' then 'part' else 'all'#</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Rev. Packing</name>
+ <key>rev_pack</key>
+ <value>True</value>
+ <type>enum</type>
+ <hide>#if $packed() == 'True' then 'part' else 'all'#</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+
+ <doc>
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_ber_bf.xml b/gr-fec/grc/fec_ber_bf.xml
new file mode 100644
index 0000000000..6d8d85e9ff
--- /dev/null
+++ b/gr-fec/grc/fec_ber_bf.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<block>
+ <name>BER</name>
+ <key>fec_ber_bf</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.ber_bf($test_mode, $berminerrors, $berlimit)</make>
+
+ <param>
+ <name>Test Mode</name>
+ <key>test_mode</key>
+ <value>False</value>
+ <type>enum</type>
+ <option>
+ <name>False</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>True</name>
+ <key>True</key>
+ </option>
+ </param>
+
+ <param>
+ <name>BER Min. Errors</name>
+ <key>berminerrors</key>
+ <value>100</value>
+ <type>int</type>
+ <hide>#if $test_mode() then 'part' else 'all'#</hide>
+ </param>
+
+ <param>
+ <name>BER Limit</name>
+ <key>berlimit</key>
+ <value>-7.0</value>
+ <type>float</type>
+ <hide>#if $test_mode() then 'part' else 'all'#</hide>
+ </param>
+
+ <sink>
+ <name>in0</name>
+ <type>byte</type>
+ </sink>
+
+ <sink>
+ <name>in1</name>
+ <type>byte</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+
+</block> \ No newline at end of file
diff --git a/gr-fec/grc/fec_bercurve_generator.xml b/gr-fec/grc/fec_bercurve_generator.xml
new file mode 100644
index 0000000000..4d0d47e15b
--- /dev/null
+++ b/gr-fec/grc/fec_bercurve_generator.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## BER Curve Generator
+###################################################
+ -->
+<block>
+ <name>BER Curve Gen.</name>
+ <key>fec_bercurve_generator</key>
+ <import>from gnuradio import fec</import>
+ <import>import numpy</import>
+ <make>fec.bercurve_generator(
+ $encoder_list, \#size
+ $decoder_list, \#name
+ $esno, \#range of esnos
+ $samp_rate, \#throttle
+ $threadtype, \#threading mode
+ $puncpat, \#puncture pattern
+ $seed \# noise gen. seed
+)
+ </make>
+
+ <param>
+ <name>Es/N0</name>
+ <key>esno</key>
+ <value>numpy.arange(0.0, 4.0, .5)</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Sample Rate</name>
+ <key>samp_rate</key>
+ <value>3200000</value>
+ <type>float</type>
+ </param>
+
+ <param>
+ <name>Encoder list</name>
+ <key>encoder_list</key>
+ <value>0</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Decoder list</name>
+ <key>decoder_list</key>
+ <value>0</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Puncture Pat.</name>
+ <key>puncpat</key>
+ <value>'11'</value>
+ <type>string</type>
+ </param>
+
+ <param>
+ <name>Threading Type</name>
+ <key>threadtype</key>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Capillary</name>
+ <key>"capillary"</key>
+ </option>
+ <option>
+ <name>Ordinary</name>
+ <key>"ordinary"</key>
+ </option>
+ <option>
+ <name>None</name>
+ <key>"none"</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Noise Seed</name>
+ <key>seed</key>
+ <value>0</value>
+ <type>int</type>
+ <hide>part</hide>
+ </param>
+
+ <bus_source>1</bus_source>
+
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ <nports>len($esno)*2</nports>
+ </source>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/grc/fec_block_tree.xml b/gr-fec/grc/fec_block_tree.xml
index 1a0d2ec985..c674531e3f 100644
--- a/gr-fec/grc/fec_block_tree.xml
+++ b/gr-fec/grc/fec_block_tree.xml
@@ -1,14 +1,42 @@
<?xml version="1.0"?>
<!--
###################################################
-##Block Tree for gr-fec
+## Block Tree for gr-fec
###################################################
-->
<cat>
- <name></name> <!-- Blank for Root Name -->
- <cat>
- <name>Error Coding</name>
- <block>fec_decode_ccsds_27_fb</block>
- <block>fec_encode_ccsds_27_bb</block>
- </cat>
+ <name></name> <!-- Blank for Root Name -->
+ <cat>
+ <name>Error Coding</name>
+ <cat>
+ <name>Decoders</name>
+ <block>variable_cc_decoder_def</block>
+ <block>variable_repetition_decoder_def</block>
+ <block>variable_dummy_decoder_def</block>
+ </cat>
+ <cat>
+ <name>Encoders</name>
+ <block>variable_cc_encoder_def</block>
+ <block>variable_ccsds_encoder_def</block>
+ <block>variable_repetition_encoder_def</block>
+ <block>variable_dummy_encoder_def</block>
+ </cat>
+ <block>fec_extended_encoder</block>
+ <block>fec_extended_async_encoder</block>
+ <block>fec_extended_tagged_encoder</block>
+ <block>fec_extended_decoder</block>
+ <block>fec_extended_tagged_decoder</block>
+ <block>fec_generic_encoder</block>
+ <block>fec_generic_decoder</block>
+ <block>fec_tagged_encoder</block>
+ <block>fec_tagged_decoder</block>
+ <block>fec_async_encoder</block>
+ <block>fec_async_decoder</block>
+ <block>fec_decode_ccsds_27_fb</block>
+ <block>fec_encode_ccsds_27_bb</block>
+ <block>fec_puncture_xx</block>
+ <block>fec_depuncture_bb</block>
+ <block>fec_ber_bf</block>
+ <block>fec_bercurve_generator</block>
+ </cat>
</cat>
diff --git a/gr-fec/grc/fec_decode_ccsds_27_fb.xml b/gr-fec/grc/fec_decode_ccsds_27_fb.xml
index 4ea2a02bf9..f7bd9d3b5c 100644
--- a/gr-fec/grc/fec_decode_ccsds_27_fb.xml
+++ b/gr-fec/grc/fec_decode_ccsds_27_fb.xml
@@ -5,16 +5,16 @@
###################################################
-->
<block>
- <name>Decode CCSDS 27</name>
- <key>fec_decode_ccsds_27_fb</key>
- <import>from gnuradio import fec</import>
- <make>fec.decode_ccsds_27_fb()</make>
- <sink>
- <name>in</name>
- <type>float</type>
- </sink>
- <source>
- <name>out</name>
- <type>byte</type>
- </source>
+ <name>Decode CCSDS 27</name>
+ <key>fec_decode_ccsds_27_fb</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.decode_ccsds_27_fb()</make>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
</block>
diff --git a/gr-fec/grc/fec_decoder.xml b/gr-fec/grc/fec_decoder.xml
new file mode 100644
index 0000000000..dd9d08d5f6
--- /dev/null
+++ b/gr-fec/grc/fec_decoder.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Decoder</name>
+ <key>fec_generic_decoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.decoder($decoder, $itype.size, $otype.size)</make>
+
+ <param>
+ <name>Decoder Object</name>
+ <key>decoder</key>
+ <value>decoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Input Type</name>
+ <key>itype</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:gr.sizeof_gr_complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>size:gr.sizeof_int</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>size:gr.sizeof_short</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Output Type</name>
+ <key>otype</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:gr.sizeof_gr_complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>size:gr.sizeof_int</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>size:gr.sizeof_short</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>$itype</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>$otype</type>
+ </source>
+
+ <doc>
+ This is a GNU Radio adaptor for any FEC decoder following the generic_decoder API in the fec module. Input and output are flexible to accomodate decoders that, say, modulate their encoded results into complex or float types.
+ </doc>
+
+</block> \ No newline at end of file
diff --git a/gr-fec/grc/fec_depuncture_bb.xml b/gr-fec/grc/fec_depuncture_bb.xml
new file mode 100644
index 0000000000..1a7615d176
--- /dev/null
+++ b/gr-fec/grc/fec_depuncture_bb.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<block>
+ <name>Depuncture</name>
+ <key>fec_depuncture_bb</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.depucture_bb($delay, $puncpat, $puncholes, $puncsize, $sym)</make>
+
+ <param>
+ <name>Puncture Size</name>
+ <key>puncsize</key>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Delay</name>
+ <key>delay</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Symbol</name>
+ <key>sym</key>
+ <value>127</value>
+ <type>int</type>
+ <hide>part</hide>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+
+</block>
diff --git a/gr-fec/grc/fec_encoder.xml b/gr-fec/grc/fec_encoder.xml
new file mode 100644
index 0000000000..defb7c3b46
--- /dev/null
+++ b/gr-fec/grc/fec_encoder.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Encoder</name>
+ <key>fec_generic_encoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.encoder($encoder, $itype.size, $otype.size)</make>
+
+ <param>
+ <name>Constituent Encoder</name>
+ <key>encoder</key>
+ <value>encoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Input Type</name>
+ <key>itype</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:gr.sizeof_gr_complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>size:gr.sizeof_int</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>size:gr.sizeof_short</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Output Type</name>
+ <key>otype</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:gr.sizeof_gr_complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>size:gr.sizeof_int</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>size:gr.sizeof_short</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>$itype</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>$otype</type>
+ </source>
+
+ <doc>
+ This is a GNU Radio adaptor for any FEC encoder following the generic_encoder API in the fec module. Input and output are flexible to accomodate encoders that, say, modulate their encoded results into complex or float types.
+ </doc>
+
+</block> \ No newline at end of file
diff --git a/gr-fec/grc/fec_extended_async_encoder.xml b/gr-fec/grc/fec_extended_async_encoder.xml
new file mode 100644
index 0000000000..e61696bcc4
--- /dev/null
+++ b/gr-fec/grc/fec_extended_async_encoder.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Extended Async Encoder</name>
+ <key>fec_extended_async_encoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.extended_async_encoder(encoder_obj_list=$encoder_list, puncpat=$puncpat)</make>
+
+ <param>
+ <name>Encoder Objects</name>
+ <key>encoder_list</key>
+ <value>encoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <value>'11'</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+
+ <doc>
+
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_extended_decoder.xml b/gr-fec/grc/fec_extended_decoder.xml
new file mode 100644
index 0000000000..4262a395ae
--- /dev/null
+++ b/gr-fec/grc/fec_extended_decoder.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Extended Decoder</name>
+ <key>fec_extended_decoder</key>
+ <import>from gnuradio import fec</import>
+ <make>self.$(id) = $(id) = fec.extended_decoder(decoder_obj_list=$decoder_list, threading=$threadtype.arg, ann=$ann, puncpat=$puncpat, integration_period=10000)</make>
+
+ <param>
+ <name>fake val</name>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ <type>string</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Decoder Objects</name>
+ <key>decoder_list</key>
+ <value>decoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Threading Type</name>
+ <key>threadtype</key>
+ <type>enum</type>
+ <option>
+ <name>Capillary</name>
+ <key>capillary</key>
+ <opt>arg:'capillary'</opt>
+ </option>
+ <option>
+ <name>Ordinary</name>
+ <key>ordinary</key>
+ <opt>arg:'ordinary'</opt>
+ </option>
+ <option>
+ <name>None</name>
+ <key>none</key>
+ <opt>arg: None</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Annihilator</name>
+ <key>ann</key>
+ <value>None</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <value>'11'</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+
+ <doc>
+
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_extended_encoder.xml b/gr-fec/grc/fec_extended_encoder.xml
new file mode 100644
index 0000000000..d2a3ec87db
--- /dev/null
+++ b/gr-fec/grc/fec_extended_encoder.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Extended Encoder</name>
+ <key>fec_extended_encoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.extended_encoder(encoder_obj_list=$encoder_list, threading=$threadtype.arg, puncpat=$puncpat)</make>
+
+ <param>
+ <name>Encoder Objects</name>
+ <key>encoder_list</key>
+ <value>encoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Threading Type</name>
+ <key>threadtype</key>
+ <type>enum</type>
+ <option>
+ <name>Capillary</name>
+ <key>capillary</key>
+ <opt>arg:'capillary'</opt>
+ </option>
+ <option>
+ <name>Ordinary</name>
+ <key>ordinary</key>
+ <opt>arg:'ordinary'</opt>
+ </option>
+ <option>
+ <name>None</name>
+ <key>none</key>
+ <opt>arg: None</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <value>'11'</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+
+ <doc>
+
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_extended_tagged_decoder.xml b/gr-fec/grc/fec_extended_tagged_decoder.xml
new file mode 100644
index 0000000000..b198da2158
--- /dev/null
+++ b/gr-fec/grc/fec_extended_tagged_decoder.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Extended Tagged Decoder</name>
+ <key>fec_extended_tagged_decoder</key>
+ <import>from gnuradio import fec</import>
+ <make>self.$(id) = $(id) = fec.extended_tagged_decoder(decoder_obj_list=$decoder_list, ann=$ann, puncpat=$puncpat, integration_period=10000, lentagname=$lentagname)</make>
+
+ <param>
+ <name>fake val</name>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ <type>string</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Decoder Objects</name>
+ <key>decoder_list</key>
+ <value>decoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Annihilator</name>
+ <key>ann</key>
+ <value>None</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <value>'11'</value>
+ <type>string</type>
+ </param>
+
+ <param>
+ <name>Length Tag Name</name>
+ <key>lentagname</key>
+ <value>None</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+
+ <doc>
+
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_extended_tagged_encoder.xml b/gr-fec/grc/fec_extended_tagged_encoder.xml
new file mode 100644
index 0000000000..b5253296e7
--- /dev/null
+++ b/gr-fec/grc/fec_extended_tagged_encoder.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Extended Tagged Encoder</name>
+ <key>fec_extended_tagged_encoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.extended_tagged_encoder(encoder_obj_list=$encoder_list, puncpat=$puncpat, lentagname=$lentagname)</make>
+
+ <param>
+ <name>Encoder Objects</name>
+ <key>encoder_list</key>
+ <value>encoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <value>'11'</value>
+ <type>string</type>
+ </param>
+
+ <param>
+ <name>Length Tag Name</name>
+ <key>lentagname</key>
+ <value>None</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+
+ <doc>
+
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_puncture_xx.xml b/gr-fec/grc/fec_puncture_xx.xml
new file mode 100644
index 0000000000..8ad9b0c411
--- /dev/null
+++ b/gr-fec/grc/fec_puncture_xx.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<block>
+ <name>Puncture</name>
+ <key>fec_puncture_xx</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.puncture_$(type.fcn)($puncsize, $puncpat, $puncholes, $delay)</make>
+
+ <param>
+ <name>Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>fcn:bb</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>fcn:ff</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Puncture Size</name>
+ <key>puncsize</key>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Delay</name>
+ <key>delay</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ </source>
+
+</block>
diff --git a/gr-fec/grc/fec_tagged_decoder.xml b/gr-fec/grc/fec_tagged_decoder.xml
new file mode 100644
index 0000000000..9f8cf255e3
--- /dev/null
+++ b/gr-fec/grc/fec_tagged_decoder.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Tagged Decoder</name>
+ <key>fec_tagged_decoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.tagged_decoder($decoder, $itype.size, $otype.size, $lentagname)</make>
+
+ <param>
+ <name>Constituent Decoder</name>
+ <key>decoder</key>
+ <value>decoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Input Type</name>
+ <key>itype</key>
+ <type>enum</type>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Output Type</name>
+ <key>otype</key>
+ <type>enum</type>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Length Tag Name</name>
+ <key>lentagname</key>
+ <value>"pkt_len"</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>$itype</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>$otype</type>
+ </source>
+
+ <doc>
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/fec_tagged_encoder.xml b/gr-fec/grc/fec_tagged_encoder.xml
new file mode 100644
index 0000000000..300d1866b9
--- /dev/null
+++ b/gr-fec/grc/fec_tagged_encoder.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Tagged Encoder</name>
+ <key>fec_tagged_encoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.tagged_encoder($encoder, $itype.size, $otype.size, $lentagname)</make>
+
+ <param>
+ <name>Constituent Encoder</name>
+ <key>encoder</key>
+ <value>encoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Input Type</name>
+ <key>itype</key>
+ <type>enum</type>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Output Type</name>
+ <key>otype</key>
+ <type>enum</type>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ </param>
+
+ <param>
+ <name>Length Tag Name</name>
+ <key>lentagname</key>
+ <value>"pkt_len"</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>$itype</type>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>$otype</type>
+ </source>
+
+ <doc>
+ </doc>
+
+</block>
diff --git a/gr-fec/grc/variable_cc_decoder_def_list.xml b/gr-fec/grc/variable_cc_decoder_def_list.xml
new file mode 100644
index 0000000000..7c72757868
--- /dev/null
+++ b/gr-fec/grc/variable_cc_decoder_def_list.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+# FEC CC DECODER
+###################################################
+ -->
+<block>
+ <name>CC Decoder Definition</name>
+ <key>variable_cc_decoder_def</key>
+ <import>from gnuradio import fec</import>
+ <var_make>
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.cc_decoder.make($framebits, $k, $rate, $polys, $state_start, $state_end, $mode, $padding)
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map( (lambda a: fec.cc_decoder.make($framebits, $k, $rate, $polys, $state_start, $state_end, $mode, $padding)), range(0,$dim1) ); #slurp
+#else
+self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.cc_decoder.make($framebits, $k, $rate, $polys, $state_start, $state_end, $mode, $padding)), range(0,$dim2) ) ), range(0,$dim1)); #slurp
+#end if</var_make>
+ <make></make>
+
+ <param>
+ <name>Ignore Me</name>
+ <key>value</key>
+ <value>"ok"</value>
+ <type>raw</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Parallelism</name>
+ <key>ndim</key>
+ <value>0</value>
+ <type>enum</type>
+ <option>
+ <name>0</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>1</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Dimension 1</name>
+ <key>dim1</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Dimension 2</name>
+ <key>dim2</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Frame Bits</name>
+ <key>framebits</key>
+ <value>2048</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Constraint Length (K)</name>
+ <key>k</key>
+ <value>7</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Rate Inverse (1/R) (1/2) --> 2</name>
+ <key>rate</key>
+ <value>2</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Polynomials</name>
+ <key>polys</key>
+ <value>[79,109]</value>
+ <type>int_vector</type>
+ </param>
+
+ <param>
+ <name>Start State</name>
+ <key>state_start</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>End State</name>
+ <key>state_end</key>
+ <value>-1</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Streaming Behavior</name>
+ <key>mode</key>
+ <value></value>
+ <type>enum</type>
+ <option>
+ <name>Streaming</name>
+ <key>fec.CC_STREAMING</key>
+ </option>
+ <option>
+ <name>Terminated</name>
+ <key>fec.CC_TERMINATED</key>
+ </option>
+ <option>
+ <name>Tailbiting</name>
+ <key>fec.CC_TAILBITING</key>
+ </option>
+ <option>
+ <name>Truncated</name>
+ <key>fec.CC_TRUNCATED</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Byte Padding</name>
+ <key>padding</key>
+ <value>False</value>
+ <type>enum</type>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/grc/variable_cc_encoder_def_list.xml b/gr-fec/grc/variable_cc_encoder_def_list.xml
new file mode 100644
index 0000000000..1e7aa8ad71
--- /dev/null
+++ b/gr-fec/grc/variable_cc_encoder_def_list.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+# FEC MAKING FOR GREAT JUSTICE
+###################################################
+ -->
+<block>
+ <name>CC Encoder Definition</name>
+ <key>variable_cc_encoder_def</key>
+ <import>from gnuradio import fec</import>
+ <var_make>
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.cc_encoder_make($framebits, $k, $rate, $polys, $state_start, $mode, $padding)
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map( (lambda a: fec.cc_encoder_make($framebits, $k, $rate, $polys, $state_start, $mode, $padding)), range(0,$dim1) ); #slurp
+#else
+self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.cc_encoder_make($framebits, $k, $rate, $polys, $state_start, $mode, $padding)), range(0,$dim2) ) ), range(0,$dim1)); #slurp
+#end if</var_make>
+ <make></make>
+
+ <param>
+ <name>Ignore Me</name>
+ <key>value</key>
+ <value>"ok"</value>
+ <type>raw</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Parallelism</name>
+ <key>ndim</key>
+ <value>0</value>
+ <type>enum</type>
+ <option>
+ <name>0</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>1</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Dimension 1</name>
+ <key>dim1</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Dimension 2</name>
+ <key>dim2</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Frame Bits</name>
+ <key>framebits</key>
+ <value>2048</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Constraint Length (K)</name>
+ <key>k</key>
+ <value>7</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Rate Inverse (1/R) (1/2) --> 2</name>
+ <key>rate</key>
+ <value>2</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Polynomials</name>
+ <key>polys</key>
+ <value>[79,109]</value>
+ <type>int_vector</type>
+ </param>
+
+ <param>
+ <name>Start State</name>
+ <key>state_start</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Streaming Behavior</name>
+ <key>mode</key>
+ <value></value>
+ <type>enum</type>
+ <option>
+ <name>Streaming</name>
+ <key>fec.CC_STREAMING</key>
+ </option>
+ <option>
+ <name>Terminated</name>
+ <key>fec.CC_TERMINATED</key>
+ </option>
+ <option>
+ <name>Tailbiting</name>
+ <key>fec.CC_TAILBITING</key>
+ </option>
+ <option>
+ <name>Truncated</name>
+ <key>fec.CC_TRUNCATED</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Byte Padding</name>
+ <key>padding</key>
+ <value>False</value>
+ <type>enum</type>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/grc/variable_ccsds_encoder_def_list.xml b/gr-fec/grc/variable_ccsds_encoder_def_list.xml
new file mode 100644
index 0000000000..fb0cb05a80
--- /dev/null
+++ b/gr-fec/grc/variable_ccsds_encoder_def_list.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+# FEC MAKING FOR GREAT JUSTICE
+###################################################
+ -->
+<block>
+ <name>CCSDS Encoder Definition</name>
+ <key>variable_ccsds_encoder_def</key>
+ <import>from gnuradio import fec</import>
+ <var_make>
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.ccsds_encoder_make($framebits, $state_start, $mode)
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map( (lambda a: fec.ccsds_encoder_make($framebits, $state_start, $mode)), range(0,$dim1) ); #slurp
+#else
+self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ccsds_encoder_make($framebits, $state_start, $mode)), range(0,$dim2) ) ), range(0,$dim1)); #slurp
+#end if</var_make>
+ <make></make>
+
+ <param>
+ <name>Ignore Me</name>
+ <key>value</key>
+ <value>"ok"</value>
+ <type>raw</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Parallelism</name>
+ <key>ndim</key>
+ <value>0</value>
+ <type>enum</type>
+ <option>
+ <name>0</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>1</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Dimension 1</name>
+ <key>dim1</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Dimension 2</name>
+ <key>dim2</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Frame Bits</name>
+ <key>framebits</key>
+ <value>2048</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Start State</name>
+ <key>state_start</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Streaming Behavior</name>
+ <key>mode</key>
+ <value></value>
+ <type>enum</type>
+ <option>
+ <name>Streaming</name>
+ <key>fec.CC_STREAMING</key>
+ </option>
+ <option>
+ <name>Terminated</name>
+ <key>fec.CC_TERMINATED</key>
+ </option>
+ <option>
+ <name>Tailbiting</name>
+ <key>fec.CC_TAILBITING</key>
+ </option>
+ <option>
+ <name>Truncated</name>
+ <key>fec.CC_TRUNCATED</key>
+ </option>
+ </param>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/grc/variable_dummy_decoder_def_list.xml b/gr-fec/grc/variable_dummy_decoder_def_list.xml
new file mode 100644
index 0000000000..49728d357f
--- /dev/null
+++ b/gr-fec/grc/variable_dummy_decoder_def_list.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+# FEC DUMMY DECODER
+###################################################
+ -->
+<block>
+ <name>Dummy Decoder Definition</name>
+ <key>variable_dummy_decoder_def</key>
+ <import>from gnuradio import fec</import>
+ <var_make>
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.dummy_decoder.make($framebits)
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map((lambda a: fec.dummy_decoder.make($framebits)), range(0,$dim1)) #slurp
+#else
+self.$(id) = $(id) = map((lambda b: map((lambda a: fec.dummy_decoder.make($framebits)), range(0,$dim2))), range(0,$dim1)) #slurp
+#end if</var_make>
+ <make></make>
+
+ <param>
+ <name>Ignore Me</name>
+ <key>value</key>
+ <value>"ok"</value>
+ <type>raw</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Parallelism</name>
+ <key>ndim</key>
+ <value></value>
+ <type>enum</type>
+ <option>
+ <name>0</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>1</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Dimension 1</name>
+ <key>dim1</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Dimension 2</name>
+ <key>dim2</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Frame Bits</name>
+ <key>framebits</key>
+ <value>2048</value>
+ <type>int</type>
+ </param>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/grc/variable_dummy_encoder_def_list.xml b/gr-fec/grc/variable_dummy_encoder_def_list.xml
new file mode 100644
index 0000000000..c2c3f3f995
--- /dev/null
+++ b/gr-fec/grc/variable_dummy_encoder_def_list.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+# FEC DUMMY ENCODER
+###################################################
+ -->
+<block>
+ <name>Dummy Encoder Definition</name>
+ <key>variable_dummy_encoder_def</key>
+ <import>from gnuradio import fec</import>
+ <var_make>
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.dummy_encoder_make($framebits)
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map((lambda a: fec.dummy_encoder_make($framebits)), range(0,$dim1)) #slurp
+#else
+self.$(id) = $(id) = map((lambda b: map((lambda a: fec.dummy_encoder_make($framebits)), range(0,$dim2))), range(0,$dim1)) #slurp
+#end if</var_make>
+ <make></make>
+
+ <param>
+ <name>Ignore Me</name>
+ <key>value</key>
+ <value>"ok"</value>
+ <type>raw</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Parallelism</name>
+ <key>ndim</key>
+ <value>0</value>
+ <type>enum</type>
+ <option>
+ <name>0</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>1</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Dimension 1</name>
+ <key>dim1</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Dimension 2</name>
+ <key>dim2</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Frame Bits</name>
+ <key>framebits</key>
+ <value>2048</value>
+ <type>int</type>
+ </param>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/grc/variable_repetition_decoder_def_list.xml b/gr-fec/grc/variable_repetition_decoder_def_list.xml
new file mode 100644
index 0000000000..eba43f9b06
--- /dev/null
+++ b/gr-fec/grc/variable_repetition_decoder_def_list.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+# FEC REPETITION DECODER
+###################################################
+ -->
+<block>
+ <name>Repetition Decoder Definition</name>
+ <key>variable_repetition_decoder_def</key>
+ <import>from gnuradio import fec</import>
+ <var_make>
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.repetition_decoder.make($framebits, $rep, $prob)
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map( (lambda a: fec.repetition_decoder.make($framebits, $rep, $prob)), range(0,$dim1) ) #slurp
+#else
+self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.repetition_decoder.make($framebits, $rep, $prob)), range(0,$dim2) ) ), range(0,$dim1)) #slurp
+#end if</var_make>
+ <make></make>
+
+ <param>
+ <name>Ignore Me</name>
+ <key>value</key>
+ <value>"ok"</value>
+ <type>raw</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Parallelism</name>
+ <key>ndim</key>
+ <value></value>
+ <type>enum</type>
+ <option>
+ <name>0</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>1</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Dimension 1</name>
+ <key>dim1</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Dimension 2</name>
+ <key>dim2</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Frame Bits</name>
+ <key>framebits</key>
+ <value>2048</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Repetitions</name>
+ <key>rep</key>
+ <value>3</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>a prior prob</name>
+ <key>prob</key>
+ <value>0.5</value>
+ <type>float</type>
+ </param>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/grc/variable_repetition_encoder_def_list.xml b/gr-fec/grc/variable_repetition_encoder_def_list.xml
new file mode 100644
index 0000000000..e2668b286c
--- /dev/null
+++ b/gr-fec/grc/variable_repetition_encoder_def_list.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+# FEC REPETITION ENCODER
+###################################################
+ -->
+<block>
+ <name>Repetition Encoder Definition</name>
+ <key>variable_repetition_encoder_def</key>
+ <import>from gnuradio import fec</import>
+ <var_make>
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.repetition_encoder_make($framebits, $rep)
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map((lambda a: fec.repetition_encoder_make($framebits, $rep)), range(0,$dim1)) #slurp
+#else
+self.$(id) = $(id) = map((lambda b: map((lambda a: fec.repetition_encoder_make($framebits, $rep)), range(0,$dim2))), range(0,$dim1)) #slurp
+#end if</var_make>
+ <make></make>
+
+ <param>
+ <name>Ignore Me</name>
+ <key>value</key>
+ <value>"ok"</value>
+ <type>raw</type>
+ <hide>all</hide>
+ </param>
+
+ <param>
+ <name>Parallelism</name>
+ <key>ndim</key>
+ <value></value>
+ <type>enum</type>
+ <option>
+ <name>0</name>
+ <key>0</key>
+ </option>
+ <option>
+ <name>1</name>
+ <key>1</key>
+ </option>
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
+ </param>
+
+ <param>
+ <name>Dimension 1</name>
+ <key>dim1</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Dimension 2</name>
+ <key>dim2</key>
+ <value>1</value>
+ <type>int</type>
+ <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
+ </param>
+
+ <param>
+ <name>Frame Bits</name>
+ <key>framebits</key>
+ <value>2048</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Repetitions</name>
+ <key>rep</key>
+ <value>3</value>
+ <type>int</type>
+ </param>
+
+ <doc>
+ </doc>
+</block>
diff --git a/gr-fec/include/gnuradio/fec/CMakeLists.txt b/gr-fec/include/gnuradio/fec/CMakeLists.txt
index a669517b3e..a91a68a996 100644
--- a/gr-fec/include/gnuradio/fec/CMakeLists.txt
+++ b/gr-fec/include/gnuradio/fec/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -76,10 +76,30 @@ add_custom_target(fec_generated_includes DEPENDS
install(FILES
${generated_includes}
api.h
+ generic_decoder.h
+ generic_encoder.h
+ decoder.h
+ encoder.h
+ tagged_decoder.h
+ tagged_encoder.h
+ async_decoder.h
+ async_encoder.h
+ cc_decoder.h
+ cc_encoder.h
+ ccsds_encoder.h
+ dummy_encoder.h
+ dummy_decoder.h
+ repetition_encoder.h
+ repetition_decoder.h
decode_ccsds_27_fb.h
encode_ccsds_27_bb.h
rs.h
viterbi.h
+ ber_bf.h
+ conv_bit_corr_bb.h
+ puncture_bb.h
+ puncture_ff.h
+ depuncture_bb.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
COMPONENT "fec_devel"
)
diff --git a/gr-fec/include/gnuradio/fec/async_decoder.h b/gr-fec/include/gnuradio/fec/async_decoder.h
new file mode 100644
index 0000000000..05eda2fdbf
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/async_decoder.h
@@ -0,0 +1,103 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_ASYNC_DECODER_H
+#define INCLUDED_FEC_ASYNC_DECODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_decoder.h>
+#include <gnuradio/block.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Creates the decoder block for use in GNU Radio
+ * flowgraphs from a given FEC API object derived from the
+ * generic_decoder class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * Decodes frames received as async messages over a message
+ * port. This decoder deployment expects messages of soft decision
+ * symbols in and can produce either packed, PDU messages (\p
+ * packed = True) or messages full of unpacked bits (\p packed =
+ * False).
+ *
+ * This decoder works off a full message as one frame or block to
+ * decode. The message length is used to calculate the frame
+ * length. To support this, the decoder variable used will have
+ * had its frame_size set. This block treats that initial
+ * frame_size value as the maximum transmission unit (MTU) and
+ * will not process frames larger than that after being decoded.
+ *
+ * The packed PDU form of this deployment is designed to work well
+ * with other PDU-based blocks to operate within the processing
+ * flow of data packets or frames.
+ *
+ * Due to differences in how data is packed and processed, this
+ * block also offers the ability to change the direction of how
+ * bits are packed. All inputs messages are one soft decision per
+ * item. By default, the \p rev_pack mode is set to True. Using
+ * this setup allows the async block to behave with PDUs in the
+ * same operation and format as the tagged stream decoders. That
+ * is, putting the same data into both the tagged stream decoder
+ * deployment and this with the default setting should produce the
+ * same data.
+ *
+ * Because the block handles data as a full frame per message,
+ * this decoder deployment cannot work with any decoders that
+ * require history. For example, the gr::fec::code::cc_decoder
+ * decoder in streaming mode requires an extra rate*(K-1) bits to
+ * complete the decoding, so it would have to wait for the next
+ * message to come in and finish processing. Therefore, the
+ * streaming mode of the CC decoder is not allowed. The other
+ * three modes will work with this deployment since the frame is
+ * self-contained for decoding.
+ */
+ class FEC_API async_decoder : virtual public block
+ {
+ public:
+ typedef boost::shared_ptr<async_decoder> sptr;
+
+ /*!
+ * Build the PDU-based FEC decoder block from an FECAPI decoder object.
+ *
+ * \param my_decoder An FECAPI decoder object child of the generic_decoder class.
+ * \param packed Sets output to packed bytes if true; otherwise, 1 bit per byte.
+ * \param rev_pack If packing bits, should they be reversed?
+ */
+ static sptr make(generic_decoder::sptr my_decoder,
+ bool packed=false, bool rev_pack=true);
+
+ virtual int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items) = 0;
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_ASYNC_DECODER_H */
diff --git a/gr-fec/include/gnuradio/fec/async_encoder.h b/gr-fec/include/gnuradio/fec/async_encoder.h
new file mode 100644
index 0000000000..0d31bc401d
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/async_encoder.h
@@ -0,0 +1,99 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_ASYNC_ENCODER_H
+#define INCLUDED_FEC_ASYNC_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_encoder.h>
+#include <gnuradio/block.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Creates the encoder block for use in GNU Radio
+ * flowgraphs with async message from a given FEC API object
+ * derived from the generic_encoder class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * Encodes frames received as async messages or as a PDU over a
+ * message port. This encoder works off a full message as one
+ * frame or block to encode. The message length is used as the
+ * frame length. To support this, the encoder variable used will
+ * have had its frame_size set. This block treats that initial
+ * frame_size value as the maximum transmission unit (MTU) and
+ * will not process frames larger than that.
+ *
+ * This deployment works off messages and expects them to either
+ * be messages full of unpacked bits or PDU messages, which means
+ * full bytes of a frame from the higher layers, including things
+ * like headers, tails, CRC check bytes, etc. For handling PDUs,
+ * set the \p packed option of this deployment block to True. The
+ * block will then use the FEC API to properly unpack the bits
+ * from the PDU, pass it through the encoder, and repack them to
+ * output the PDUs for the next stage of processing.
+ *
+ * The packed PDU form of this deployment is designed to work well
+ * with other PDU-based blocks to operate within the processing
+ * flow of data packets or frames.
+ *
+ * Due to differences in how data is packed and processed, this
+ * block also offers the ability to change the direction of how
+ * bits are unpacked and packed, where reading or writing from the
+ * LSB or MSB. By default, the \p rev_unpack and \p rev_pack modes
+ * are set to True. Using this setup allows the async block to
+ * behave with PDUs in the same operation and format as the tagged
+ * stream encoders. That is, putting the same data into both the
+ * tagged stream encoder deployment and this with these default
+ * settings should produce the same data.
+ */
+ class FEC_API async_encoder : virtual public block
+ {
+ public:
+ typedef boost::shared_ptr<async_encoder> sptr;
+
+ /*!
+ * Build the PDU-based FEC encoder block from an FECAPI encoder object.
+ *
+ * \param my_encoder An FECAPI encoder object child of the generic_encoder class.
+ * \param packed True if working on packed bytes (like PDUs).
+ * \param rev_unpack Reverse the unpacking order from input bytes to bits.
+ * \param rev_pack Reverse the packing order from bits to output bytes.
+ */
+ static sptr make(generic_encoder::sptr my_encoder,
+ bool packed=false,
+ bool rev_unpack=true, bool rev_pack=true);
+
+ virtual int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items) = 0;
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_ASYNC_ENCODER_H */
diff --git a/gr-fec/include/gnuradio/fec/ber_bf.h b/gr-fec/include/gnuradio/fec/ber_bf.h
new file mode 100644
index 0000000000..cc42bcebe6
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/ber_bf.h
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_BER_BF_H
+#define INCLUDED_FEC_BER_BF_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief BER block in FECAPI
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * What does this block do?
+ */
+ class FEC_API ber_bf : virtual public block
+ {
+ public:
+ // gr::fec::ber_bf::sptr
+ typedef boost::shared_ptr<ber_bf> sptr;
+
+ static sptr make(bool test_mode = false, int berminerrors=100, float ber_limit=-7.0);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_BER_BF_H */
diff --git a/gr-fec/include/gnuradio/fec/cc_common.h b/gr-fec/include/gnuradio/fec/cc_common.h
new file mode 100644
index 0000000000..8abf565d4a
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/cc_common.h
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CC_COMMON_H
+#define INCLUDED_FEC_CC_COMMON_H
+
+typedef enum _cc_mode_t {
+ CC_STREAMING = 0,
+ CC_TERMINATED,
+ CC_TRUNCATED,
+ CC_TAILBITING
+} cc_mode_t;
+
+typedef union {
+ //decision_t is a BIT vector
+ unsigned char* t;
+ unsigned int* w;
+ unsigned short* s;
+ unsigned char* c;
+} decision_t;
+
+typedef union {
+ unsigned char* t;
+} metric_t;
+
+struct v {
+ unsigned char *metrics;
+ metric_t old_metrics,new_metrics,metrics1,metrics2; /* Pointers to path metrics, swapped on every bit */
+ unsigned char *decisions;
+};
+
+#endif /*INCLUDED_FEC_CC_COMMON_H*/
diff --git a/gr-fec/include/gnuradio/fec/cc_decoder.h b/gr-fec/include/gnuradio/fec/cc_decoder.h
new file mode 100644
index 0000000000..8f29af98ca
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/cc_decoder.h
@@ -0,0 +1,144 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CC_DECODER_H
+#define INCLUDED_FEC_CC_DECODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_decoder.h>
+#include <gnuradio/fec/cc_common.h>
+#include <map>
+#include <string>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ typedef void(*conv_kernel)(unsigned char *Y, unsigned char *X,
+ unsigned char *syms, unsigned char *dec,
+ unsigned int framebits, unsigned int excess,
+ unsigned char *Branchtab);
+
+ /*!
+ * \brief Convolutional Code Decoding class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * This class performs convolutional decoding via the Viterbi
+ * algorithm. While it is set up to take variable values for K,
+ * rate, and the polynomials, currently, the block is only
+ * capable of handling the following settings:
+ *
+ * \li K = 7
+ * \li rate = 1/2 (given as 2 to the constructor)
+ * \li polynomials = [109, 79]
+ *
+ * This is the well-known convolutional part of the Voyager code
+ * implemented in the CCSDS encoder.
+ *
+ * The intent of having this FECAPI code classes fully
+ * parameterizable is to eventually allow it to take on generic
+ * settings, much like the cc_encoder class where the CCSDS
+ * settings would be a highly-optimized version of this.
+ *
+ * The decoder is set up with a number of bits per frame in the
+ * constructor. When not being used in a tagged stream mode,
+ * this encoder will only process frames of the length provided
+ * here. If used in a tagged stream block, this setting becomes
+ * the maximum allowable frame size that the block may process.
+ *
+ * The \p mode is a cc_mode_t that specifies how the convolutional
+ * encoder will behave and under what conditions.
+ *
+ * \li 'CC_STREAMING': mode expects an uninterrupted flow of
+ * samples into the encoder, and the output stream is
+ * continually encoded. This mode is the only mode for this
+ * decoder that has a history requirement because it requires
+ * rate*(K-1) bits more to finish the decoding properly. This
+ * mode does not work with any deployments that do not allow
+ * history.
+ *
+ * \li 'CC_TERMINATED': is a mode designed for packet-based
+ * systems. This mode adds rate*(k-1) bits to the output as a
+ * way to help flush the decoder.
+ *
+ * \li 'CC_TAILBITING': is another packet-based method. Instead of
+ * adding bits onto the end of the packet, this mode will
+ * continue the code between the payloads of packets by
+ * pre-initializing the state of the new packet based on the
+ * state of the last packet for (k-1) bits.
+ *
+ * \li 'CC_TRUNCATED': a truncated code always resets the registers
+ * to the \p start_state between frames.
+ *
+ * A common convolutional encoder uses K=7, Rate=1/2,
+ * Polynomials=[109, 79]. This is the Voyager code from NASA:
+ * \li 109: b(1101101) --> 1 + x + x^3 + x^4 + x^6
+ * \li 79: b(1001111) --> 1 + x^3 + x^4 + x^5 + x^6
+ */
+ class FEC_API cc_decoder : virtual public generic_decoder
+ {
+ public:
+
+ /*!
+ * Build a convolutional code decoding FEC API object.
+ *
+ * \param frame_size Number of bits per frame. If using in the
+ * tagged stream style, this is the maximum allowable
+ * number of bits per frame.
+ * \param k Constraint length (K) of the encoder.
+ * \param rate Inverse of the coder's rate
+ * (rate=2 means 2 output bits per 1 input).
+ * \param polys Vector of polynomials as integers.
+ * \param start_state Initialization state of the shift register.
+ * \param end_state Ending state of the shift register.
+ * \param mode cc_mode_t mode of the encoding.
+ * \param padded true if the encoded frame is padded
+ * to the nearest byte.
+ */
+ static generic_decoder::sptr make
+ (int frame_size, int k,
+ int rate, std::vector<int> polys,
+ int start_state=0, int end_state=-1,
+ cc_mode_t mode=CC_STREAMING,
+ bool padded=false);
+
+ /*!
+ * Sets the uncoded frame size to \p frame_size. If \p
+ * frame_size is greater than the value given to the
+ * constructor, the frame size will be capped by that initial
+ * value and this function will return false. Otherwise, it
+ * returns true.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ /*!
+ * Returns the coding rate of this encoder.
+ */
+ virtual double rate() = 0;
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CC_DECODER_H */
diff --git a/gr-fec/include/gnuradio/fec/cc_encoder.h b/gr-fec/include/gnuradio/fec/cc_encoder.h
new file mode 100644
index 0000000000..04ce6299d6
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/cc_encoder.h
@@ -0,0 +1,140 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CC_ENCODER_H
+#define INCLUDED_FEC_CC_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/encoder.h>
+#include <gnuradio/fec/cc_common.h>
+#include <map>
+#include <string>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ /*!
+ * \brief Convolutional Code Encoding class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * This class performs convolutional encoding for unpacked bits
+ * for frames of a constant length. This class is general in its
+ * application of the convolutional encoding and allows us to
+ * specify the constraint length, the coding rate, and the
+ * polynomials used in the coding process.
+ *
+ * The parameter \p k sets the constraint length directly. We
+ * set the coding rate by setting \p rate to R given a desired
+ * rate of 1/R. That is, for a rate 1/2 coder, we would set \p
+ * rate to 2. And the polynomial is specified as a vector of
+ * integers, where each integer represents the coding polynomial
+ * for a different arm of the code. The number of polynomials
+ * given must be the same as the value \p rate.
+ *
+ * The encoding object holds a shift register that takes in each
+ * bit from the input stream and then ANDs the shift register
+ * with each polynomial, and places the parity of the result
+ * into the output stream. The output stream is therefore also
+ * unpacked bits.
+ *
+ * The encoder is set up with a number of bits per frame in the
+ * constructor. When not being used in a tagged stream mode,
+ * this encoder will only process frames of the length provided
+ * here. If used in a tagged stream block, this setting becomes
+ * the maximum allowable frame size that the block may process.
+ *
+ * The \p mode is a cc_mode_t that specifies how the convolutional
+ * encoder will behave and under what conditions.
+ *
+ * \li 'CC_STREAMING': mode expects an uninterrupted flow of
+ * samples into the encoder, and the output stream is
+ * continually encoded.
+ *
+ * \li 'CC_TERMINATED': is a mode designed for packet-based
+ * systems. This mode adds rate*(k-1) bits to the output as a
+ * way to help flush the decoder.
+ *
+ * \li 'CC_TAILBITING': is another packet-based method. Instead of
+ * adding bits onto the end of the packet, this mode will
+ * continue the code between the payloads of packets by
+ * pre-initializing the state of the new packet based on the
+ * state of the last packet for (k-1) bits.
+ *
+ * \li 'CC_TRUNCATED': a truncated code always resets the registers
+ * to the \p start_state between frames.
+ *
+ * A common convolutional encoder uses K=7, Rate=1/2,
+ * Polynomials=[109, 79]. This is the Voyager code from NASA:
+ * \li 109: b(1101101) --> 1 + x + x^3 + x^4 + x^6
+ * \li 79: b(1001111) --> 1 + x^3 + x^4 + x^5 + x^6
+ *
+ * Another encoder class is provided with gr-fec called the
+ * gr::fec::code::ccsds_encoder, which implements the above code
+ * that is more highly optimized for just those specific
+ * settings.
+ */
+ class FEC_API cc_encoder : virtual public generic_encoder
+ {
+ public:
+
+ /*!
+ * Build a convolutional code encoding FEC API object.
+ *
+ * \param frame_size Number of bits per frame. If using in the
+ * tagged stream style, this is the maximum allowable
+ * number of bits per frame.
+ * \param k Constraint length (K) of the encoder.
+ * \param rate Inverse of the coder's rate
+ * (rate=2 means 2 output bits per 1 input).
+ * \param polys Vector of polynomials as integers.
+ * \param start_state Initialization state of the shift register.
+ * \param mode cc_mode_t mode of the encoding.
+ * \param padded true if the encoded frame should be padded
+ * to the nearest byte.
+ */
+ static generic_encoder::sptr make
+ (int frame_size, int k, int rate,
+ std::vector<int> polys, int start_state = 0,
+ cc_mode_t mode=CC_STREAMING, bool padded=false);
+
+ /*!
+ * Sets the uncoded frame size to \p frame_size. If \p
+ * frame_size is greater than the value given to the
+ * constructor, the frame size will be capped by that initial
+ * value and this function will return false. Otherwise, it
+ * returns true.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ /*!
+ * Returns the coding rate of this encoder.
+ */
+ virtual double rate() = 0;
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CC_ENCODER_H */
diff --git a/gr-fec/include/gnuradio/fec/ccsds_encoder.h b/gr-fec/include/gnuradio/fec/ccsds_encoder.h
new file mode 100644
index 0000000000..9fa364a42e
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/ccsds_encoder.h
@@ -0,0 +1,117 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CCSDS_ENCODER_H
+#define INCLUDED_FEC_CCSDS_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/encoder.h>
+#include <gnuradio/fec/cc_common.h>
+#include <map>
+#include <string>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ /*!
+ * \brief CCSDS Encoding class for convolutional encoding with
+ * rate 1/2, K=7, and polynomials [109, 79].
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * Uses Phil Karn's (KA9Q) implementation of the CCSDS encoder
+ * for rate 1/2, K=7, and CC polynomial [109, 79]. These are
+ * non-adjustable in this encoder. For an adjustable CC encoder
+ * where we can set the rate, constraint length, and polynomial,
+ * see gr::fec::code::cc_encoder.
+ *
+ * The encoder is set up wtih a number of bits per frame in the
+ * constructor. When not being used in a tagged stream mode,
+ * this encoder will only process frames of the length provided
+ * here. If used in a tagged stream block, this setting becomes
+ * the maximum allowable frame size that the block may process.
+ *
+ * The \p mode is a cc_mode_t that specifies how the convolutional
+ * encoder will behave and under what conditions.
+ *
+ * \li 'CC_STREAMING': mode expects an uninterrupted flow of
+ * samples into the encoder, and the output stream is
+ * continually encoded.
+ *
+ * \li 'CC_TERMINATED': is a mode designed for packet-based
+ * systems. This mode adds rate*(k-1) bits to the output as a
+ * way to help flush the decoder.
+ *
+ * \li 'CC_TAILBITING': is another packet-based method. Instead of
+ * adding bits onto the end of the packet, this mode will
+ * continue the code between the payloads of packets by
+ * pre-initializing the state of the new packet based on the
+ * state of the last packet for (k-1) bits.
+ *
+ * \li 'CC_TRUNCATED': a truncated code always resets the registers
+ * to the \p start_state between frames.
+ *
+ * A common convolutional encoder uses K=7, Rate=1/2,
+ * Polynomials=[109, 79]. This is the Voyager code from NASA:
+ * \li 109: b(1101101) --> 1 + x + x^3 + x^4 + x^6
+ * \li 79: b(1001111) --> 1 + x^3 + x^4 + x^5 + x^6
+ */
+ class FEC_API ccsds_encoder : virtual public generic_encoder
+ {
+ public:
+
+ /*!
+ * Build the CCSDS (rate=1/2, K=7, polys=[109,79]
+ * convolutional code FECAPI object.
+ *
+ * \param frame_size Number of bits per frame. If using in the
+ * tagged stream style, this is the maximum allowable
+ * number of bits per frame.
+ * \param start_state Initialization state of the shift register.
+ * \param mode cc_mode_t mode of the encoding.
+ */
+ static generic_encoder::sptr make
+ (int frame_size, int start_state = 0,
+ cc_mode_t mode=CC_STREAMING);
+
+ /*!
+ * Sets the uncoded frame size to \p frame_size. If \p
+ * frame_size is greater than the value given to the
+ * constructor, the frame size will be capped by that initial
+ * value and this function will return false. Otherwise, it
+ * returns true.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ /*!
+ * Returns the coding rate of this encoder.
+ */
+ virtual double rate() = 0;
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CCSDS_ENCODER_H */
diff --git a/gr-fec/include/gnuradio/fec/conv_bit_corr_bb.h b/gr-fec/include/gnuradio/fec/conv_bit_corr_bb.h
new file mode 100644
index 0000000000..87ab768fcc
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/conv_bit_corr_bb.h
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CONV_BIT_CORR_BB_H
+#define INCLUDED_FEC_CONV_BIT_CORR_BB_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/block.h>
+#include <vector>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Correlate block in FECAPI
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * What does this block do?
+ */
+ class FEC_API conv_bit_corr_bb : virtual public block
+ {
+ public:
+ // gr::fec::conv_bit_corr_bb::sptr
+ typedef boost::shared_ptr<conv_bit_corr_bb> sptr;
+
+ static sptr make(std::vector<unsigned long long> correlator,
+ int corr_sym, int corr_len, int cut,
+ int flush, float thresh);
+
+ /*!
+ * This subroutine will find the encoded data garble rate
+ * corresponding to a syndrome density of `target', that is created
+ * with an annihilating polynomial with 'taps' number of taps.
+ */
+ virtual float data_garble_rate(int taps, float syn_density) = 0;
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CONV_BIT_CORR_BB_H */
diff --git a/gr-fec/include/gnuradio/fec/decoder.h b/gr-fec/include/gnuradio/fec/decoder.h
new file mode 100644
index 0000000000..79eeef2197
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/decoder.h
@@ -0,0 +1,97 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_DECODER_H
+#define INCLUDED_FEC_DECODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_decoder.h>
+#include <gnuradio/block.h>
+#include <boost/shared_ptr.hpp>
+#include <boost/shared_array.hpp>
+#include <boost/format.hpp>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief General FEC decoding block that takes in a decoder
+ * variable object (derived from gr::fec::general_decoder) for use
+ * in a flowgraph.
+ *
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * This block uses a decoder variable object (derived from
+ * gr::fec::generic_decoder) to decode data within a
+ * flowgraph. This block interacts with the general FECAPI
+ * architecture to handle all passing all input and output data in
+ * a flowgraph. The decoder variable takes care of understanding
+ * the requirements, data types and sizes, and boundary conditions
+ * of the specific FEC decoding algorithm.
+ *
+ * Generally, this block is used within the fec.extended_decoder
+ * Python block to handle some input/output formatting issues. In
+ * the FECAPI, the decoder variable sets properties like the input
+ * and output types and sizes and whether the output is packed or
+ * unpacked bytes. The fec.extended_decoder uses this information
+ * to set up an gr::hier_block2 structure to make sure the I/O to
+ * the variable is handled consistently, such as to make sure all
+ * inputs are floats with one soft symbol per item and the outputs
+ * are unpacked bytes with the bit in the LSB.
+ *
+ * See gr::fec::generic_decoder for detail on what information an
+ * FECAPI variable object can set if using this block directly and
+ * not as part of the fec.extended_decoder.
+ */
+ class FEC_API decoder : virtual public block
+ {
+ public:
+ typedef boost::shared_ptr<decoder> sptr;
+ typedef boost::shared_array<unsigned char> buf_sptr;
+
+ /*!
+ * Create the FEC decoder block by taking in the FECAPI decoder
+ * object as well as input and output sizes.
+ *
+ * \param my_decoder An FECAPI decoder object (See gr::fec::generic_decoder).
+ * \param input_item_size The size of the input items (often the my_decoder object can tell us this).
+ * \param output_item_size The size of the output items (often the my_decoder object can tell us this).
+ */
+ static sptr make(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size);
+
+ virtual int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items) = 0;
+ virtual int fixed_rate_ninput_to_noutput(int ninput) = 0;
+ virtual int fixed_rate_noutput_to_ninput(int noutput) = 0;
+ virtual void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required) = 0;
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DECODER_H */
diff --git a/gr-fec/include/gnuradio/fec/depuncture_bb.h b/gr-fec/include/gnuradio/fec/depuncture_bb.h
new file mode 100644
index 0000000000..de11defd2a
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/depuncture_bb.h
@@ -0,0 +1,111 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_DEPUNCTURE_BB_H
+#define INCLUDED_FEC_DEPUNCTURE_BB_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Depuncture a stream of samples.
+ * \ingroup error_coding_blk
+ *
+ * \details
+
+ * Depuncture a given block of input samples of \p puncsize. The
+ * items produced is based on the pattern \p puncpat. Basically,
+ * if:
+ *
+ * \code
+ * k = 0
+ * if _puncpat[i] == 1:
+ * out[i] = input[k++]
+ * else:
+ * out[i] = symbol # default sym=127
+ * \endcode
+ *
+ * This block is designed for unpacked bits - that is, every
+ * input sample is a bit, either a 1 or 0. It's possible to use
+ * packed bits as symbols, but the depuncturing will be done on
+ * the symbol level, not the bit level.
+ *
+ * \p puncpat is specified as a 32-bit integer that we can
+ * convert into the vector _puncpat used in the algorithm above:
+ *
+ * \code
+ * _puncpat = [0,...]
+ * for i in puncsize:
+ * _puncpat[i] = puncpat >> (puncsize-1-i)
+ * \endcode
+ *
+ * Example:
+ * \code
+ * puncsize = 8
+ * puncpat = 0xEF --> [1,1,1,0,1,1,1,1]
+ * input = [a, b, c, d, e, f, g, h]
+ * output = [a, b, c, 127, e, f, g, h]
+ * \endcode
+ *
+ * The gr.fec Python module provides a read_bitlist function
+ * that can turn a string of a puncture pattern into the correct
+ * integer form. The pattern of 0xEF could be specified as
+ * fec.readbitlist("11101111"). Also, this allows us to use
+ * puncsize=len("11101111") to make sure that our sizes are set
+ * up correctly for the pattern we want.
+ *
+ * The fec.extended_decoder takes in the puncture pattern
+ * directly as a string and uses the readbitlist inside to do
+ * the conversion.
+ *
+ * The \p delay parameter delays the application of the puncture
+ * pattern. This is equivalent to circularly rotating the \p
+ * puncpat by \p delay. Note that because of the circular shift,
+ * the delay should be between 0 and \p puncsize, but this is
+ * not enforced; the effective delay will simply be \p delay mod
+ * \p puncsize. A negative value here is ignored.
+ */
+ class FEC_API depuncture_bb : virtual public block
+ {
+ public:
+ // gr::fec::depuncture_bb::sptr
+ typedef boost::shared_ptr<depuncture_bb> sptr;
+
+ /*!
+ * \brief Constructs a depuncture block.
+ *
+ * \param puncsize Size of block of bits to puncture
+ * \param puncpat The puncturing pattern
+ * \param delay Delayed the puncturing pattern by shifting it
+ * \param symbol The symbol to reinsert into the stream (def=127)
+ */
+ static sptr make(int puncsize, int puncpat,
+ int delay=0, char symbol=127);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DEPUNCTURE_BB_H */
diff --git a/gr-fec/include/gnuradio/fec/dummy_decoder.h b/gr-fec/include/gnuradio/fec/dummy_decoder.h
new file mode 100644
index 0000000000..071b57151e
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/dummy_decoder.h
@@ -0,0 +1,76 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_DUMMY_DECODER_H
+#define INCLUDED_FEC_DUMMY_DECODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_decoder.h>
+#include <map>
+#include <string>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ /*!
+ * \brief Dummy Decoding class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * A dummy decoder class that simply passes the input to the
+ * output. It is meant to allow us to easily use the FEC API
+ * encoder and decoder blocks in an application with no coding.
+ */
+ class FEC_API dummy_decoder : virtual public generic_decoder
+ {
+ public:
+
+ /*!
+ * Build a dummy decoding FEC API object.
+ *
+ * \param frame_size Number of bits per frame. If using in the
+ * tagged stream style, this is the maximum allowable
+ * number of bits per frame.
+ */
+ static generic_decoder::sptr make(int frame_size);
+
+ /*!
+ * Sets the uncoded frame size to \p frame_size. If \p
+ * frame_size is greater than the value given to the
+ * constructor, the frame size will be capped by that initial
+ * value and this function will return false. Otherwise, it
+ * returns true.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ /*!
+ * Returns the coding rate of this encoder (it will always be 1).
+ */
+ virtual double rate() = 0;
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DUMMY_DECODER_H */
diff --git a/gr-fec/include/gnuradio/fec/dummy_encoder.h b/gr-fec/include/gnuradio/fec/dummy_encoder.h
new file mode 100644
index 0000000000..2270d1f684
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/dummy_encoder.h
@@ -0,0 +1,76 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_DUMMY_ENCODER_H
+#define INCLUDED_FEC_DUMMY_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/encoder.h>
+#include <map>
+#include <string>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ /*!
+ * \brief Dummy Encoding class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * A dummy encoder class that simply passes the input to the
+ * output. It is meant to allow us to easily use the FEC API
+ * encoder and decoder blocks in an application with no coding.
+ */
+ class FEC_API dummy_encoder : virtual public generic_encoder
+ {
+ public:
+
+ /*!
+ * Build a dummy encoding FEC API object.
+ *
+ * \param frame_size Number of bits per frame. If using in the
+ * tagged stream style, this is the maximum allowable
+ * number of bits per frame.
+ */
+ static generic_encoder::sptr make(int frame_size);
+
+ /*!
+ * Sets the uncoded frame size to \p frame_size. If \p
+ * frame_size is greater than the value given to the
+ * constructor, the frame size will be capped by that initial
+ * value and this function will return false. Otherwise, it
+ * returns true.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ /*!
+ * Returns the coding rate of this encoder (it will always be 1).
+ */
+ virtual double rate() = 0;
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DUMMY_ENCODER_H */
diff --git a/gr-fec/include/gnuradio/fec/encoder.h b/gr-fec/include/gnuradio/fec/encoder.h
new file mode 100644
index 0000000000..fae4bdfdda
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/encoder.h
@@ -0,0 +1,76 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_ENCODER_H
+#define INCLUDED_FEC_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_encoder.h>
+#include <gnuradio/block.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Creates the encoder block for use in GNU Radio
+ * flowgraphs from a given FECAPI object derived from the
+ * generic_encoder class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * Generally, we would use the fec.extended_encoder Python
+ * implementation to instantiate this. The extended_encoder wraps
+ * up a few more details, like taking care of puncturing as well
+ * as the encoder itself.
+ */
+ class FEC_API encoder : virtual public block
+ {
+ public:
+ typedef boost::shared_ptr<encoder> sptr;
+
+ /*!
+ * Build the FEC encoder block from an FECAPI encoder object.
+ *
+ * \param my_encoder An FECAPI encoder object child of the generic_encoder class.
+ * \param input_item_size size of a block of data for the encoder.
+ * \param output_item_size size of a block of data the encoder will produce.
+ */
+ static sptr make(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size);
+
+ virtual int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items) = 0;
+ virtual int fixed_rate_ninput_to_noutput(int ninput) = 0;
+ virtual int fixed_rate_noutput_to_ninput(int noutput) = 0;
+ virtual void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required) = 0;
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_ENCODER_H */
diff --git a/gr-fec/include/gnuradio/fec/generic_decoder.h b/gr-fec/include/gnuradio/fec/generic_decoder.h
new file mode 100644
index 0000000000..0e14d49e76
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/generic_decoder.h
@@ -0,0 +1,242 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_GENERIC_DECODER_H
+#define INCLUDED_FEC_GENERIC_DECODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/logger.h>
+#include <boost/shared_ptr.hpp>
+#include <boost/format.hpp>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Parent class for FECAPI objects.
+ *
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * Parent of a decoder variable class for FECAPI that will fit
+ * into the gr::fec::decoder block to handle FEC decoding. This
+ * class provides the basic information required to fit into the
+ * FECAPI structure. It provides information about input and
+ * output data types, potential data conversions, and a few other
+ * parameters useful to establish the decoder's behavior.
+ *
+ * We create objects from FECAPI-derived classes to go into the
+ * actual GNU Radio decoder block. Each object contains its own
+ * state and so there should be a one-to-one mapping of an FECAPI
+ * object and a GR decoder block. Sharing these objects is not
+ * guaranteed to be thread-safe.
+ *
+ * This is a pure virtual class and must be derived from by a
+ * child class.
+ *
+ * \sa gr::fec::code::cc_decoder
+ * \sa gr::fec::code::ccsds_decoder
+ */
+ class FEC_API generic_decoder
+ {
+ protected:
+ gr::logger_ptr d_logger;
+
+ public:
+ friend class decoder;
+ virtual void generic_work(void *inbuffer, void *outbuffer) = 0;
+ static int base_unique_id;
+ int my_id;
+ int unique_id();
+ std::string d_name;
+ std::string alias(){ return (boost::format("%s%d")%d_name%unique_id()).str(); }
+
+ public:
+ typedef boost::shared_ptr<generic_decoder> sptr;
+
+ generic_decoder(void) {};
+ generic_decoder(std::string name);
+ virtual ~generic_decoder();
+
+ /*!
+ * Returns the rate of the code. For every r input bits, there
+ * is 1 output bit, so the rate is 1/r. Used for setting things
+ * like the encoder block's relative rate.
+ *
+ * This function MUST be reimplemented by the child class.
+ */
+ virtual double rate() = 0;
+
+ /*!
+ * Returns the input size in items that the decoder object uses
+ * to decode a full frame. Often, this number is the number of
+ * bits per frame if the input format is unpacked. If the block
+ * expects packed bytes, then this value should be the number of
+ * bytes (number of bits / 8) per input frame.
+ *
+ * The child class MUST implement this function.
+ */
+ virtual int get_input_size() = 0;
+
+ /*!
+ * Returns the output size in items that the decoder object
+ * produces after decoding a full frame. Often, this number is
+ * the number of bits in the outputted frame if the input format
+ * is unpacked. If the block produces packed bytes, then this
+ * value should be the number of bytes (number of bits / 8) per
+ * frame produced. This value is generally something like
+ * get_input_size()/R for a 1/R rate code.
+ *
+ * The child class MUST implement this function.
+ */
+ virtual int get_output_size() = 0;
+
+ /*!
+ * Sets up history for the decoder when the decoder is required
+ * to look ahead in the data stream in order to finish
+ * its processing.
+ *
+ * The child class MAY implement this function. If not
+ * reimplemented, it returns 0.
+ */
+ virtual int get_history();
+
+ /*!
+ * Some decoders require the input items to float around a
+ * particular soft value. We can set that floating value by
+ * setting this value to return some non-zero number.
+ *
+ * The fec.extended_decoder block will use this to create an
+ * add_const_ff block before the decoder block to adjust all
+ * input samples appropriately.
+ *
+ * The child class MAY implement this function. If not
+ * reimplemented, it returns 0.
+ */
+ virtual float get_shift();
+
+ /*!
+ * Sets the size of an input item, as in the size of a char or
+ * float item.
+ *
+ * The child class SHOULD implement this function. If not
+ * reimplemented, it returns sizeof(float) as the decoders
+ * typically expect floating point input types.
+ */
+ virtual int get_input_item_size();
+
+ /*!
+ * Sets the size of an output item, as in the size of a char or
+ * float item.
+ *
+ * The child class SHOULD implement this function. If not
+ * reimplemented, it returns sizeof(char) as the decoders
+ * typically expect to produce bits or bytes.
+ */
+ virtual int get_output_item_size();
+
+ /*!
+ * Set up a conversion type required to setup the data properly
+ * for this decoder. The decoder itself will not implement the
+ * conversion and expects an external wrapper (e.g.,
+ * fec.extended_decoder) to read this value and "do the right
+ * thing" to format the data.
+ *
+ * The default behavior is 'none', which means no conversion is
+ * required. Whatever the get_input_item_size() value returns,
+ * the input is expected to conform directly to this.
+ *
+ * This may also return 'uchar', which indicates that the
+ * wrapper should convert the standard float samples to unsigned
+ * characters, either hard sliced or 8-bit soft symbols. See
+ * gr::fec::code::cc_decoder as an example decoder that uses
+ * this conversion format.
+ *
+ * If 'packed_bits', the block expects the inputs to be packed
+ * hard bits. Each input item is a unsigned char where each of
+ * the 8-bits is a hard bit value.
+ *
+ * The child class SHOULD implement this function. If not
+ * reimplemented, it returns "none".
+ */
+ virtual const char* get_input_conversion();
+
+ /*!
+ * Set up a conversion type required to understand the output
+ * style of this decoder. Generally, follow-on processing
+ * expects unpacked bits, so we specify the conversion type here
+ * to indicate what the wrapper (e.g., fec.extended_decoder)
+ * should do to convert the output samples from the decoder into
+ * unpacked bits.
+ *
+ * The default behavior is 'none', which means no conversion is
+ * required. This should mean that the output data is produced
+ * from this decoder as unpacked bit.
+ *
+ * If 'unpack', the block produces packed bytes that should be
+ * unpacked by the wrapper. See gr::fec::code::ccsds_decoder as
+ * an example of a decoder that produces packed bytes.
+ *
+ * The child class SHOULD implement this function. If not
+ * reimplemented, it returns "none".
+ */
+ virtual const char* get_output_conversion();
+
+ /*!
+ * Updates the size of a decoded frame.
+ *
+ * The child class MUST implement this function and interpret
+ * how the \p frame_size information affects the block's
+ * behavior. It should also provide bounds checks.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+ };
+
+ /*! see generic_decoder::get_output_size() */
+ FEC_API int get_decoder_output_size(generic_decoder::sptr my_decoder);
+
+ /*! see generic_decoder::get_input_size() */
+ FEC_API int get_decoder_input_size(generic_decoder::sptr my_decoder);
+
+ /*! see generic_decoder::get_shift() */
+ FEC_API float get_shift(generic_decoder::sptr my_decoder);
+
+ /*! see generic_decoder::get_history() */
+ FEC_API int get_history(generic_decoder::sptr my_decoder);
+
+ /*! see generic_decoder::get_input_item_size() */
+ FEC_API int get_decoder_input_item_size(generic_decoder::sptr my_decoder);
+
+ /*! see generic_decoder::get_output_item_size() */
+ FEC_API int get_decoder_output_item_size(generic_decoder::sptr my_decoder);
+
+ /*! see generic_decoder::get_input_conversion() */
+ FEC_API const char* get_decoder_input_conversion(generic_decoder::sptr my_decoder);
+
+ /*! see generic_decoder::get_output_conversion() */
+ FEC_API const char* get_decoder_output_conversion(generic_decoder::sptr my_decoder);
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_GENRIC_DECODER_H */
diff --git a/gr-fec/include/gnuradio/fec/generic_encoder.h b/gr-fec/include/gnuradio/fec/generic_encoder.h
new file mode 100644
index 0000000000..7c5e08e5d0
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/generic_encoder.h
@@ -0,0 +1,152 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_GENERIC_ENCODER_H
+#define INCLUDED_FEC_GENERIC_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/block.h>
+#include <gnuradio/logger.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API generic_encoder
+ {
+ protected:
+ gr::logger_ptr d_logger;
+
+ public:
+ friend class encoder;
+ virtual void generic_work(void *in_buffer, void *out_buffer) = 0;
+ static int base_unique_id;
+ int my_id;
+ int unique_id();
+ std::string d_name;
+ std::string alias(){ return (boost::format("%s%d")%d_name%unique_id()).str(); }
+
+ public:
+ typedef boost::shared_ptr<generic_encoder> sptr;
+
+ /*!
+ * Returns the rate of the code. For every 1 input bit, there
+ * are r output bits, so the rate is 1/r. Used for setting
+ * things like the encoder block's relative rate.
+ *
+ * This function MUST be reimplemented by the child class.
+ */
+ virtual double rate() = 0;
+
+ /*!
+ * Returns the input size in items that the encoder object uses
+ * to encode a full frame. Often, this number is the number of
+ * bits per frame if the input format is unpacked. If the block
+ * expects packed bytes, then this value should be the number of
+ * bytes (number of bits / 8) per input frame.
+ *
+ * The child class MUST implement this function.
+ */
+ virtual int get_input_size() = 0;
+
+ /*!
+ * Returns the output size in items that the encoder object
+ * produces after encoding a full frame. Often, this number is
+ * the number of bits in the outputted frame if the input format
+ * is unpacked. If the block produces packed bytes, then this
+ * value should be the number of bytes (number of bits / 8) per
+ * frame produced. This value is generally something like
+ * R*get_input_size() for a 1/R rate code.
+ *
+ * The child class MUST implement this function.
+ */
+ virtual int get_output_size() = 0;
+
+ /*!
+ * Set up a conversion type required to setup the data properly
+ * for this encoder. The encoder itself will not implement the
+ * conversion and expects an external wrapper (e.g.,
+ * fec.extended_encoder) to read this value and "do the right
+ * thing" to format the data.
+ *
+ * The default behavior is 'none', which means no conversion is
+ * required. Whatever the get_input_item_size() value returns,
+ * the input is expected to conform directly to this. Generally,
+ * this means unpacked bytes.
+ *
+ * If 'pack', the block expects the inputs to be packed
+ * bytes. The wrapper should implement a
+ * gr::blocks::pack_k_bits_bb(8) block for this.
+ *
+ * The child class MAY implement this function. If not
+ * reimplemented, it returns "none".
+ */
+ virtual const char* get_input_conversion();
+
+ /*!
+ * Set up a conversion type required to understand the output
+ * style of this encoder. Generally an encoder will produce
+ * unpacked bytes with a bit set in the LSB.
+ *
+ * The default behavior is 'none', which means no conversion is
+ * required and the encoder produces unpacked bytes.
+ *
+ * If 'packed_bits', the block produces packed bits and the
+ * wrapper should unpack these (using, for instance,
+ * gr::block::unpack_k_bits_bb(8)).
+ *
+ * The child class MAY implement this function. If not
+ * reimplemented, it returns "none".
+ */
+ virtual const char* get_output_conversion();
+
+ /*!
+ * Updates the size of the frame to encode.
+ *
+ * The child class MUST implement this function and interpret
+ * how the \p frame_size information affects the block's
+ * behavior. It should also provide bounds checks.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ generic_encoder(void) {};
+ generic_encoder(std::string name);
+ virtual ~generic_encoder();
+ };
+
+ /*! see generic_encoder::get_output_size() */
+ FEC_API int get_encoder_output_size(generic_encoder::sptr my_encoder);
+
+ /*! see generic_encoder::get_input_size() */
+ FEC_API int get_encoder_input_size(generic_encoder::sptr my_encoder);
+
+ /*! see generic_encoder::get_input_conversion() */
+ FEC_API const char* get_encoder_input_conversion(generic_encoder::sptr my_encoder);
+
+ /*! see generic_encoder::get_output_conversion() */
+ FEC_API const char* get_encoder_output_conversion(generic_encoder::sptr my_encoder);
+
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_GENERIC_ENCODER_H */
diff --git a/gr-fec/include/gnuradio/fec/puncture_bb.h b/gr-fec/include/gnuradio/fec/puncture_bb.h
new file mode 100644
index 0000000000..3fc8d7ee9b
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/puncture_bb.h
@@ -0,0 +1,105 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_PUNCTURE_BB_H
+#define INCLUDED_FEC_PUNCTURE_BB_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Puncture a stream of unpacked bits.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * Puncture a given block of input samples of \p puncsize. The
+ * items produced is based on pattern \p puncpat. Basically, if:
+ *
+ * \code
+ * k = 0
+ * if _puncpat[i] == 1:
+ * out[k++] = input[i]
+ * \endcode
+ *
+ * This block is designed for unpacked bits - that is, every
+ * input sample is a bit, either a 1 or 0. It's possible to use
+ * packed bits as symbols, but the puncturing will be done on
+ * the symbol level, not the bit level.
+ *
+ * \p puncpat is specified as a 32-bit integer that we can
+ * convert into the vector _puncpat used in the algorithm above:
+ *
+ * \code
+ * _puncpat = [0,...]
+ * for i in puncsize:
+ * _puncpat[i] = puncpat >> (puncsize-1-i)
+ * \endcode
+ *
+ * Example:
+ * \code
+ * puncsize = 8
+ * puncpat = 0xEF --> [1,1,1,0,1,1,1,1]
+ * input = [a, b, c, d, e, f, g, h]
+ * output = [a, b, c, e, f, g, h]
+ * \endcode
+ *
+ * The gr.fec Python module provides a read_bitlist function
+ * that can turn a string of a puncture pattern into the correct
+ * integer form. The pattern of 0xEF could be specified as
+ * fec.readbitlist("11101111"). Also, this allows us to use
+ * puncsize=len("11101111") to make sure that our sizes are set
+ * up correctly for the pattern we want.
+ *
+ * The fec.extended_encoder takes in the puncture pattern
+ * directly as a string and uses the readbitlist inside to do
+ * the conversion.
+ *
+ * The \p delay parameter delays the application of the puncture
+ * pattern. This is equivalent to circularly rotating the \p
+ * puncpat by \p delay. Note that because of the circular shift,
+ * the delay should be between 0 and \p puncsize, but this is
+ * not enforced; the effective delay will simply be \p delay mod
+ * \p puncsize. A negative value here is ignored.
+ */
+ class FEC_API puncture_bb : virtual public block
+ {
+ public:
+ // gr::fec::puncture_bb::sptr
+ typedef boost::shared_ptr<puncture_bb> sptr;
+
+ /*!
+ * \brief Constructs a puncture block for unpacked bits.
+ *
+ * \param puncsize Size of block of bits to puncture
+ * \param puncpat The puncturing pattern
+ * \param delay Delayed the puncturing pattern by shifting it
+ */
+ static sptr make(int puncsize, int puncpat, int delay=0);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_PUNCTURE_BB_H */
diff --git a/gr-fec/include/gnuradio/fec/puncture_ff.h b/gr-fec/include/gnuradio/fec/puncture_ff.h
new file mode 100644
index 0000000000..8625ab4ffb
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/puncture_ff.h
@@ -0,0 +1,104 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_PUNCTURE_FF_H
+#define INCLUDED_FEC_PUNCTURE_FF_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Puncture a stream of floats.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * For a given block of input samples of \p puncsize, the items
+ * produced is based on \p puncpat. Basically, if:
+ *
+ * \code
+ * k = 0
+ * if _puncpat[i] == 1:
+ * out[k++] = input[i]
+ * \endcode
+ *
+ * This block is designed for floats, generally 1's and -1's. It's
+ * possible to use other float values as symbols, but this is not
+ * the expected operation.
+ *
+ * \p puncpat is specified as a 32-bit integer that we can
+ * convert into the vector _puncpat used in the algorithm above:
+ *
+ * \code
+ * _puncpat = [0,...]
+ * for i in puncsize:
+ * _puncpat[i] = puncpat >> (puncsize-1-i)
+ * \endcode
+ *
+ * Example:
+ * \code
+ * puncsize = 8
+ * puncpat = 0xEF --> [1,1,1,0,1,1,1,1]
+ * input = [a, b, c, d, e, f, g, h]
+ * output = [a, b, c, e, f, g, h]
+ * \endcode
+ *
+ * The gr.fec Python module provides a read_bitlist function
+ * that can turn a string of a puncture pattern into the correct
+ * integer form. The pattern of 0xEF could be specified as
+ * fec.readbitlist("11101111"). Also, this allows us to use
+ * puncsize=len("11101111") to make sure that our sizes are set
+ * up correctly for the pattern we want.
+ *
+ * The fec.extended_encoder takes in the puncture pattern
+ * directly as a string and uses the readbitlist inside to do
+ * the conversion.
+ *
+ * The \p delay parameter delays the application of the puncture
+ * pattern. This is equivalent to circularly rotating the \p
+ * puncpat by \p delay. Note that because of the circular shift,
+ * the delay should be between 0 and \p puncsize, but this is
+ * not enforced; the effective delay will simply be \p delay mod
+ * \p puncsize. A negative value here is ignored.
+ */
+ class FEC_API puncture_ff : virtual public block
+ {
+ public:
+ // gr::fec::puncture_ff::sptr
+ typedef boost::shared_ptr<puncture_ff> sptr;
+
+ /*!
+ * \brief Constructs a puncture block for floats.
+ *
+ * \param puncsize Size of block of bits to puncture
+ * \param puncpat The puncturing pattern
+ * \param delay Delayed the puncturing pattern by shifting it
+ */
+ static sptr make(int puncsize, int puncpat, int delay);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_PUNCTURE_FF_H */
diff --git a/gr-fec/include/gnuradio/fec/repetition_decoder.h b/gr-fec/include/gnuradio/fec/repetition_decoder.h
new file mode 100644
index 0000000000..e17f612b83
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/repetition_decoder.h
@@ -0,0 +1,82 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_REPETITION_DECODER_H
+#define INCLUDED_FEC_REPETITION_DECODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_decoder.h>
+#include <map>
+#include <string>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ /*!
+ * \brief Repetition Decoding class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * A repetition decoder class. This takes a majority vote,
+ * biased by the \p ap_prob rate, and decides if the number of 1
+ * bits > ap_prob, it is a 1; else, it is a 0.
+ */
+ class FEC_API repetition_decoder : virtual public generic_decoder
+ {
+ public:
+
+ /*!
+ * Build a repetition decoding FEC API object.
+ *
+ * \param frame_size Number of bits per frame. If using in the
+ * tagged stream style, this is the maximum allowable
+ * number of bits per frame.
+ * \param rep Repetition rate; encoder rate is rep bits out
+ * for each input bit.
+ * \param ap_prob The a priori probability that a bit is a 1
+ * (generally, unless otherwise known, assume to be
+ * 0.5).
+ */
+ static generic_decoder::sptr make(int frame_size, int rep,
+ float ap_prob=0.5);
+
+ /*!
+ * Sets the uncoded frame size to \p frame_size. If \p
+ * frame_size is greater than the value given to the
+ * constructor, the frame size will be capped by that initial
+ * value and this function will return false. Otherwise, it
+ * returns true.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ /*!
+ * Returns the coding rate of this encoder (it will always be 1).
+ */
+ virtual double rate() = 0;
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_REPETITION_DECODER_H */
diff --git a/gr-fec/include/gnuradio/fec/repetition_encoder.h b/gr-fec/include/gnuradio/fec/repetition_encoder.h
new file mode 100644
index 0000000000..313dc6415f
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/repetition_encoder.h
@@ -0,0 +1,78 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_REPETITION_ENCODER_H
+#define INCLUDED_FEC_REPETITION_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/encoder.h>
+#include <map>
+#include <string>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ /*!
+ * \brief Repetition Encoding class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * A repetition encoder class that repeats each input bit \p rep
+ * times. To decode, take a majority vote over the number of
+ * repetitions.
+ */
+ class FEC_API repetition_encoder : virtual public generic_encoder
+ {
+ public:
+
+ /*!
+ * Build a repetition encoding FEC API object.
+ *
+ * \param frame_size Number of bits per frame. If using in the
+ * tagged stream style, this is the maximum allowable
+ * number of bits per frame.
+ * \param rep Repetition rate; encoder rate is rep bits out
+ * for each input bit.
+ */
+ static generic_encoder::sptr make(int frame_size, int rep);
+
+ /*!
+ * Sets the uncoded frame size to \p frame_size. If \p
+ * frame_size is greater than the value given to the
+ * constructor, the frame size will be capped by that initial
+ * value and this function will return false. Otherwise, it
+ * returns true.
+ */
+ virtual bool set_frame_size(unsigned int frame_size) = 0;
+
+ /*!
+ * Returns the coding rate of this encoder.
+ */
+ virtual double rate() = 0;
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_REPETITION_ENCODER_H */
diff --git a/gr-fec/include/gnuradio/fec/tagged_decoder.h b/gr-fec/include/gnuradio/fec/tagged_decoder.h
new file mode 100644
index 0000000000..4eba17a7a2
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/tagged_decoder.h
@@ -0,0 +1,95 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_TAGGED_DECODER_H
+#define INCLUDED_FEC_TAGGED_DECODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_decoder.h>
+#include <gnuradio/tagged_stream_block.h>
+#include <boost/shared_ptr.hpp>
+#include <boost/shared_array.hpp>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief General FEC decoding block that takes in a decoder
+ * variable object (derived from gr::fec::general_decoder) for use
+ * in a flowgraph.
+ *
+ * \ingroup error_coding_blk
+ *
+ * \details
+ * This block uses a decoder variable object (derived from
+ * gr::fec::generic_decoder) to decode data within a
+ * flowgraph. This block interacts with the general FECAPI
+ * architecture to handle all passing all input and output data in
+ * a flowgraph. The decoder variable takes care of understanding
+ * the requirements, data types and sizes, and boundary conditions
+ * of the specific FEC decoding algorithm.
+ *
+ * Generally, this block is used within the fec.extended_decoder
+ * Python block to handle some input/output formatting issues. In
+ * the FECAPI, the decoder variable sets properties like the input
+ * and output types and sizes and whether the output is packed or
+ * unpacked bytes. The fec.extended_decoder uses this information
+ * to set up an gr::hier_block2 structure to make sure the I/O to
+ * the variable is handled consistently, such as to make sure all
+ * inputs are floats with one soft symbol per item and the outputs
+ * are unpacked bytes with the bit in the LSB.
+ *
+ * See gr::fec::generic_decoder for detail on what information an
+ * FECAPI variable object can set if using this block directly and
+ * not as part of the fec.extended_decoder.
+ */
+ class FEC_API tagged_decoder : virtual public tagged_stream_block
+ {
+ public:
+ typedef boost::shared_ptr<tagged_decoder> sptr;
+ typedef boost::shared_array<unsigned char> buf_sptr;
+
+ /*!
+ * Create the FEC decoder block by taking in the FECAPI decoder
+ * object as well as input and output sizes.
+ *
+ * \param my_decoder An FECAPI decoder object (See gr::fec::generic_decoder).
+ * \param input_item_size The size of the input items (often the my_decoder object can tell us this).
+ * \param output_item_size The size of the output items (often the my_decoder object can tell us this).
+ * \param lengthtagname Key name of the tagged stream frame size.
+ */
+ static sptr make(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string &lengthtagname="packet_len");
+
+ virtual int work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items) = 0;
+ virtual int calculate_output_stream_length(const gr_vector_int &ninput_items) = 0;
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_TAGGED_DECODER_H */
diff --git a/gr-fec/include/gnuradio/fec/tagged_encoder.h b/gr-fec/include/gnuradio/fec/tagged_encoder.h
new file mode 100644
index 0000000000..86c2603edc
--- /dev/null
+++ b/gr-fec/include/gnuradio/fec/tagged_encoder.h
@@ -0,0 +1,75 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_TAGGED_ENCODER_H
+#define INCLUDED_FEC_TAGGED_ENCODER_H
+
+#include <gnuradio/fec/api.h>
+#include <gnuradio/fec/generic_encoder.h>
+#include <gnuradio/tagged_stream_block.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gr {
+ namespace fec {
+
+ /*!
+ * \brief Creates the encoder block for use in GNU Radio
+ * flowgraphs from a given FECAPI object derived from the
+ * generic_encoder class.
+ * \ingroup error_coding_blk
+ *
+ * \details
+ *
+ * Generally, we would use the fec.extended_encoder Python
+ * implementation to instantiate this. The extended_encoder wraps
+ * up a few more details, like taking care of puncturing as well
+ * as the encoder itself.
+ */
+ class FEC_API tagged_encoder : virtual public tagged_stream_block
+ {
+ public:
+ typedef boost::shared_ptr<tagged_encoder> sptr;
+
+ /*!
+ * Build the FEC encoder block from an FECAPI encoder object.
+ *
+ * \param my_encoder An FECAPI encoder object child of the generic_encoder class.
+ * \param input_item_size size of a block of data for the encoder.
+ * \param output_item_size size of a block of data the encoder will produce.
+ * \param lengthtagname Key name of the tagged stream frame size.
+ */
+ static sptr make(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string& lengthtagname="packet_len");
+
+ virtual int work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items) = 0;
+ virtual int calculate_output_stream_length(const gr_vector_int &ninput_items) = 0;
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_TAGGED_ENCODER_H */
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index 34c0746798..8af27db334 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2012-2013 Free Software Foundation, Inc.
+# Copyright 2012-2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -29,7 +29,10 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${GR_FEC_INCLUDE_DIRS}
+ ${GR_BLOCKS_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
+ ${VOLK_INCLUDE_DIRS}
+ ${LOG4CPP_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
@@ -38,14 +41,38 @@ if(ENABLE_GR_CTRLPORT)
include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
-link_directories(${Boost_LIBRARY_DIRS})
+link_directories(
+ ${Boost_LIBRARY_DIRS}
+ ${LOG4CPP_LIBRARY_DIRS}
+)
########################################################################
# Setup library
########################################################################
list(APPEND gnuradio_fec_sources
- decode_ccsds_27_fb_impl.cc
- encode_ccsds_27_bb_impl.cc
+ generic_decoder.cc
+ generic_encoder.cc
+ decoder_impl.cc
+ encoder_impl.cc
+ tagged_decoder_impl.cc
+ tagged_encoder_impl.cc
+ async_decoder_impl.cc
+ async_encoder_impl.cc
+ cc_decoder_impl.cc
+ cc_encoder_impl.cc
+ ccsds_encoder_impl.cc
+ dummy_decoder_impl.cc
+ dummy_encoder_impl.cc
+ repetition_decoder_impl.cc
+ repetition_encoder_impl.cc
+ decode_ccsds_27_fb_impl.cc
+ encode_ccsds_27_bb_impl.cc
+ ber_tools.cc
+ ber_bf_impl.cc
+ conv_bit_corr_bb_impl.cc
+ puncture_bb_impl.cc
+ puncture_ff_impl.cc
+ depuncture_bb_impl.cc
)
#Add Windows DLL resource file if using MSVC
@@ -63,11 +90,26 @@ if(MSVC)
endif(MSVC)
list(APPEND gnuradio_fec_libs
+ gnuradio-blocks
gnuradio-runtime
+ volk
${Boost_LIBRARIES}
+ ${LOG4CPP_LIBRARIES}
)
add_library(gnuradio-fec SHARED ${gnuradio_fec_sources})
target_link_libraries(gnuradio-fec ${gnuradio_fec_libs})
GR_LIBRARY_FOO(gnuradio-fec RUNTIME_COMPONENT "fec_runtime" DEVEL_COMPONENT "fec_devel")
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-fec_static STATIC ${gnuradio_fec_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-fec_static
+ PROPERTIES OUTPUT_NAME gnuradio-fec)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-fec_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "fec_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-fec/lib/async_decoder_impl.cc b/gr-fec/lib/async_decoder_impl.cc
new file mode 100644
index 0000000000..f5924ec1f9
--- /dev/null
+++ b/gr-fec/lib/async_decoder_impl.cc
@@ -0,0 +1,223 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "async_decoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ async_decoder::sptr
+ async_decoder::make(generic_decoder::sptr my_decoder,
+ bool packed, bool rev_pack)
+ {
+ return gnuradio::get_initial_sptr
+ (new async_decoder_impl(my_decoder, packed, rev_pack));
+ }
+
+ async_decoder_impl::async_decoder_impl(generic_decoder::sptr my_decoder,
+ bool packed, bool rev_pack)
+ : block("async_decoder",
+ io_signature::make(0,0,0),
+ io_signature::make(0,0,0)),
+ d_input_item_size(sizeof(float)), d_output_item_size(sizeof(char))
+ {
+ d_in_port = pmt::mp("in");
+ d_out_port = pmt::mp("out");
+
+ d_decoder = my_decoder;
+
+ if(d_decoder->get_history() > 0) {
+ throw std::runtime_error("async_decoder deploment does not support decoders with history requirements.");
+ }
+
+ d_packed = packed;
+ d_rev_pack = rev_pack;
+
+ message_port_register_in(d_in_port);
+ message_port_register_out(d_out_port);
+
+ if(d_packed) {
+ d_pack = new blocks::kernel::pack_k_bits(8);
+ set_msg_handler(d_in_port, boost::bind(&async_decoder_impl::decode_packed, this ,_1));
+ }
+ else {
+ set_msg_handler(d_in_port, boost::bind(&async_decoder_impl::decode_unpacked, this ,_1));
+ }
+
+ // The maximum frame size is set by the initial frame size of the decoder.
+ d_max_bits_in = d_decoder->get_input_size();
+ d_tmp_f32 = (float*)volk_malloc(d_max_bits_in*sizeof(float),
+ volk_get_alignment());
+
+ if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
+ d_tmp_u8 = (int8_t*)volk_malloc(d_max_bits_in*sizeof(uint8_t),
+ volk_get_alignment());
+ }
+
+ if(d_packed) {
+ int max_bits_out = d_decoder->get_output_size();
+ d_bits_out = (uint8_t*)volk_malloc(max_bits_out*sizeof(uint8_t),
+ volk_get_alignment());
+ }
+ }
+
+ async_decoder_impl::~async_decoder_impl()
+ {
+ if(d_packed) {
+ delete d_pack;
+ volk_free(d_bits_out);
+ }
+
+ volk_free(d_tmp_f32);
+
+ if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
+ volk_free(d_tmp_u8);
+ }
+ }
+
+ void
+ async_decoder_impl::decode_unpacked(pmt::pmt_t msg)
+ {
+ // extract input pdu
+ pmt::pmt_t meta(pmt::car(msg));
+ pmt::pmt_t bits(pmt::cdr(msg));
+
+ // Watch out for this diff. It might be over-specializing to the
+ // CC decoder in terminated mode that has an extra rate(K-1)
+ // bits added on to the transmitted frame.
+ int diff = d_decoder->rate()*d_decoder->get_input_size() - d_decoder->get_output_size();
+
+ int nbits_in = pmt::length(bits);
+ int nbits_out = nbits_in*d_decoder->rate() - diff;
+
+ // Check here if the frame size is larger than what we've
+ // allocated for in the constructor.
+ if(nbits_in > d_max_bits_in) {
+ throw std::runtime_error("async_decoder: Received frame larger than max frame size.");
+ }
+
+ d_decoder->set_frame_size(nbits_out);
+
+ size_t o0(0);
+ const float* f32in = pmt::f32vector_elements(bits, o0);
+ pmt::pmt_t outvec(pmt::make_u8vector(nbits_out, 0x00));
+ uint8_t* u8out = pmt::u8vector_writable_elements(outvec, o0);
+
+ if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
+ volk_32f_s32f_multiply_32f(d_tmp_f32, f32in, 48.0f, nbits_in);
+ }
+ else {
+ memcpy(d_tmp_f32, f32in, nbits_in*sizeof(float));
+ }
+
+ if(d_decoder->get_shift() != 0) {
+ for(int n = 0; n < nbits_in; n++)
+ d_tmp_f32[n] += d_decoder->get_shift();
+ }
+
+ if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
+ //volk_32f_s32f_convert_8i(d_tmp_u8, d_tmp_f32, 1, nbits_in);
+ for(int n = 0; n < nbits_in; n++)
+ d_tmp_u8[n] = static_cast<uint8_t>(d_tmp_f32[n]);
+
+ d_decoder->generic_work((void*)d_tmp_u8, (void*)u8out);
+ }
+ else {
+ d_decoder->generic_work((void*)d_tmp_f32, (void*)u8out);
+ }
+
+ message_port_pub(d_out_port, pmt::cons(meta, outvec));
+ }
+
+ void
+ async_decoder_impl::decode_packed(pmt::pmt_t msg)
+ {
+ // extract input pdu
+ pmt::pmt_t meta(pmt::car(msg));
+ pmt::pmt_t bits(pmt::cdr(msg));
+
+ size_t o0 = 0;
+ int nbits_in = pmt::length(bits);
+ int nbits_out = nbits_in*d_decoder->rate();
+ int nbytes_out = nbits_out/8;
+
+ // Check here if the frame size is larger than what we've
+ // allocated for in the constructor.
+ if(nbits_in > d_max_bits_in) {
+ throw std::runtime_error("async_decoder: Received frame larger than max frame size.");
+ }
+
+ d_decoder->set_frame_size(nbits_out);
+
+ pmt::pmt_t outvec(pmt::make_u8vector(nbytes_out, 0x00));
+ uint8_t* bytes_out = pmt::u8vector_writable_elements(outvec, o0);
+ const float* f32in = pmt::f32vector_elements(bits, o0);
+
+ if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
+ volk_32f_s32f_multiply_32f(d_tmp_f32, f32in, 48.0f, nbits_in);
+ }
+ else {
+ memcpy(d_tmp_f32, f32in, nbits_in*sizeof(float));
+ }
+
+ if(d_decoder->get_shift() != 0) {
+ for(int n = 0; n < nbits_in; n++)
+ d_tmp_f32[n] += d_decoder->get_shift();
+ }
+
+ if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
+ //volk_32f_s32f_convert_8i(d_tmp_u8, d_tmp_f32, 1.0, nbits_in);
+ for(int n = 0; n < nbits_in; n++)
+ d_tmp_u8[n] = static_cast<uint8_t>(d_tmp_f32[n]);
+
+ d_decoder->generic_work((void*)d_tmp_u8, (void*)d_bits_out);
+ }
+ else {
+ d_decoder->generic_work((void*)d_tmp_f32, (void*)d_bits_out);
+ }
+
+ if(d_rev_pack)
+ d_pack->pack_rev(bytes_out, d_bits_out, nbytes_out);
+ else
+ d_pack->pack(bytes_out, d_bits_out, nbytes_out);
+
+ message_port_pub(d_out_port, pmt::cons(meta, outvec));
+ }
+
+ int
+ async_decoder_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ return noutput_items;
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/async_decoder_impl.h b/gr-fec/lib/async_decoder_impl.h
new file mode 100644
index 0000000000..c3c7a7c3ff
--- /dev/null
+++ b/gr-fec/lib/async_decoder_impl.h
@@ -0,0 +1,69 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_ASYNC_DECODER_IMPL_H
+#define INCLUDED_FEC_ASYNC_DECODER_IMPL_H
+
+#include <gnuradio/fec/async_decoder.h>
+#include <gnuradio/blocks/pack_k_bits.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API async_decoder_impl : public async_decoder
+ {
+ private:
+ generic_decoder::sptr d_decoder;
+ size_t d_input_item_size;
+ size_t d_output_item_size;
+
+ pmt::pmt_t d_in_port;
+ pmt::pmt_t d_out_port;
+
+ blocks::kernel::pack_k_bits *d_pack;
+
+ bool d_packed;
+ bool d_rev_pack;
+
+ int d_max_bits_in;
+ float *d_tmp_f32;
+ int8_t *d_tmp_u8;
+ uint8_t *d_bits_out;
+
+ void decode_packed(pmt::pmt_t msg);
+ void decode_unpacked(pmt::pmt_t msg);
+
+ public:
+ async_decoder_impl(generic_decoder::sptr my_decoder,
+ bool packed=false, bool rev_pack=true);
+ ~async_decoder_impl();
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_ASYNC_DECODER_IMPL_H */
diff --git a/gr-fec/lib/async_encoder_impl.cc b/gr-fec/lib/async_encoder_impl.cc
new file mode 100644
index 0000000000..d6ce67d491
--- /dev/null
+++ b/gr-fec/lib/async_encoder_impl.cc
@@ -0,0 +1,194 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "async_encoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ async_encoder::sptr
+ async_encoder::make(generic_encoder::sptr my_encoder,
+ bool packed, bool rev_unpack, bool rev_pack)
+ {
+ return gnuradio::get_initial_sptr
+ (new async_encoder_impl(my_encoder, packed, rev_unpack, rev_pack));
+ }
+
+ async_encoder_impl::async_encoder_impl(generic_encoder::sptr my_encoder,
+ bool packed, bool rev_unpack, bool rev_pack)
+ : block("async_encoder",
+ io_signature::make(0,0,0),
+ io_signature::make(0,0,0)),
+ d_input_item_size(sizeof(char)), d_output_item_size(sizeof(char))
+ {
+ d_in_port = pmt::mp("in");
+ d_out_port = pmt::mp("out");
+
+ d_encoder = my_encoder;
+
+ d_packed = packed;
+ d_rev_unpack = rev_unpack;
+ d_rev_pack = rev_pack;
+
+ message_port_register_in(d_in_port);
+ message_port_register_out(d_out_port);
+
+ if(d_packed) {
+ set_msg_handler(d_in_port, boost::bind(&async_encoder_impl::encode_packed, this ,_1) );
+
+ d_unpack = new blocks::kernel::unpack_k_bits(8);
+
+ int max_bits_out = d_encoder->get_output_size();
+ d_bits_out = (uint8_t*)volk_malloc(max_bits_out*sizeof(uint8_t),
+ volk_get_alignment());
+
+ }
+ else {
+ set_msg_handler(d_in_port, boost::bind(&async_encoder_impl::encode_unpacked, this ,_1) );
+ }
+
+ if(d_packed || (strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0)) {
+ // encode_unpacked: if input conversion is 'pack', pack the input bits
+ // encode_packed: used to repack the output
+ d_pack = new blocks::kernel::pack_k_bits(8);
+
+ // encode_unpacked: Holds packed bits in when input conversion is packed
+ // encode_packed: holds the output bits of the encoder to be packed
+ int max_bits_in = d_encoder->get_input_size();
+ d_bits_in = (uint8_t*)volk_malloc(max_bits_in*sizeof(uint8_t),
+ volk_get_alignment());
+ }
+ }
+
+ async_encoder_impl::~async_encoder_impl()
+ {
+ if(d_packed) {
+ delete d_unpack;
+ volk_free(d_bits_out);
+ }
+
+ if(d_packed || (strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0)) {
+ delete d_pack;
+ volk_free(d_bits_in);
+ }
+ }
+
+ void
+ async_encoder_impl::encode_unpacked(pmt::pmt_t msg)
+ {
+ // extract input pdu
+ pmt::pmt_t meta(pmt::car(msg));
+ pmt::pmt_t bits(pmt::cdr(msg));
+
+ size_t o0 = 0;
+ int nbits_in = pmt::length(bits);
+ const uint8_t* bits_in = pmt::u8vector_elements(bits, o0);
+
+ d_encoder->set_frame_size(nbits_in);
+
+ int nbits_out = d_encoder->get_output_size();
+
+ // buffers for output bits to go to
+ pmt::pmt_t outvec = pmt::make_u8vector(nbits_out, 0x00);
+ uint8_t* bits_out = pmt::u8vector_writable_elements(outvec, o0);
+
+ if(strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0) {
+ d_pack->pack(d_bits_in, bits_in, nbits_in/8);
+ d_encoder->generic_work((void*)d_bits_in, (void*)bits_out);
+ }
+ else {
+ d_encoder->generic_work((void*)bits_in, (void*)bits_out);
+ }
+
+ pmt::pmt_t msg_pair = pmt::cons(meta, outvec);
+ message_port_pub(d_out_port, msg_pair);
+ }
+
+ void
+ async_encoder_impl::encode_packed(pmt::pmt_t msg)
+ {
+ // extract input pdu
+ pmt::pmt_t meta(pmt::car(msg));
+ pmt::pmt_t bytes(pmt::cdr(msg));
+
+ size_t o0 = 0;
+ int nbytes_in = pmt::length(bytes);
+ int nbits_in = 8*nbytes_in;
+ const uint8_t* bytes_in = pmt::u8vector_elements(bytes, o0);
+
+ d_encoder->set_frame_size(nbits_in);
+
+ int nbits_out = d_encoder->get_output_size();
+ int nbytes_out = nbits_out/8;
+
+ if(strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0) {
+ // If the input takes packed, anyways, don't go through the
+ // unpacker. Note that if we need the unpacking to reverse,
+ // we won't get that here and might have to correct for it in
+ // the decoder.
+ // d_bits_in > bytes_in, so we're abusing the existence of
+ // this allocated memory here
+ memcpy(d_bits_in, bytes_in, nbytes_in*sizeof(uint8_t));
+ }
+ else {
+ // Encoder takes a stream of bits, but PDU's are received as
+ // bytes, so we unpack them here.
+ if(d_rev_unpack)
+ d_unpack->unpack_rev(d_bits_in, bytes_in, nbytes_in);
+ else
+ d_unpack->unpack(d_bits_in, bytes_in, nbytes_in);
+ }
+
+ // buffers for output bytes to go to
+ pmt::pmt_t outvec = pmt::make_u8vector(nbytes_out, 0x00);
+ uint8_t* bytes_out = pmt::u8vector_writable_elements(outvec, o0);
+
+ // ENCODE!
+ d_encoder->generic_work((void*)d_bits_in, (void*)d_bits_out);
+
+ if(d_rev_pack)
+ d_pack->pack_rev(bytes_out, d_bits_out, nbytes_out);
+ else
+ d_pack->pack(bytes_out, d_bits_out, nbytes_out);
+
+ pmt::pmt_t msg_pair = pmt::cons(meta, outvec);
+ message_port_pub(d_out_port, msg_pair);
+ }
+
+ int
+ async_encoder_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ return noutput_items;
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/async_encoder_impl.h b/gr-fec/lib/async_encoder_impl.h
new file mode 100644
index 0000000000..fe48177b95
--- /dev/null
+++ b/gr-fec/lib/async_encoder_impl.h
@@ -0,0 +1,71 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_ASYNC_ENCODER_IMPL_H
+#define INCLUDED_FEC_ASYNC_ENCODER_IMPL_H
+
+#include <gnuradio/fec/async_encoder.h>
+#include <gnuradio/blocks/unpack_k_bits.h>
+#include <gnuradio/blocks/pack_k_bits.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API async_encoder_impl : public async_encoder
+ {
+ private:
+ generic_encoder::sptr d_encoder;
+ size_t d_input_item_size;
+ size_t d_output_item_size;
+
+ pmt::pmt_t d_in_port;
+ pmt::pmt_t d_out_port;
+
+ blocks::kernel::unpack_k_bits *d_unpack;
+ blocks::kernel::pack_k_bits *d_pack;
+
+ bool d_packed;
+ bool d_rev_unpack;
+ bool d_rev_pack;
+
+ uint8_t* d_bits_in;
+ uint8_t* d_bits_out;
+
+ void encode_packed(pmt::pmt_t msg);
+ void encode_unpacked(pmt::pmt_t msg);
+
+ public:
+ async_encoder_impl(generic_encoder::sptr my_encoder,
+ bool packed=false,
+ bool rev_unpack=true, bool rev_pack=true);
+ ~async_encoder_impl();
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_ASYNC_ENCODER_IMPL_H */
diff --git a/gr-fec/lib/ber_bf_impl.cc b/gr-fec/lib/ber_bf_impl.cc
new file mode 100644
index 0000000000..d7282ea699
--- /dev/null
+++ b/gr-fec/lib/ber_bf_impl.cc
@@ -0,0 +1,143 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ber_bf_impl.h"
+#include "ber_tools.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <math.h>
+
+namespace gr {
+ namespace fec {
+
+ ber_bf::sptr
+ ber_bf::make(bool test_mode, int berminerrors, float ber_limit)
+ {
+ return gnuradio::get_initial_sptr
+ (new ber_bf_impl(test_mode, berminerrors, ber_limit));
+ }
+
+ ber_bf_impl::ber_bf_impl(bool test_mode, int berminerrors, float ber_limit)
+ : block("fec_ber_bf",
+ io_signature::make(2, 2, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(float))),
+ d_total_errors(0), d_total(0), d_test_mode(test_mode),
+ d_berminerrors(berminerrors), d_ber_limit(ber_limit)
+ {
+ }
+
+ ber_bf_impl::~ber_bf_impl()
+ {
+ }
+
+ void
+ ber_bf_impl::forecast(int noutput_items,
+ gr_vector_int& ninput_items_required)
+ {
+ ninput_items_required[0] = 1<<10 * noutput_items;
+ ninput_items_required[1] = 1<<10 * noutput_items;
+ }
+
+ int
+ ber_bf_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ if(d_test_mode) {
+ if(d_total_errors >= d_berminerrors) {
+ return -1;
+ }
+ else {
+ unsigned char *inbuffer0 = (unsigned char *)input_items[0];
+ unsigned char *inbuffer1 = (unsigned char *)input_items[1];
+ float *outbuffer = (float *)output_items[0];
+
+ int items = ninput_items[0] <= ninput_items[1] ? ninput_items[0] : ninput_items[1];
+
+ if(items > 0) {
+ /*
+ for(int i = 0; i < items; ++i) {
+ if(inbuffer0[i] != inbuffer1[i]) {
+ GR_LOG_INFO(d_logger, boost::format("%1%/%2%: %3% versus %4%") \
+ % i % items % inbuffer0[i] % inbuffer1[i]);
+ }
+ }
+ GR_LOG_INFO(d_logger, boost::format("%1% errors") \
+ % (compber(inbuffer0, inbuffer1, items)));
+ */
+
+ d_total_errors += compber(inbuffer0, inbuffer1, items);
+ d_total += items;
+ }
+ consume_each(items);
+
+ if(d_total_errors >= d_berminerrors) {
+ outbuffer[0] = log10(((double)d_total_errors)/(d_total * 8.0));
+ GR_LOG_INFO(d_logger, boost::format(" %1% over %2% --> %3%") \
+ % d_total_errors % (d_total * 8) % outbuffer[0]);
+ return 1;
+ }
+ else if(log10(((double)d_berminerrors)/(d_total * 8.0)) < d_ber_limit) {
+ GR_LOG_INFO(d_logger, " Min. BER limit reached");
+ outbuffer[0] = d_ber_limit;
+ d_total_errors = d_berminerrors + 1;
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ }
+ }
+ else { // streaming mode
+ unsigned char *inbuffer0 = (unsigned char *)input_items[0];
+ unsigned char *inbuffer1 = (unsigned char *)input_items[1];
+ float *outbuffer = (float *)output_items[0];
+
+ int items = ninput_items[0] <= ninput_items[1] ? ninput_items[0] : ninput_items[1];
+
+ if(items > 0) {
+ uint32_t ret;
+ for(int i = 0; i < items; i++) {
+ volk_32u_popcnt(&ret, static_cast<uint32_t>(inbuffer0[i]^inbuffer1[i]));
+ d_total_errors += ret;
+ }
+
+ d_total += items;
+ outbuffer[0] = log10(((double)d_total_errors)/(d_total * 8.0));
+
+ consume_each(items);
+ return 1;
+ }
+ else {
+ consume_each(0);
+ return 0;
+ }
+ }
+ }
+
+ } /* namespace fec */
+}/* namespace gr */
diff --git a/gr-fec/lib/ber_bf_impl.h b/gr-fec/lib/ber_bf_impl.h
new file mode 100644
index 0000000000..c7faf123ab
--- /dev/null
+++ b/gr-fec/lib/ber_bf_impl.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_BER_BF_IMPL_H
+#define INCLUDED_FEC_BER_BF_IMPL_H
+
+#include <gnuradio/fec/ber_bf.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API ber_bf_impl : public ber_bf
+ {
+ private:
+ int d_total_errors;
+ int d_total;
+ bool d_test_mode;
+ int d_berminerrors;
+ float d_ber_limit;
+
+ public:
+ ber_bf_impl(bool d_test_mode = false, int berminerrors=100, float ber_limit=-7.0);
+ ~ber_bf_impl();
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+
+ void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_BER_BF_IMPL_H */
diff --git a/gr-fec/lib/ber_tools.cc b/gr-fec/lib/ber_tools.cc
new file mode 100644
index 0000000000..675932a690
--- /dev/null
+++ b/gr-fec/lib/ber_tools.cc
@@ -0,0 +1,106 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ber_tools.h"
+
+inline int
+putbit(int word, int loc, int bit)
+{
+ return (((word)&(~((1)<<(loc))))^((bit)<<(loc)));
+}
+
+void
+gaussnoise(float *inbuffer, int buffsize, float sigma)
+{
+ int i;
+ float udrn1=0.0, udrn2=0.0, noise=0.0;
+
+ for(i = 0; i < buffsize;i++) {
+ while((udrn1 = (float)drand48()) < 0.0000001);
+ udrn2 = (float)drand48();
+ noise = sigma*sqrt(-2*log(udrn1))*cos(2*M_PI*udrn2);
+ inbuffer[i] += noise;
+ }
+}
+
+
+int
+compber(unsigned char *inbuffer1, unsigned char *inbuffer2, int buffsize)
+{
+ int i, totaldiff=0;
+ int popcnt[256] =
+ {
+ 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
+ };
+
+ for(i = 0; i < buffsize; i++) {
+ totaldiff += popcnt[inbuffer1[i]^inbuffer2[i]];
+ }
+
+ return totaldiff;
+}
+
+void randbuffer(unsigned char *databuffer,int buffsize, int charout)
+{
+ int i;
+ unsigned char randbit;
+
+ for(i = 0; i < buffsize; i++) {
+ // generate random element
+ randbit = (unsigned char)((0x000010000&rand())>>16);
+ // place in the data buffer
+ if(charout == 0)
+ databuffer[i>>3] = putbit(databuffer[i>>3],7-(i&0x7),randbit);
+ else
+ databuffer[i] = randbit;
+ }
+}
+
+void
+char2bin(unsigned char *inbuffer,int buffSize)
+{
+ int i;
+ unsigned char fbit=0;
+
+ for(i = 0; i < buffSize; i++) {
+ if(inbuffer[i] == 0)
+ fbit = 0;
+ else
+ fbit = 1;
+ inbuffer[i>>3] = putbit(inbuffer[i>>3],7-(i&0x7),fbit);
+ }
+}
diff --git a/gr-fec/lib/ber_tools.h b/gr-fec/lib/ber_tools.h
new file mode 100644
index 0000000000..038b362974
--- /dev/null
+++ b/gr-fec/lib/ber_tools.h
@@ -0,0 +1,73 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GNURADIO_FEC_BER_TOOLS_H
+#define INCLUDED_GNURADIO_FEC_BER_TOOLS_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#define BERMINFRAMES (10000)
+#define BERMINERRORS (100)
+#define BERMAXBITS (1000000000)
+
+/*!
+ * Add BPSK gaussian noise with standard deviation equal to sigma to a
+ * floating point input buffer.
+ *
+ * \param inbuffer (float*) buffer containing data to receive additive
+ * gaussian noise
+ * \param buffsize (int) size of \p inbuffer
+ * \param sigma (float) noise power of the guassian random variables
+ */
+void gaussnoise(float *inbuffer, int buffsize, float sigma);
+
+/*!
+ * Compute the number of bit differences between input buffers
+ *
+ * \param inbuffer1 input stream 1 to compare against \p inbuffer2
+ * \param inbuffer2 input stream 2 to be compared against
+ * \param buffsize number of elements in each buffer
+ */
+int compber(unsigned char *inbuffer1, unsigned char *inbuffer2, int buffsize);
+
+/*!
+ * Generate a random buffer of data
+ *
+ * \param databuffer pointer to buffer containing random data
+ * \param buffsize number of elements in each buffer
+ */
+void randbuffer(unsigned char *databuffer, int buffsize, int charout);
+
+/*!
+ * Pack the character buffer
+ *
+ * \param databuffer pointer to buffer containing unpacked chars
+ * \param buffsize number of elements in each buffer
+ */
+void char2bin(unsigned char *inbuffer, int buffsize);
+
+#endif /* INCLUDED_GNURADIO_FEC_BER_TOOLS_H */
+
+
diff --git a/gr-fec/lib/cc_decoder_impl.cc b/gr-fec/lib/cc_decoder_impl.cc
new file mode 100644
index 0000000000..20587a21ae
--- /dev/null
+++ b/gr-fec/lib/cc_decoder_impl.cc
@@ -0,0 +1,503 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "cc_decoder_impl.h"
+#include <math.h>
+#include <boost/assign/list_of.hpp>
+#include <volk/volk.h>
+#include <sstream>
+#include <stdio.h>
+#include <vector>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ generic_decoder::sptr
+ cc_decoder::make(int frame_size, int k,
+ int rate, std::vector<int> polys,
+ int start_state, int end_state,
+ cc_mode_t mode, bool padded)
+ {
+ return generic_decoder::sptr
+ (new cc_decoder_impl(frame_size, k, rate, polys,
+ start_state, end_state, mode, padded));
+ }
+
+ cc_decoder_impl::cc_decoder_impl(int frame_size, int k,
+ int rate, std::vector<int> polys,
+ int start_state, int end_state,
+ cc_mode_t mode, bool padded)
+ : generic_decoder("cc_decoder"),
+ d_k(k),
+ d_rate(rate),
+ d_partial_rate(rate),
+ d_polys(polys),
+ d_mode(mode),
+ d_padding(0),
+ d_start_state_chaining(start_state),
+ d_start_state_nonchaining(start_state),
+ d_end_state_nonchaining(end_state)
+ {
+ // Set max frame size here; all buffers and settings will be
+ // based on this value.
+ d_max_frame_size = frame_size;
+ d_frame_size = frame_size;
+
+ // set up a padding factor. If padding, the encoded frame was exteded
+ // by this many bits to fit into a full byte.
+ if(padded && (mode == CC_TERMINATED)) {
+ d_padding = static_cast<int>(8.0f*ceilf(d_rate*(d_k-1)/8.0f) - (d_rate*(d_k-1)));
+ }
+
+ d_vp = new struct v;
+
+ d_numstates = 1 << (d_k - 1);
+
+ d_decision_t_size = d_numstates/8; //packed bit array
+
+ d_managed_in_size = 0;
+ switch(d_mode) {
+ case(CC_TAILBITING):
+ d_end_state = &d_end_state_chaining;
+ d_veclen = d_frame_size + (6 * (d_k - 1));
+ d_managed_in = (unsigned char*)volk_malloc(d_veclen*d_rate*sizeof(unsigned char),
+ volk_get_alignment());
+ d_managed_in_size = d_veclen * d_rate;
+ if(d_managed_in == NULL) {
+ throw std::runtime_error("cc_decoder: bad alloc for d_managed_in\n");
+ }
+ break;
+
+ case(CC_TRUNCATED):
+ d_veclen = d_frame_size;
+ d_end_state = &d_end_state_chaining;
+ break;
+
+ case(CC_TERMINATED):
+ d_veclen = d_frame_size + d_k - 1;
+ d_end_state = (end_state == -1) ? &d_end_state_chaining : &d_end_state_nonchaining;
+ break;
+
+ case(CC_STREAMING):
+ d_veclen = d_frame_size + d_k - 1;
+ d_end_state = &d_end_state_chaining;
+ break;
+
+ default:
+ throw std::runtime_error("cc_decoder: mode not recognized");
+ }
+
+ d_vp->metrics = (unsigned char*)volk_malloc(2*sizeof(unsigned char)*d_numstates,
+ volk_get_alignment());
+ if(d_vp->metrics == NULL) {
+ throw std::runtime_error("bad alloc for d_vp->metrics!\n");
+ }
+
+ d_vp->metrics1.t = d_vp->metrics;
+ d_vp->metrics2.t = d_vp->metrics + d_numstates;
+
+ d_vp->decisions = (unsigned char*)volk_malloc(sizeof(unsigned char)*d_veclen*d_decision_t_size,
+ volk_get_alignment());
+ if(d_vp->decisions == NULL) {
+ throw std::runtime_error("bad alloc for d_vp->decisions!\n");
+ }
+
+ Branchtab = (unsigned char*)volk_malloc(sizeof(unsigned char)*d_numstates/2*rate,
+ volk_get_alignment());
+ if(Branchtab == NULL) {
+ throw std::runtime_error("bad alloc for d_vp->decisions!\n");
+ }
+
+ create_viterbi();
+
+ if(d_k-1<8) {
+ d_ADDSHIFT = (8-(d_k-1));
+ d_SUBSHIFT = 0;
+ }
+ else if(d_k-1>8) {
+ d_ADDSHIFT = 0;
+ d_SUBSHIFT = ((d_k-1)-8);
+ }
+ else {
+ d_ADDSHIFT = 0;
+ d_SUBSHIFT = 0;
+ }
+
+ yp_kernel = boost::assign::map_list_of("k=7r=2", volk_8u_x4_conv_k7_r2_8u);
+
+ std::string k_ = "k=";
+ std::string r_ = "r=";
+
+ std::ostringstream kerneltype;
+ kerneltype << k_ << d_k << r_ << d_rate;
+
+ d_kernel = yp_kernel[kerneltype.str()];
+ }
+
+ cc_decoder_impl::~cc_decoder_impl()
+ {
+ volk_free(d_vp->decisions);
+ volk_free(Branchtab);
+ volk_free(d_vp->metrics);
+
+ delete d_vp;
+
+ if(d_mode == CC_TAILBITING) {
+ volk_free(d_managed_in);
+ }
+ }
+
+ int
+ cc_decoder_impl::get_output_size()
+ {
+ //unpacked bits
+ return d_frame_size;
+ }
+
+ int
+ cc_decoder_impl::get_input_size()
+ {
+ if(d_mode == CC_TERMINATED) {
+ return d_rate * (d_frame_size + d_k - 1) + d_padding;
+ }
+ else {
+ return d_rate * d_frame_size;
+ }
+ }
+
+ int
+ cc_decoder_impl::get_input_item_size()
+ {
+ return 1;
+ }
+
+ int
+ cc_decoder_impl::get_history()
+ {
+ if(d_mode == CC_STREAMING) {
+ return d_rate * (d_k - 1);
+ }
+ else {
+ return 0;
+ }
+ }
+
+ float
+ cc_decoder_impl::get_shift()
+ {
+ return 128.0;
+ }
+
+ const char*
+ cc_decoder_impl::get_input_conversion()
+ {
+ return "uchar";
+ }
+
+ void
+ cc_decoder_impl::create_viterbi()
+ {
+ int state;
+ unsigned int i;
+ partab_init();
+ for(state = 0; state < d_numstates/2; state++) {
+ for(i = 0; i < d_rate; i++) {
+ Branchtab[i*d_numstates/2+state] = (d_polys[i] < 0) ^ parity((2*state) & abs(d_polys[i])) ? 255 : 0;
+ }
+ }
+
+ switch(d_mode) {
+ case(CC_STREAMING):
+ d_start_state = &d_start_state_chaining;
+ init_viterbi_unbiased(d_vp);
+ break;
+
+ case(CC_TAILBITING):
+ d_start_state = &d_start_state_nonchaining;
+ init_viterbi_unbiased(d_vp);
+ break;
+
+ case(CC_TRUNCATED):
+ case(CC_TERMINATED):
+ d_start_state = &d_start_state_nonchaining;
+ init_viterbi(d_vp, *d_start_state);
+ break;
+
+ default:
+ throw std::runtime_error("cc_decoder: mode not recognized");
+ }
+
+ return;
+ }
+
+ int
+ cc_decoder_impl::parity(int x)
+ {
+ x ^= (x >> 16);
+ x ^= (x >> 8);
+ return parityb(x);
+ }
+
+ int
+ cc_decoder_impl::parityb(unsigned char x)
+ {
+ return Partab[x];
+ }
+
+ void
+ cc_decoder_impl::partab_init(void)
+ {
+ int i,cnt,ti;
+
+ /* Initialize parity lookup table */
+ for(i=0;i<256;i++){
+ cnt = 0;
+ ti = i;
+ while(ti){
+ if(ti & 1)
+ cnt++;
+ ti >>= 1;
+ }
+ Partab[i] = cnt & 1;
+ }
+ }
+
+ int
+ cc_decoder_impl::init_viterbi(struct v* vp, int starting_state)
+ {
+ int i;
+
+ if(vp == NULL)
+ return -1;
+ for(i = 0; i < d_numstates; i++) {
+ vp->metrics1.t[i] = 63;
+ }
+
+ vp->old_metrics = vp->metrics1;
+ vp->new_metrics = vp->metrics2;
+ vp->old_metrics.t[starting_state & (d_numstates-1)] = 0; /* Bias known start state */
+ return 0;
+ }
+
+ int
+ cc_decoder_impl::init_viterbi_unbiased(struct v* vp)
+ {
+ int i;
+
+ if(vp == NULL)
+ return -1;
+ for(i=0;i<d_numstates;i++)
+ vp->metrics1.t[i] = 31;
+
+ vp->old_metrics = vp->metrics1;
+ vp->new_metrics = vp->metrics2;
+ //no bias step
+ return 0;
+ }
+
+ int
+ cc_decoder_impl::find_endstate()
+ {
+ unsigned char* met = ((d_k + d_veclen)%2 == 0)? d_vp->new_metrics.t : d_vp->old_metrics.t;
+
+ unsigned char min = met[0];
+ int state = 0;
+ for(int i = 1; i < d_numstates; ++i) {
+ if(met[i] < min) {
+ min = met[i];
+ state = i;
+ }
+
+
+ }
+ //printf("min %d\n", state);
+ return state;
+ }
+
+ int
+ cc_decoder_impl::update_viterbi_blk(unsigned char* syms, int nbits)
+ {
+ unsigned char *d;
+
+ d = d_vp->decisions;
+
+ memset(d,0,d_decision_t_size * nbits);
+
+ d_kernel(d_vp->new_metrics.t, d_vp->old_metrics.t, syms,
+ d, nbits - (d_k - 1), d_k - 1, Branchtab);
+
+ return 0;
+ }
+
+ int
+ cc_decoder_impl::chainback_viterbi(unsigned char* data,
+ unsigned int nbits,
+ unsigned int endstate,
+ unsigned int tailsize)
+ {
+ unsigned char *d;
+
+ /* ADDSHIFT and SUBSHIFT make sure that the thing returned is a byte. */
+ d = d_vp->decisions;
+ /* Make room beyond the end of the encoder register so we can
+ * accumulate a full byte of decoded data
+ */
+
+ endstate = (endstate%d_numstates) << d_ADDSHIFT;
+
+ /* The store into data[] only needs to be done every 8 bits.
+ * But this avoids a conditional branch, and the writes will
+ * combine in the cache anyway
+ */
+
+ d += tailsize * d_decision_t_size ; /* Look past tail */
+ int retval;
+ int dif = tailsize - (d_k - 1);
+ decision_t dec;
+ while(nbits-- > d_frame_size - (d_k - 1)) {
+ int k;
+ dec.t = &d[nbits * d_decision_t_size];
+ k = (dec.w[(endstate>>d_ADDSHIFT)/32] >> ((endstate>>d_ADDSHIFT)%32)) & 1;
+
+ endstate = (endstate >> 1) | (k << (d_k-2+d_ADDSHIFT));
+ data[((nbits+dif)%d_frame_size)] = k;
+
+ retval = endstate;
+ }
+ nbits += 1;
+
+ while(nbits-- != 0) {
+ int k;
+
+ dec.t = &d[nbits * d_decision_t_size];
+
+ k = (dec.w[(endstate>>d_ADDSHIFT)/32] >> ((endstate>>d_ADDSHIFT)%32)) & 1;
+
+ endstate = (endstate >> 1) | (k << (d_k-2+d_ADDSHIFT));
+ data[((nbits+dif)%d_frame_size)] = k;
+ }
+
+ return retval >> d_ADDSHIFT;
+ }
+
+ bool
+ cc_decoder_impl::set_frame_size(unsigned int frame_size)
+ {
+ bool ret = true;
+ if(frame_size > d_max_frame_size) {
+ GR_LOG_INFO(d_logger, boost::format("cc_decoder: tried to set frame to %1%; max possible is %2%") \
+ % frame_size % d_max_frame_size);
+ frame_size = d_max_frame_size;
+ ret = false;
+ }
+
+ d_frame_size = frame_size;
+
+ switch(d_mode) {
+ case(CC_TAILBITING):
+ d_veclen = d_frame_size + (6 * (d_k - 1));
+ if(d_veclen * d_rate > d_managed_in_size) {
+ throw std::runtime_error("cc_decoder: attempt to resize beyond d_managed_in buffer size!\n");
+ }
+ break;
+
+ case(CC_TRUNCATED):
+ d_veclen = d_frame_size;
+ break;
+
+ case(CC_STREAMING):
+ d_veclen = d_frame_size + d_k - 1;
+ break;
+
+ case(CC_TERMINATED):
+ // If the input is being padded out to a byte, we know the
+ // real frame size is without the padding.
+ d_frame_size -= d_padding * d_rate;
+ d_veclen = d_frame_size + d_k - 1;
+ break;
+
+ default:
+ throw std::runtime_error("cc_decoder: mode not recognized");
+ }
+
+ return ret;
+ }
+
+ double
+ cc_decoder_impl::rate()
+ {
+ return 1.0/static_cast<double>(d_rate);
+ }
+
+ void
+ cc_decoder_impl::generic_work(void *inbuffer, void *outbuffer)
+ {
+ const unsigned char *in = (const unsigned char *) inbuffer;
+ unsigned char *out = (unsigned char *) outbuffer;
+
+ switch(d_mode) {
+
+ case(CC_TAILBITING):
+ memcpy(d_managed_in, in, d_frame_size * d_rate * sizeof(unsigned char));
+ memcpy(d_managed_in + d_frame_size * d_rate * sizeof(unsigned char), in,
+ (d_veclen - d_frame_size) * d_rate * sizeof(unsigned char));
+ update_viterbi_blk(d_managed_in, d_veclen);
+ d_end_state_chaining = find_endstate();
+ chainback_viterbi(&out[0], d_frame_size, *d_end_state, d_veclen - d_frame_size);
+ init_viterbi_unbiased(d_vp);
+ break;
+
+
+ case(CC_TRUNCATED):
+ update_viterbi_blk((unsigned char*)(&in[0]), d_veclen);
+ d_end_state_chaining = find_endstate();
+ for(unsigned int i = 0; i < d_k-1; ++i) {
+ out[d_veclen - 1 - i] = ((*d_end_state) >> i) & 1;
+ }
+ d_start_state_chaining = chainback_viterbi(&out[0], d_frame_size - (d_k - 1),
+ *d_end_state, d_k - 1);
+ init_viterbi(d_vp, *d_start_state);
+ break;
+
+ case(CC_STREAMING):
+ case(CC_TERMINATED):
+ update_viterbi_blk((unsigned char*)(&in[0]), d_veclen);
+ d_end_state_chaining = find_endstate();
+ d_start_state_chaining = chainback_viterbi(&out[0], d_frame_size, *d_end_state,
+ d_veclen - d_frame_size);
+
+ init_viterbi(d_vp, *d_start_state);
+ break;
+
+ default:
+ throw std::runtime_error("cc_decoder: mode not recognized");
+ }
+ }
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/cc_decoder_impl.h b/gr-fec/lib/cc_decoder_impl.h
new file mode 100644
index 0000000000..33ced0250c
--- /dev/null
+++ b/gr-fec/lib/cc_decoder_impl.h
@@ -0,0 +1,106 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CC_DECODER_IMPL_H
+#define INCLUDED_FEC_CC_DECODER_IMPL_H
+
+#include <map>
+#include <string>
+#include <gnuradio/fec/cc_decoder.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ class FEC_API cc_decoder_impl : public cc_decoder
+ {
+ private:
+ //plug into the generic fec api
+ int get_output_size();
+ int get_input_size();
+ int get_history();
+ float get_shift();
+ int get_input_item_size();
+ const char* get_input_conversion();
+ //const char* get_output_conversion();
+
+ //everything else...
+ void create_viterbi();
+ int init_viterbi(struct v* vp, int starting_state);
+ int init_viterbi_unbiased(struct v* vp);
+ int update_viterbi_blk(unsigned char* syms, int nbits);
+ int chainback_viterbi(unsigned char* data, unsigned int nbits,
+ unsigned int endstate, unsigned int tailsize);
+ int find_endstate();
+ int tester[12];
+
+ unsigned char *Branchtab;
+ unsigned char Partab[256];
+
+
+ int d_ADDSHIFT;
+ int d_SUBSHIFT;
+ conv_kernel d_kernel;
+ unsigned int d_max_frame_size;
+ unsigned int d_frame_size;
+ unsigned int d_k;
+ unsigned int d_rate;
+ unsigned int d_partial_rate;
+ std::vector<int> d_polys;
+ cc_mode_t d_mode;
+ int d_padding;
+
+ struct v* d_vp;
+ unsigned char* d_managed_in;
+ unsigned int d_managed_in_size;
+ int d_numstates;
+ int d_decision_t_size;
+ int *d_start_state;
+ int d_start_state_chaining;
+ int d_start_state_nonchaining;
+ int *d_end_state;
+ int d_end_state_chaining;
+ int d_end_state_nonchaining;
+ unsigned int d_veclen;
+
+ int parity(int x);
+ int parityb(unsigned char x);
+ void partab_init(void);
+ std::map<std::string, conv_kernel> yp_kernel;
+
+ public:
+ cc_decoder_impl(int frame_size, int k,
+ int rate, std::vector<int> polys,
+ int start_state = 0, int end_state = -1,
+ cc_mode_t mode=CC_STREAMING, bool padded=false);
+ ~cc_decoder_impl();
+
+ void generic_work(void *inbuffer, void *outbuffer);
+ bool set_frame_size(unsigned int frame_size);
+ double rate();
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CC_DECODER_IMPL_H */
diff --git a/gr-fec/lib/cc_encoder_impl.cc b/gr-fec/lib/cc_encoder_impl.cc
new file mode 100644
index 0000000000..75d7dcd66b
--- /dev/null
+++ b/gr-fec/lib/cc_encoder_impl.cc
@@ -0,0 +1,204 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "cc_encoder_impl.h"
+#include <math.h>
+#include <boost/assign/list_of.hpp>
+#include <volk/volk_typedefs.h>
+#include <volk/volk.h>
+#include <sstream>
+#include <stdio.h>
+#include <vector>
+#include <gnuradio/fec/generic_encoder.h>
+#include <gnuradio/fec/cc_common.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ generic_encoder::sptr
+ cc_encoder::make(int frame_size, int k, int rate,
+ std::vector<int> polys, int start_state,
+ cc_mode_t mode, bool padded)
+ {
+ return generic_encoder::sptr
+ (new cc_encoder_impl(frame_size, k, rate,
+ polys, start_state,
+ mode, padded));
+ }
+
+ cc_encoder_impl::cc_encoder_impl(int frame_size, int k, int rate,
+ std::vector<int> polys, int start_state,
+ cc_mode_t mode, bool padded)
+ : generic_encoder("cc_encoder"),
+ d_rate(rate), d_k(k), d_polys(polys),
+ d_start_state(start_state),
+ d_mode(mode), d_padding(0)
+ {
+ if(static_cast<size_t>(d_rate) != d_polys.size()) {
+ throw std::runtime_error("cc_encoder: Number of polynomials must be the same as the value of rate");
+ }
+
+ partab_init();
+
+ // set up a padding factor. If padding, extends the encoding
+ // by this many bits to fit into a full byte.
+ if(padded && (mode == CC_TERMINATED)) {
+ d_padding = static_cast<int>(8.0f*ceilf(d_rate*(d_k-1)/8.0f) - (d_rate*(d_k-1)));
+ }
+
+ d_max_frame_size = frame_size;
+ set_frame_size(frame_size);
+ }
+
+ cc_encoder_impl::~cc_encoder_impl()
+ {
+ }
+
+ int
+ cc_encoder_impl::get_output_size()
+ {
+ return d_output_size;
+ }
+
+ int
+ cc_encoder_impl::get_input_size()
+ {
+ return d_frame_size;
+ }
+
+ bool
+ cc_encoder_impl::set_frame_size(unsigned int frame_size)
+ {
+ bool ret = true;
+ if(frame_size > d_max_frame_size) {
+ GR_LOG_INFO(d_logger, boost::format("tried to set frame to %1%; max possible is %2%") \
+ % frame_size % d_max_frame_size);
+ frame_size = d_max_frame_size;
+ ret = false;
+ }
+
+ d_frame_size = frame_size;
+
+ if(d_mode == CC_TERMINATED) {
+ d_output_size = d_rate * (d_frame_size + d_k - 1) + d_padding;
+ }
+ /*
+ else if(d_trunc_intrinsic) {
+ int cnt = 0;
+ for(int i = 0; i < d_rate; ++i) {
+ if (d_polys[i] != 1) {
+ cnt++;
+ }
+ }
+ d_output_size = (d_rate * (d_frame_size)) + (cnt * (d_k - 1));
+ }
+ */
+ else {
+ d_output_size = d_rate * d_frame_size;
+ }
+
+ return ret;
+ }
+
+ double
+ cc_encoder_impl::rate()
+ {
+ return static_cast<double>(d_rate);
+ }
+
+ int
+ cc_encoder_impl::parity(int x)
+ {
+ x ^= (x >> 16);
+ x ^= (x >> 8);
+ return parityb(x);
+ }
+
+ int
+ cc_encoder_impl::parityb(unsigned char x)
+ {
+ return Partab[x];
+ }
+
+ void
+ cc_encoder_impl::partab_init(void)
+ {
+ int i,cnt,ti;
+
+ /* Initialize parity lookup table */
+ for(i=0;i<256;i++){
+ cnt = 0;
+ ti = i;
+ while(ti){
+ if(ti & 1)
+ cnt++;
+ ti >>= 1;
+ }
+ Partab[i] = cnt & 1;
+ }
+ }
+
+ void
+ cc_encoder_impl::generic_work(void *in_buffer, void *out_buffer)
+ {
+ const unsigned char *in = (const unsigned char *) in_buffer;
+ unsigned char *out = (unsigned char *) out_buffer;
+
+ unsigned char my_state = d_start_state;
+
+ if(d_mode == CC_TAILBITING) {
+ for(unsigned int i = 0; i < d_k - 1; ++i) {
+ my_state = (my_state << 1) | (in[d_frame_size - (d_k - 1) + i] & 1);
+ }
+ }
+
+ for(unsigned int i = 0; i < d_frame_size; ++i) {
+ my_state = (my_state << 1) | (in[i] & 1);
+ for(unsigned int j = 0; j < d_rate; ++j) {
+ out[i * d_rate + j] = parity(my_state & d_polys[j]) == 0 ? 0 : 1;
+ }
+ }
+
+ if(d_mode == CC_TERMINATED) {
+ for(unsigned int i = 0; i < d_k - 1; ++i) {
+ my_state = (my_state << 1) | ((d_start_state >> (d_k - 2 - i)) & 1);
+ for(unsigned int j = 0; j < d_rate; ++j) {
+ out[(i + d_frame_size) * d_rate + j] = parity(my_state & d_polys[j]) == 0 ? 0 : 1;
+ }
+ }
+ }
+
+ if(d_mode == CC_TRUNCATED) {
+ my_state = d_start_state;
+ }
+
+ d_start_state = my_state;
+ }
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/cc_encoder_impl.h b/gr-fec/lib/cc_encoder_impl.h
new file mode 100644
index 0000000000..77d5f42462
--- /dev/null
+++ b/gr-fec/lib/cc_encoder_impl.h
@@ -0,0 +1,75 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+p * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CC_ENCODER_IMPL_H
+#define INCLUDED_FEC_CC_ENCODER_IMPL_H
+
+#include <map>
+#include <string>
+#include <gnuradio/fec/cc_encoder.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ class FEC_API cc_encoder_impl : public cc_encoder
+ {
+ private:
+ //plug into the generic fec api
+ void generic_work(void *inbuffer, void *outbuffer);
+ int get_output_size();
+ int get_input_size();
+
+ //everything else...
+ unsigned char Partab[256];
+ unsigned int d_frame_size;
+ unsigned int d_max_frame_size;
+ unsigned int d_rate;
+ unsigned int d_k;
+ std::vector<int> d_polys;
+ struct v* d_vp;
+ int d_numstates;
+ int d_decision_t_size;
+ int d_start_state;
+ cc_mode_t d_mode;
+ int d_padding;
+ int d_output_size;
+
+ int parity(int x);
+ int parityb(unsigned char x);
+ void partab_init(void);
+
+ public:
+ cc_encoder_impl(int frame_size, int k, int rate,
+ std::vector<int> polys, int start_state = 0,
+ cc_mode_t mode=CC_STREAMING, bool padded=false);
+ ~cc_encoder_impl();
+
+ bool set_frame_size(unsigned int frame_size);
+ double rate();
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CC_ENCODER_IMPL_H */
diff --git a/gr-fec/lib/ccsds_encoder_impl.cc b/gr-fec/lib/ccsds_encoder_impl.cc
new file mode 100644
index 0000000000..2a2228a8ed
--- /dev/null
+++ b/gr-fec/lib/ccsds_encoder_impl.cc
@@ -0,0 +1,152 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ccsds_encoder_impl.h"
+#include <gnuradio/fec/generic_encoder.h>
+#include <cstdio>
+
+extern "C" {
+#include <gnuradio/fec/viterbi.h>
+}
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ generic_encoder::sptr
+ ccsds_encoder::make(int frame_size, int start_state,
+ cc_mode_t mode)
+ {
+ return generic_encoder::sptr
+ (new ccsds_encoder_impl(frame_size, start_state, mode));
+ }
+
+ ccsds_encoder_impl::ccsds_encoder_impl(int frame_size, int start_state,
+ cc_mode_t mode)
+ : generic_encoder("ccsds_encoder"),
+ d_start_state(static_cast<unsigned char>(start_state)),
+ d_mode(mode)
+ {
+ d_max_frame_size = frame_size;
+ set_frame_size(frame_size);
+ }
+
+ ccsds_encoder_impl::~ccsds_encoder_impl()
+ {
+ }
+
+ int
+ ccsds_encoder_impl::get_output_size()
+ {
+ return d_output_size;
+ }
+
+ int
+ ccsds_encoder_impl::get_input_size()
+ {
+ return d_frame_size/8; // packed byte input
+ }
+
+ const char*
+ ccsds_encoder_impl::get_input_conversion()
+ {
+ // Expects packed data input; tell wrapper to pack it.
+ return "pack";
+ }
+
+ bool
+ ccsds_encoder_impl::set_frame_size(unsigned int frame_size)
+ {
+ bool ret = true;
+ if(frame_size > d_max_frame_size) {
+ GR_LOG_INFO(d_logger, boost::format("tried to set frame to %1%; max possible is %2%") \
+ % frame_size % d_max_frame_size);
+ frame_size = d_max_frame_size;
+ ret = false;
+ }
+
+ d_frame_size = frame_size;
+
+ if(d_mode == CC_TERMINATED) {
+ d_output_size = 2*(d_frame_size + 7 - 1);
+ }
+ else {
+ d_output_size = 2*d_frame_size;
+ }
+
+ return ret;
+ }
+
+ double
+ ccsds_encoder_impl::rate()
+ {
+ return 0.5;
+ }
+
+ void
+ ccsds_encoder_impl::generic_work(void *in_buffer, void *out_buffer)
+ {
+ unsigned char *in = (unsigned char*) in_buffer;
+ unsigned char *out = (unsigned char*) out_buffer;
+
+ unsigned char my_state = d_start_state;
+
+ if(d_mode == CC_TAILBITING) {
+ // Grab K-1 (6) bits of data from the last input byte to add
+ // onto the from of the encoding stream for tailbiting mode.
+ unsigned char sym = in[d_frame_size/8 - 1];
+ for(unsigned int i = 0; i < 7 - 1; ++i) {
+ my_state = (my_state << 1) | ((sym >> (5 - i)) & 1);
+ }
+ }
+
+ my_state = encode(out, in, d_frame_size/8, my_state);
+
+ if(d_mode == CC_TERMINATED) {
+ // encode works on bytes, but we are only adding some number
+ // of bits to the end of the frame, so we abuse the encode
+ // function by reshifting the start state within the
+ // for-loop and only taking the last two bits out of the
+ // encoded 2-bytes.
+ unsigned char end_bits[16];
+ for(unsigned int i = 0; i < (7 - 1); ++i) {
+ my_state = (my_state << 1) | ((d_start_state >> (7 - 2 - i)) & 1);
+ encode(&end_bits[0], &my_state, 1, my_state);
+ out[(i + d_frame_size) * 2 + 0] = end_bits[14];
+ out[(i + d_frame_size) * 2 + 1] = end_bits[15];
+ }
+ }
+
+ if(d_mode == CC_TRUNCATED) {
+ my_state = d_start_state;
+ }
+
+ d_start_state = my_state;
+ }
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/ccsds_encoder_impl.h b/gr-fec/lib/ccsds_encoder_impl.h
new file mode 100644
index 0000000000..e67890b0f8
--- /dev/null
+++ b/gr-fec/lib/ccsds_encoder_impl.h
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CCSDS_ENCODER_IMPL_H
+#define INCLUDED_FEC_CCSDS_ENCODER_IMPL_H
+
+#include <map>
+#include <string>
+#include <gnuradio/fec/ccsds_encoder.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ class FEC_API ccsds_encoder_impl : public ccsds_encoder
+ {
+ private:
+ //plug into the generic fec api
+ void generic_work(void *inbuffer, void *outbuffer);
+ int get_output_size();
+ int get_input_size();
+ const char* get_input_conversion();
+
+ unsigned int d_max_frame_size;
+ unsigned int d_frame_size;
+
+ unsigned char d_start_state;
+ cc_mode_t d_mode;
+
+ int d_output_size;
+
+ public:
+ ccsds_encoder_impl(int frame_size, int start_state = 0,
+ cc_mode_t mode=CC_STREAMING);
+ ~ccsds_encoder_impl();
+
+ bool set_frame_size(unsigned int frame_size);
+ double rate();
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CCSDS_ENCODER_IMPL_H */
diff --git a/gr-fec/lib/conv_bit_corr_bb_impl.cc b/gr-fec/lib/conv_bit_corr_bb_impl.cc
new file mode 100644
index 0000000000..48de06157b
--- /dev/null
+++ b/gr-fec/lib/conv_bit_corr_bb_impl.cc
@@ -0,0 +1,258 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "conv_bit_corr_bb_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/messages/msg_passing.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ conv_bit_corr_bb::sptr
+ conv_bit_corr_bb::make(std::vector<unsigned long long> correlator,
+ int corr_sym, int corr_len, int cut,
+ int flush, float thresh)
+ {
+ return gnuradio::get_initial_sptr
+ (new conv_bit_corr_bb_impl(correlator, corr_sym, corr_len,
+ cut, flush, thresh));
+ }
+
+ conv_bit_corr_bb_impl::conv_bit_corr_bb_impl(std::vector<unsigned long long> correlator,
+ int corr_sym, int corr_len, int cut,
+ int flush, float thresh)
+ : block("conv_bit_corr_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
+ d_acquire(-1),
+ d_produce(0),
+ d_message(0),
+ d_thresh(cut * thresh),
+ d_corr_len(corr_len),
+ d_corr_sym(corr_sym),
+ d_lane(0),
+ d_op(0),
+ d_flush(flush),
+ d_flush_count(0),
+ d_cut(cut),
+ d_counter(cut),
+ d_data_garble_rate(0.0),
+ d_havelock(false)
+ //d_acquire_track(-1)
+
+// d_msgrecv_rpc(alias(), "messages_recieved", &d_msgrecv,
+// pmt::mp(0), pmt::mp(65536), pmt::mp(0),
+// "messages", "Asynch Messages Recieved",
+// RPC_PRIVLVL_MIN, DISPTIME | DISPOPTSTRIP),
+// d_msgsent_rpc(alias(), "messages_sent", &d_msgsent,
+// pmt::mp(0), pmt::mp(65536), pmt::mp(0),
+// "messages", "Asynch Messages Sent",
+// RPC_PRIVLVL_MIN, DISPTIME | DISPOPTSTRIP),
+// d_flush_rpc(alias(), "flush_constant", (int*)&d_flush,
+// pmt::mp(0), pmt::mp(1), pmt::mp(0),
+// "int", "Flush Distance",
+// RPC_PRIVLVL_MIN, DISPTIME | DISPOPTSTRIP),
+// d_cut_rpc(alias(), "integration_period", &d_cut,
+// pmt::from_uint64(0), pmt::from_uint64(65536), pmt::from_uint64(d_cut),
+// "uint64_t", "Integration Time"),
+// d_data_garble_rate_rpc(alias(), "norm_garble_rate", &d_data_garble_rate,
+// pmt::mp(0.0f), pmt::mp(0.0f), pmt::mp(1.0f),
+// "normalized_garble_rate", "Normalized Data Garble Rate",
+// RPC_PRIVLVL_MIN),
+// d_havelock_rpc(alias(), "locked", &d_havelock,
+// pmt::mp(0), pmt::mp(1), pmt::mp(0),
+// "bool","Sync Locked",
+// RPC_PRIVLVL_MIN, DISPTIME)
+ {
+ //big correlator mode (ugh)
+ std::vector<unsigned char> temp;
+ for(unsigned int k = 0; k < d_corr_sym; ++k) {
+ d_acc.push_back(0);
+ }
+ for(unsigned int i = 0; i < d_corr_len; ++i) {
+ if((correlator[i/64] >> (64 - (i%64) - 1)) & 1) {
+ temp.push_back(i);
+ }
+ }
+ d_correlator.push_back(temp);
+
+ for(unsigned int j = 0; j < d_correlator.size(); ++j) {
+ std::vector<int> temp(d_corr_sym);
+ d_score_keeper.push_back(temp);
+ }
+
+ set_history(d_corr_len + d_corr_sym);
+ d_flush_count = d_corr_len + d_corr_sym - 1;
+ set_output_multiple(d_corr_sym);
+ }
+
+ conv_bit_corr_bb_impl::~conv_bit_corr_bb_impl()
+ {
+ }
+
+ void
+ conv_bit_corr_bb_impl::catch_msg(pmt::pmt_t msg)
+ {
+ //stub code
+ d_msgrecv++;
+ }
+
+ int
+ conv_bit_corr_bb_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ if(d_flush_count > 0) {
+ int items = (ninput_items[0] > static_cast<int>(d_flush_count)) ? d_flush_count : ninput_items[0];
+ consume_each(items);
+ d_flush_count -= items;
+ return 0;
+ }
+
+ const uint8_t *in = (const uint8_t *) input_items[0];
+ uint8_t *score_in = (uint8_t *) input_items[0];
+
+ //counting on 1:1 forecast + history to provide enough ninput_items... may need to insert check
+ //printf("%d, %d, %d\n", ninput_items[0], noutput_items, d_counter);
+ int correlation_cycles = (noutput_items/output_multiple() <= static_cast<int>(d_counter)) ? \
+ noutput_items/output_multiple() : d_counter;
+
+
+ for(int p = 0; p < correlation_cycles; ++p) {
+ //reset scores
+ for(unsigned int j = 0; j < d_correlator.size(); ++j) {
+ for(unsigned int i = 0; i < d_corr_sym; ++i) {
+ d_score_keeper[j][i] = 0;
+ }
+ }
+
+ //correlate against each correlation constant
+ for(unsigned int j = 0; j < d_correlator.size(); ++j) {
+ for(unsigned int k = 0; k < d_corr_sym; ++k) {
+ for(unsigned int i = 0; i < d_correlator[j].size(); ++i) {
+ d_score_keeper[j][k] += (score_in[d_correlator[j][i] + k] >= 128) ? 1 : 0;
+ }
+ }
+
+ for(unsigned int k = 0; k < d_corr_sym; ++k) {
+ d_acc[j * (d_corr_sym) + k] += d_score_keeper[j][k] % 2;
+ }
+ }
+ score_in += d_corr_sym;
+ }
+
+ //decrement the cut counter
+
+ d_counter -= correlation_cycles;
+
+ //d_counter == 0: check the accumulator and update states
+ if(d_counter == 0) {
+ d_message = 1;
+ d_produce = 0;
+ float my_min = 1.0;
+ for(unsigned int i = 0; (i < d_correlator.size()) && (!d_produce); ++i) {
+ for(unsigned int k = 0; k < d_corr_sym; ++k) {
+
+ my_min = (d_acc[i * (d_corr_sym) + k]/(float)d_cut < my_min) ? \
+ d_acc[i * (d_corr_sym) + k]/(float)d_cut:my_min;
+
+ if(d_acc[i * (d_corr_sym) + k] < d_thresh) {
+ d_produce = 1;
+ d_message = 0;
+ d_acquire = k;
+ d_lane = i + 1;
+ d_op = 1;
+ //printf("winner: lane %u, punc_cycle %u, pos/neg corr %d\n", i, k, d_op);
+ break;
+ }
+ else if(d_acc[i * (d_corr_sym) + k] > (d_cut - d_thresh)) {
+ d_acquire = k;
+ d_lane = i + 1;
+ d_op = -1;
+ //printf("winner: lane %u, punc_cycle %u, pos/neg corr %d\n", i, k, d_op);
+ break;
+ }
+ }
+ d_data_garble_rate = 100.0 * data_garble_rate(d_correlator[i].size(), my_min);
+ d_havelock = d_data_garble_rate < 3;
+ }
+
+ //clear the accumulator, reset the counter
+ d_counter = d_cut;
+ for(unsigned int i = 0; i < d_correlator.size(); ++i) {
+ for(unsigned int k = 0; k < d_corr_sym; ++k) {
+ d_acc[i * (d_corr_sym) + k] = 0;
+ }
+ }
+
+ //examine the new states and react to environment, make a final production decision
+ if(d_message) {
+ d_msgsent++;
+ //stub code
+ d_message = 0;
+ }
+ }
+ //states are set
+
+ if(d_produce) {
+ //printf("producing\n");
+ unsigned char *out = (unsigned char *) output_items[0];
+ memcpy(out, &(in[d_acquire]), correlation_cycles*d_corr_sym*sizeof(unsigned char));
+
+ consume_each(d_corr_sym * correlation_cycles);
+ return d_corr_sym * correlation_cycles;
+ }
+
+ else {
+ consume_each(d_corr_sym * correlation_cycles);
+ return 0;
+ }
+ }
+
+ float
+ conv_bit_corr_bb_impl::data_garble_rate(int taps, float target)
+ {
+ double base,expo,answer;
+
+ if(target > 0.5)
+ target=1-target;
+
+ base=1.0-2.0*target;
+ expo=(double) 1/taps;
+ answer=0.5*(1-pow(base,expo));
+
+ if((errno==EDOM) || (errno==ERANGE)) {
+ fprintf(stderr,"Out of range errors while computing garble rate.\n");
+ exit(-1);
+ }
+ return answer;
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
+
diff --git a/gr-fec/lib/conv_bit_corr_bb_impl.h b/gr-fec/lib/conv_bit_corr_bb_impl.h
new file mode 100644
index 0000000000..509ad6f23e
--- /dev/null
+++ b/gr-fec/lib/conv_bit_corr_bb_impl.h
@@ -0,0 +1,97 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_CONV_BIT_CORR_BB_IMPL_H
+#define INCLUDED_FEC_CONV_BIT_CORR_BB_IMPL_H
+
+#include <gnuradio/fec/conv_bit_corr_bb.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API conv_bit_corr_bb_impl : public conv_bit_corr_bb
+ {
+ private:
+ std::vector< std::vector<int> > d_score_keeper;
+
+ int d_angry_fop;
+ int d_acquire;
+ //int d_acquire_track;
+ unsigned int d_produce;
+ unsigned int d_message;
+ unsigned int d_thresh;
+ unsigned int d_corr_len;
+ unsigned int d_corr_sym;
+ unsigned int d_lane;
+ unsigned int d_op;
+ unsigned int d_flush;
+ unsigned int d_flush_count;
+ std::vector< std::vector<unsigned char> > d_correlator;
+ std::vector<unsigned int> d_acc;
+ uint64_t d_cut;
+ uint64_t d_counter;
+ float d_data_garble_rate;
+
+ void alert_fops();
+
+// //rpcbasic_register_get<conv_bit_corr_bb, std::vector< int> > d_correlator_rpc;
+// rpcbasic_register_variable_rw<uint64_t> d_cut_rpc; // integration period
+// rpcbasic_register_variable_rw<int> d_flush_rpc; // time to flush
+// rpcbasic_register_variable<uint64_t> d_msgsent_rpc;
+// rpcbasic_register_variable<uint64_t> d_msgrecv_rpc;
+// rpcbasic_register_variable<float> d_data_garble_rate_rpc;
+
+ uint64_t d_msgsent,d_msgrecv;
+ std::vector<int> get_corr()
+ {
+ std::vector<int> bits;
+ if(d_correlator.size() < 1) {
+ return bits;
+ }
+ for(size_t i = 0; i < d_correlator[0].size(); i++) {
+ bits.push_back(d_correlator[0][i]);
+ }
+ return bits;
+ }
+
+ bool d_havelock;
+ //rpcbasic_register_variable<bool> d_havelock_rpc;
+
+ public:
+ conv_bit_corr_bb_impl(std::vector<unsigned long long> correlator,
+ int corr_sym, int corr_len, int cut,
+ int flush, float thresh);
+ ~conv_bit_corr_bb_impl();
+
+ void catch_msg(pmt::pmt_t msg);
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+
+ float data_garble_rate(int taps, float target);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_CONV_BIT_CORR_BB_IMPL_H */
diff --git a/gr-fec/lib/decode_ccsds_27_fb_impl.cc b/gr-fec/lib/decode_ccsds_27_fb_impl.cc
index 1058e67296..9b782b7098 100644
--- a/gr-fec/lib/decode_ccsds_27_fb_impl.cc
+++ b/gr-fec/lib/decode_ccsds_27_fb_impl.cc
@@ -37,9 +37,9 @@ namespace gr {
decode_ccsds_27_fb_impl::decode_ccsds_27_fb_impl()
: sync_decimator("decode_ccsds_27_fb",
- io_signature::make (1, 1, sizeof(float)),
- io_signature::make (1, 1, sizeof(char)),
- 2*8), d_count(0) // Rate 1/2 code, unpacked to packed conversion
+ io_signature::make (1, 1, sizeof(float)),
+ io_signature::make (1, 1, sizeof(char)),
+ 2*8), d_count(0) // Rate 1/2 code, unpacked to packed conversion
{
float RATE = 0.5;
float ebn0 = 12.0;
@@ -55,20 +55,20 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- const float *in = (const float *)input_items[0];
- unsigned char *out = (unsigned char *)output_items[0];
+ const float *in = (const float*)input_items[0];
+ unsigned char *out = (unsigned char*)output_items[0];
for (int i = 0; i < noutput_items*16; i++) {
// Translate and clip [-1.0..1.0] to [28..228]
float sample = in[i]*100.0+128.0;
- if (sample > 255.0)
+ if(sample > 255.0)
sample = 255.0;
- else if (sample < 0.0)
+ else if(sample < 0.0)
sample = 0.0;
unsigned char sym = (unsigned char)(floor(sample));
d_viterbi_in[d_count % 4] = sym;
- if ((d_count % 4) == 3) {
+ if((d_count % 4) == 3) {
// Every fourth symbol, perform butterfly operation
viterbi_butterfly2(d_viterbi_in, d_mettab, d_state0, d_state1);
diff --git a/gr-fec/lib/decoder_impl.cc b/gr-fec/lib/decoder_impl.cc
new file mode 100644
index 0000000000..ba8a7d000e
--- /dev/null
+++ b/gr-fec/lib/decoder_impl.cc
@@ -0,0 +1,120 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "decoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ decoder::sptr
+ decoder::make(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size)
+ {
+ return gnuradio::get_initial_sptr
+ ( new decoder_impl(my_decoder, input_item_size, output_item_size));
+ }
+
+ decoder_impl::decoder_impl(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size)
+ : block("fec_decoder",
+ io_signature::make(1, 1, input_item_size),
+ io_signature::make(1, 1, output_item_size)),
+ d_input_item_size(input_item_size), d_output_item_size(output_item_size)
+ {
+ set_fixed_rate(true);
+ set_relative_rate((double)(my_decoder->get_output_size())/my_decoder->get_input_size());
+
+ //want to guarantee you have enough to run at least one time...
+ //remember! this is not a sync block... set_output_multiple does not
+ //actually guarantee the output multiple... it DOES guarantee how many
+ //outputs (hence inputs) are made available... this is WEIRD to do in
+ //GNU Radio, and the algorithm is sensitive to this value
+ set_output_multiple(my_decoder->get_output_size() + (my_decoder->get_history()));
+ d_decoder = my_decoder;
+ }
+
+ int
+ decoder_impl::fixed_rate_ninput_to_noutput(int ninput)
+ {
+ return (int)(0.5 + ninput*relative_rate());
+ }
+
+ int
+ decoder_impl::fixed_rate_noutput_to_ninput(int noutput)
+ {
+ return (int)(0.5 + noutput/relative_rate());
+ }
+
+ void
+ decoder_impl::forecast(int noutput_items,
+ gr_vector_int& ninput_items_required)
+ {
+ ninput_items_required[0] = 0.5 + fixed_rate_noutput_to_ninput(noutput_items);
+ }
+
+ int
+ decoder_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const unsigned char *in = (unsigned char*)input_items[0];
+ unsigned char *out = (unsigned char *)output_items[0];
+
+ int outnum = (int)(((1.0/relative_rate()) * noutput_items) + 0.5);
+ int innum = (int)(relative_rate() * (ninput_items[0] - d_decoder->get_history()) + 0.5)/(output_multiple() - d_decoder->get_history());
+
+ int items = (outnum <= ninput_items[0] - d_decoder->get_history()) ?
+ noutput_items/(output_multiple() - d_decoder->get_history()) :
+ innum;
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("%1%, %2%, %3%") \
+ % outnum % ninput_items[0] % items);
+
+ for(int i = 0; i < items; ++i) {
+ d_decoder->generic_work((void*)(in+(i*d_decoder->get_input_size()*d_input_item_size)),
+ (void*)(out+(i*d_decoder->get_output_size()*d_output_item_size)));
+
+ add_item_tag(0, nitems_written(0) + ((i+1)*d_decoder->get_output_size()*d_output_item_size),
+ pmt::intern(d_decoder->alias()), pmt::PMT_T, pmt::intern(alias()));
+ }
+
+ int consumed = static_cast<int>(items/relative_rate()*(output_multiple() - d_decoder->get_history()) + 0.5);
+ int returned = items*(output_multiple() - d_decoder->get_history());
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("consumed %1%") % consumed);
+ GR_LOG_DEBUG(d_debug_logger, boost::format("returned %1%") % returned);
+
+ consume_each(consumed);
+ return returned;
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/decoder_impl.h b/gr-fec/lib/decoder_impl.h
new file mode 100644
index 0000000000..78b1b926b5
--- /dev/null
+++ b/gr-fec/lib/decoder_impl.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_DECODER_IMPL_H
+#define INCLUDED_FEC_DECODER_IMPL_H
+
+#include <gnuradio/fec/decoder.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API decoder_impl : public decoder
+ {
+ private:
+ generic_decoder::sptr d_decoder;
+ size_t d_input_item_size;
+ size_t d_output_item_size;
+
+ public:
+ decoder_impl(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size);
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ int fixed_rate_ninput_to_noutput(int ninput);
+ int fixed_rate_noutput_to_ninput(int noutput);
+ void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DECODER_IMPL_H */
diff --git a/gr-fec/lib/depuncture_bb_impl.cc b/gr-fec/lib/depuncture_bb_impl.cc
new file mode 100644
index 0000000000..e388120bbf
--- /dev/null
+++ b/gr-fec/lib/depuncture_bb_impl.cc
@@ -0,0 +1,153 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "depuncture_bb_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <boost/bind.hpp>
+#include <pmt/pmt.h>
+#include <string>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ depuncture_bb::sptr
+ depuncture_bb::make(int puncsize, int puncpat,
+ int delay, char symbol)
+ {
+ return gnuradio::get_initial_sptr
+ (new depuncture_bb_impl(puncsize, puncpat,
+ delay, symbol));
+ }
+
+ depuncture_bb_impl::depuncture_bb_impl(int puncsize, int puncpat,
+ int delay, char symbol)
+ : block("depuncture_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
+ d_puncsize(puncsize), d_delay(delay), d_sym(symbol)
+ {
+ // Create a mask of all 1's of puncsize length
+ int mask = 0;
+ for(int i = 0; i < d_puncsize; i++)
+ mask |= 1 << i;
+
+ // Rotate the pattern for the delay value; then mask it if there
+ // are any excess 1's in the pattern.
+ for(int i = 0; i < d_delay; ++i) {
+ puncpat = ((puncpat & 1) << (d_puncsize - 1)) + (puncpat >> 1);
+ }
+ d_puncpat = puncpat & mask;
+
+ // Calculate the number of holes in the pattern. The mask is all
+ // 1's given puncsize and puncpat is a pattern with >= puncsize
+ // 0's (masked to ensure this). The difference between the
+ // number of 1's in the mask and the puncpat is the number of
+ // holes.
+ uint32_t count_mask=0, count_pat=0;
+ volk_32u_popcnt(&count_mask, static_cast<uint32_t>(mask));
+ volk_32u_popcnt(&count_pat, static_cast<uint32_t>(d_puncpat));
+ d_puncholes = count_mask - count_pat;
+
+ set_fixed_rate(true);
+ set_relative_rate((double)d_puncsize/(d_puncsize - d_puncholes));
+ set_output_multiple(d_puncsize);
+ //set_msg_handler(boost::bind(&depuncture_bb_impl::catch_msg, this, _1));
+ }
+
+ depuncture_bb_impl::~depuncture_bb_impl()
+ {
+ }
+
+ int
+ depuncture_bb_impl::fixed_rate_ninput_to_noutput(int ninput)
+ {
+ return (int)(((d_puncsize/(double)(d_puncsize - d_puncholes)) * ninput) + .5);
+ }
+
+ int
+ depuncture_bb_impl::fixed_rate_noutput_to_ninput(int noutput)
+ {
+ return (int)((((d_puncsize - d_puncholes)/(double)(d_puncsize)) * noutput) + .5);
+ }
+
+ void
+ depuncture_bb_impl::forecast(int noutput_items,
+ gr_vector_int& ninput_items_required)
+ {
+ ninput_items_required[0] = (int)((((d_puncsize - d_puncholes)/(double)(d_puncsize)) * noutput_items) + .5);
+ }
+
+ /*
+ void depuncture_bb_impl::catch_msg(pmt::pmt_t msg)
+ {
+ long mlong = pmt::pmt_to_long(msg);
+ for(int i = 0; i < mlong; ++i) {
+ d_puncholes = (d_puncholes >> 1) | ((d_puncholes & 1) << (d_puncsize - 1));
+ }
+ }
+ */
+
+ int
+ depuncture_bb_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const uint8_t *in = (const uint8_t*)input_items[0];
+ uint8_t *out = (uint8_t*)output_items[0];
+
+ for(int i=0, k=0; i < noutput_items/output_multiple(); ++i) {
+ for(int j = 0; j < output_multiple(); ++j) {
+ out[i*output_multiple() + j] = ((d_puncpat >> (d_puncsize - 1 - j)) & 1) ? in[k++] : d_sym;
+ }
+ }
+
+ /*
+ GR_LOG_DEBUG(d_debug_logger, ">>>>>> start");
+ for(int i = 0, k=0; i < noutput_items; ++i) {
+ if((d_puncpat >> (d_puncsize - 1 - (i % d_puncsize))) & 1) {
+ GR_LOG_DEBUG(d_debug_logger, boost::format("%1%...%2%") \
+ % out[i] % in[k++]);
+ }
+ else {
+ GR_LOG_DEBUG(d_debug_logger, boost::format("snit %1%") % out[i]);
+ }
+ }
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("comp: %1%, %2%\n") \
+ % noutput_items % ninput_items[0]);
+ GR_LOG_DEBUG(d_debug_logger, boost::format("consuming %1%") \
+ % ((int)(((1.0/relative_rate()) * noutput_items) + .5)));
+ */
+
+ consume_each((int)(((1.0/relative_rate()) * noutput_items) + .5));
+ return noutput_items;
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/depuncture_bb_impl.h b/gr-fec/lib/depuncture_bb_impl.h
new file mode 100644
index 0000000000..013276d7ee
--- /dev/null
+++ b/gr-fec/lib/depuncture_bb_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_REINFLATE_BB_IMPL_H
+#define INCLUDED_FEC_REINFLATE_BB_IMPL_H
+
+#include <gnuradio/fec/depuncture_bb.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API depuncture_bb_impl : public depuncture_bb
+ {
+ private:
+ int d_puncsize;
+ int d_delay;
+ int d_puncholes;
+ int d_puncpat;
+ char d_sym;
+
+ public:
+ depuncture_bb_impl(int puncsize, int puncpat,
+ int delay=0, char symbol=127);
+ ~depuncture_bb_impl();
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ int fixed_rate_ninput_to_noutput(int ninput);
+ int fixed_rate_noutput_to_ninput(int noutput);
+ void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DEPUNCTURE_BB_IMPL_H */
diff --git a/gr-fec/lib/dummy_decoder_impl.cc b/gr-fec/lib/dummy_decoder_impl.cc
new file mode 100644
index 0000000000..5ab91d0799
--- /dev/null
+++ b/gr-fec/lib/dummy_decoder_impl.cc
@@ -0,0 +1,124 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "dummy_decoder_impl.h"
+#include <math.h>
+#include <boost/assign/list_of.hpp>
+#include <volk/volk.h>
+#include <sstream>
+#include <stdio.h>
+#include <vector>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ generic_decoder::sptr
+ dummy_decoder::make(int frame_size)
+ {
+ return generic_decoder::sptr
+ (new dummy_decoder_impl(frame_size));
+ }
+
+ dummy_decoder_impl::dummy_decoder_impl(int frame_size)
+ : generic_decoder("dummy_decoder")
+ {
+ // Set max frame size here; all buffers and settings will be
+ // based on this value.
+ d_max_frame_size = frame_size;
+ set_frame_size(frame_size);
+ }
+
+ dummy_decoder_impl::~dummy_decoder_impl()
+ {
+ }
+
+ int
+ dummy_decoder_impl::get_output_size()
+ {
+ //unpacked bits
+ return d_frame_size;
+ }
+
+ int
+ dummy_decoder_impl::get_input_size()
+ {
+ return d_frame_size;
+ }
+
+ int
+ dummy_decoder_impl::get_input_item_size()
+ {
+ return sizeof(float);
+ }
+
+ const char*
+ dummy_decoder_impl::get_input_conversion()
+ {
+ return "none";
+ }
+
+ float
+ dummy_decoder_impl::get_shift()
+ {
+ return 1;
+ }
+
+ bool
+ dummy_decoder_impl::set_frame_size(unsigned int frame_size)
+ {
+ bool ret = true;
+ if(frame_size > d_max_frame_size) {
+ GR_LOG_INFO(d_logger, boost::format("tried to set frame to %1%; max possible is %2%") \
+ % frame_size % d_max_frame_size);
+ frame_size = d_max_frame_size;
+ ret = false;
+ }
+
+ d_frame_size = frame_size;
+
+ return ret;
+ }
+
+ double
+ dummy_decoder_impl::rate()
+ {
+ return 1.0;
+ }
+
+ void
+ dummy_decoder_impl::generic_work(void *inbuffer, void *outbuffer)
+ {
+ const float *in = (const float*)inbuffer;
+ int8_t *out = (int8_t*)outbuffer;
+
+ //memcpy(out, in, d_frame_size*sizeof(char));
+ volk_32f_s32f_convert_8i(out, in, 1.0/2.0, d_frame_size);
+ }
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/dummy_decoder_impl.h b/gr-fec/lib/dummy_decoder_impl.h
new file mode 100644
index 0000000000..4685a86f14
--- /dev/null
+++ b/gr-fec/lib/dummy_decoder_impl.h
@@ -0,0 +1,61 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_DUMMY_DECODER_IMPL_H
+#define INCLUDED_FEC_DUMMY_DECODER_IMPL_H
+
+#include <map>
+#include <string>
+#include <gnuradio/fec/dummy_decoder.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ class FEC_API dummy_decoder_impl : public dummy_decoder
+ {
+ private:
+ //plug into the generic fec api
+ void generic_work(void *inbuffer, void *outbuffer);
+ int get_output_size();
+ int get_input_size();
+ int get_input_item_size();
+ float get_shift();
+ const char* get_input_conversion();
+ //const char* get_output_conversion();
+
+ unsigned int d_max_frame_size;
+ unsigned int d_frame_size;
+
+ public:
+ dummy_decoder_impl(int frame_size);
+ ~dummy_decoder_impl();
+
+ bool set_frame_size(unsigned int frame_size);
+ double rate();
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DUMMY_DECODER_IMPL_H */
diff --git a/gr-fec/lib/dummy_encoder_impl.cc b/gr-fec/lib/dummy_encoder_impl.cc
new file mode 100644
index 0000000000..188b07cef6
--- /dev/null
+++ b/gr-fec/lib/dummy_encoder_impl.cc
@@ -0,0 +1,99 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "dummy_encoder_impl.h"
+#include <gnuradio/fec/generic_encoder.h>
+#include <volk/volk.h>
+#include <sstream>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ generic_encoder::sptr
+ dummy_encoder::make(int frame_size)
+ {
+ return generic_encoder::sptr
+ (new dummy_encoder_impl(frame_size));
+ }
+
+ dummy_encoder_impl::dummy_encoder_impl(int frame_size)
+ : generic_encoder("dummy_encoder")
+ {
+ d_max_frame_size = frame_size;
+ set_frame_size(frame_size);
+ }
+
+ dummy_encoder_impl::~dummy_encoder_impl()
+ {
+ }
+
+ int
+ dummy_encoder_impl::get_output_size()
+ {
+ return d_frame_size;
+ }
+
+ int
+ dummy_encoder_impl::get_input_size()
+ {
+ return d_frame_size;
+ }
+
+ bool
+ dummy_encoder_impl::set_frame_size(unsigned int frame_size)
+ {
+ bool ret = true;
+ if(frame_size > d_max_frame_size) {
+ GR_LOG_INFO(d_logger, boost::format("tried to set frame to %1%; max possible is %2%") \
+ % frame_size % d_max_frame_size);
+ frame_size = d_max_frame_size;
+ ret = false;
+ }
+
+ d_frame_size = frame_size;
+
+ return ret;
+ }
+
+ double
+ dummy_encoder_impl::rate()
+ {
+ return 1.0;
+ }
+
+ void
+ dummy_encoder_impl::generic_work(void *inbuffer, void *outbuffer)
+ {
+ const unsigned char *in = (const unsigned char*)inbuffer;
+ unsigned char *out = (unsigned char*)outbuffer;
+
+ memcpy(out, in, d_frame_size*sizeof(char));
+ }
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/dummy_encoder_impl.h b/gr-fec/lib/dummy_encoder_impl.h
new file mode 100644
index 0000000000..7bfb1cd666
--- /dev/null
+++ b/gr-fec/lib/dummy_encoder_impl.h
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+p * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_DUMMY_ENCODER_IMPL_H
+#define INCLUDED_FEC_DUMMY_ENCODER_IMPL_H
+
+#include <map>
+#include <string>
+#include <gnuradio/fec/dummy_encoder.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ class FEC_API dummy_encoder_impl : public dummy_encoder
+ {
+ private:
+ //plug into the generic fec api
+ void generic_work(void *inbuffer, void *outbuffer);
+ int get_output_size();
+ int get_input_size();
+
+ unsigned int d_max_frame_size;
+ unsigned int d_frame_size;
+
+ public:
+ dummy_encoder_impl(int frame_size);
+ ~dummy_encoder_impl();
+
+ bool set_frame_size(unsigned int frame_size);
+ double rate();
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_DUMMY_ENCODER_IMPL_H */
diff --git a/gr-fec/lib/encoder_impl.cc b/gr-fec/lib/encoder_impl.cc
new file mode 100644
index 0000000000..399bcc41cf
--- /dev/null
+++ b/gr-fec/lib/encoder_impl.cc
@@ -0,0 +1,113 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "encoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ encoder::sptr
+ encoder::make(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size)
+ {
+ return gnuradio::get_initial_sptr
+ (new encoder_impl(my_encoder, input_item_size,
+ output_item_size));
+ }
+
+ encoder_impl::encoder_impl(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size)
+ : block("fec_encoder",
+ io_signature::make(1, 1, input_item_size),
+ io_signature::make(1, 1, output_item_size)),
+ d_input_item_size(input_item_size),
+ d_output_item_size(output_item_size)
+ {
+ set_fixed_rate(true);
+ set_relative_rate((double)my_encoder->get_output_size()/(double)my_encoder->get_input_size());
+ set_output_multiple(my_encoder->get_output_size());
+ d_encoder = my_encoder;
+
+ d_input_size = d_encoder->get_input_size()*d_input_item_size;
+ d_output_size = d_encoder->get_output_size()*d_output_item_size;
+ }
+
+ encoder_impl::~encoder_impl()
+ {
+ }
+
+ int
+ encoder_impl::fixed_rate_ninput_to_noutput(int ninput)
+ {
+ return (int)(0.5 + ninput*relative_rate());
+ }
+
+ int
+ encoder_impl::fixed_rate_noutput_to_ninput(int noutput)
+ {
+ return (int)(0.5 + noutput/relative_rate());
+ }
+
+ void
+ encoder_impl::forecast(int noutput_items,
+ gr_vector_int& ninput_items_required)
+ {
+ ninput_items_required[0] = fixed_rate_noutput_to_ninput(noutput_items);
+ }
+
+ int
+ encoder_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ char *inbuffer = (char*)input_items[0];
+ char *outbuffer = (char*)output_items[0];
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("%1%, %2%, %3%") \
+ % noutput_items % ninput_items[0] % (noutput_items/output_multiple()));
+
+
+ for(int i = 0; i < noutput_items/output_multiple(); i++) {
+ d_encoder->generic_work((void*)(inbuffer+(i*d_input_size)),
+ (void*)(outbuffer+(i*d_output_size)));
+ }
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("consuming: %1%") \
+ % (fixed_rate_noutput_to_ninput(noutput_items)));
+ GR_LOG_DEBUG(d_debug_logger, boost::format("returning: %1%") \
+ % (noutput_items));
+
+ consume_each(fixed_rate_noutput_to_ninput(noutput_items));
+ return noutput_items;
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/encoder_impl.h b/gr-fec/lib/encoder_impl.h
new file mode 100644
index 0000000000..3f325219b8
--- /dev/null
+++ b/gr-fec/lib/encoder_impl.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_ENCODER_IMPL_H
+#define INCLUDED_FEC_ENCODER_IMPL_H
+
+#include <gnuradio/fec/encoder.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API encoder_impl : public encoder
+ {
+ private:
+ generic_encoder::sptr d_encoder;
+ size_t d_input_item_size;
+ size_t d_output_item_size;
+ size_t d_input_size;
+ size_t d_output_size;
+
+ public:
+ encoder_impl(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size);
+ ~encoder_impl();
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ int fixed_rate_ninput_to_noutput(int ninput);
+ int fixed_rate_noutput_to_ninput(int noutput);
+ void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_ENCODER_IMPL_H */
diff --git a/gr-fec/lib/generic_decoder.cc b/gr-fec/lib/generic_decoder.cc
new file mode 100644
index 0000000000..aa11aa8d5e
--- /dev/null
+++ b/gr-fec/lib/generic_decoder.cc
@@ -0,0 +1,168 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/fec/generic_decoder.h>
+#include <gnuradio/prefs.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ generic_decoder::generic_decoder(std::string name)
+ {
+ d_name = name;
+ my_id = base_unique_id++;
+
+#ifdef ENABLE_GR_LOG
+#ifdef HAVE_LOG4CPP
+ prefs *p = prefs::singleton();
+ std::string config_file = p->get_string("LOG", "log_config", "");
+ std::string log_level = p->get_string("LOG", "log_level", "off");
+ std::string log_file = p->get_string("LOG", "log_file", "");
+
+ GR_CONFIG_LOGGER(config_file);
+
+ GR_LOG_GETLOGGER(LOG, "gr_log." + alias());
+ GR_LOG_SET_LEVEL(LOG, log_level);
+ if(log_file.size() > 0) {
+ if(log_file == "stdout") {
+ GR_LOG_SET_CONSOLE_APPENDER(LOG, "cout","gr::log :%p: %c{1} - %m%n");
+ }
+ else if(log_file == "stderr") {
+ GR_LOG_SET_CONSOLE_APPENDER(LOG, "cerr","gr::log :%p: %c{1} - %m%n");
+ }
+ else {
+ GR_LOG_SET_FILE_APPENDER(LOG, log_file , true,"%r :%p: %c{1} - %m%n");
+ }
+ }
+ d_logger = LOG;
+
+#endif /* HAVE_LOG4CPP */
+#else /* ENABLE_GR_LOG */
+ d_logger = NULL;
+#endif /* ENABLE_GR_LOG */
+ }
+
+ generic_decoder::~generic_decoder()
+ {
+ }
+
+ int
+ generic_decoder::get_history()
+ {
+ return 0;
+ }
+
+ float
+ generic_decoder::get_shift()
+ {
+ return 0.0;
+ }
+
+ int
+ generic_decoder::get_input_item_size()
+ {
+ return sizeof(float);
+ }
+
+ int
+ generic_decoder::get_output_item_size()
+ {
+ return sizeof(char);
+ }
+
+ const char*
+ generic_decoder::get_input_conversion()
+ {
+ return "none";
+ }
+
+ const char*
+ generic_decoder::get_output_conversion()
+ {
+ return "none";
+ }
+
+ int generic_decoder::base_unique_id = 1;
+ int
+ generic_decoder::unique_id()
+ {
+ return my_id;
+ }
+
+ /*******************************************************
+ * Static functions
+ ******************************************************/
+ int
+ get_decoder_output_size(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_output_size();
+ }
+
+ int
+ get_history(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_history();
+ }
+
+ int
+ get_decoder_input_size(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_input_size();
+ }
+
+ int
+ get_decoder_output_item_size(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_output_item_size();
+ }
+
+ int
+ get_decoder_input_item_size(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_input_item_size();
+ }
+
+ float
+ get_shift(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_shift();
+ }
+
+ const char*
+ get_decoder_input_conversion(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_input_conversion();
+ }
+
+ const char*
+ get_decoder_output_conversion(generic_decoder::sptr my_decoder)
+ {
+ return my_decoder->get_output_conversion();
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/generic_encoder.cc b/gr-fec/lib/generic_encoder.cc
new file mode 100644
index 0000000000..c5c7f04f55
--- /dev/null
+++ b/gr-fec/lib/generic_encoder.cc
@@ -0,0 +1,120 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/fec/generic_encoder.h>
+#include <gnuradio/prefs.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ generic_encoder::generic_encoder(std::string name)
+ {
+ d_name = name;
+ my_id = base_unique_id++;
+
+#ifdef ENABLE_GR_LOG
+#ifdef HAVE_LOG4CPP
+ prefs *p = prefs::singleton();
+ std::string config_file = p->get_string("LOG", "log_config", "");
+ std::string log_level = p->get_string("LOG", "log_level", "off");
+ std::string log_file = p->get_string("LOG", "log_file", "");
+
+ GR_CONFIG_LOGGER(config_file);
+
+ GR_LOG_GETLOGGER(LOG, "gr_log." + alias());
+ GR_LOG_SET_LEVEL(LOG, log_level);
+ if(log_file.size() > 0) {
+ if(log_file == "stdout") {
+ GR_LOG_SET_CONSOLE_APPENDER(LOG, "cout","gr::log :%p: %c{1} - %m%n");
+ }
+ else if(log_file == "stderr") {
+ GR_LOG_SET_CONSOLE_APPENDER(LOG, "cerr","gr::log :%p: %c{1} - %m%n");
+ }
+ else {
+ GR_LOG_SET_FILE_APPENDER(LOG, log_file , true,"%r :%p: %c{1} - %m%n");
+ }
+ }
+ d_logger = LOG;
+
+#endif /* HAVE_LOG4CPP */
+#else /* ENABLE_GR_LOG */
+ d_logger = NULL;
+#endif /* ENABLE_GR_LOG */
+ }
+
+ generic_encoder::~generic_encoder()
+ {
+ }
+
+ const char*
+ generic_encoder::get_input_conversion()
+ {
+ return "none";
+ }
+
+ const char*
+ generic_encoder::get_output_conversion()
+ {
+ return "none";
+ }
+
+ int generic_encoder::base_unique_id = 1;
+ int
+ generic_encoder::unique_id()
+ {
+ return my_id;
+ }
+
+ /*******************************************************
+ * Static functions
+ ******************************************************/
+ int
+ get_encoder_output_size(generic_encoder::sptr my_encoder)
+ {
+ return my_encoder->get_output_size();
+ }
+
+ int
+ get_encoder_input_size(generic_encoder::sptr my_encoder)
+ {
+ return my_encoder->get_input_size();
+ }
+
+ const char*
+ get_encoder_input_conversion(generic_encoder::sptr my_encoder)
+ {
+ return my_encoder->get_input_conversion();
+ }
+
+ const char*
+ get_encoder_output_conversion(generic_encoder::sptr my_encoder)
+ {
+ return my_encoder->get_output_conversion();
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/puncture_bb_impl.cc b/gr-fec/lib/puncture_bb_impl.cc
new file mode 100644
index 0000000000..63633b2748
--- /dev/null
+++ b/gr-fec/lib/puncture_bb_impl.cc
@@ -0,0 +1,153 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "puncture_bb_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <boost/bind.hpp>
+#include <pmt/pmt.h>
+#include <string>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ puncture_bb::sptr
+ puncture_bb::make(int puncsize, int puncpat, int delay)
+ {
+ return gnuradio::get_initial_sptr
+ (new puncture_bb_impl(puncsize, puncpat, delay));
+ }
+
+ puncture_bb_impl::puncture_bb_impl(int puncsize, int puncpat, int delay)
+ : block("puncture_bb",
+ io_signature::make(1, 1, sizeof(char)),
+ io_signature::make(1, 1, sizeof(char))),
+ d_puncsize(puncsize), d_delay(delay)
+ {
+ // Create a mask of all 1's of puncsize length
+ int mask = 0;
+ for(int i = 0; i < d_puncsize; i++)
+ mask |= 1 << i;
+
+ // Rotate the pattern for the delay value; then mask it if there
+ // are any excess 1's in the pattern.
+ for(int i = 0; i < d_delay; ++i) {
+ puncpat = ((puncpat & 1) << (d_puncsize - 1)) + (puncpat >> 1);
+ }
+ d_puncpat = puncpat & mask;
+
+ // Calculate the number of holes in the pattern. The mask is all
+ // 1's given puncsize and puncpat is a pattern with >= puncsize
+ // 0's (masked to ensure this). The difference between the
+ // number of 1's in the mask and the puncpat is the number of
+ // holes.
+ uint32_t count_mask=0, count_pat=0;
+ volk_32u_popcnt(&count_mask, static_cast<uint32_t>(mask));
+ volk_32u_popcnt(&count_pat, static_cast<uint32_t>(d_puncpat));
+ d_puncholes = count_mask - count_pat;
+
+ set_fixed_rate(true);
+ set_relative_rate((double)(d_puncsize - d_puncholes)/d_puncsize);
+ set_output_multiple(d_puncsize - d_puncholes);
+ //set_msg_handler(boost::bind(&puncture_bb_impl::catch_msg, this, _1));
+ }
+
+ puncture_bb_impl::~puncture_bb_impl()
+ {
+ }
+
+ int
+ puncture_bb_impl::fixed_rate_ninput_to_noutput(int ninput)
+ {
+ return (int)((((d_puncsize - d_puncholes)/(double)(d_puncsize)) * ninput) + .5);
+ }
+
+ int
+ puncture_bb_impl::fixed_rate_noutput_to_ninput(int noutput)
+ {
+ return (int)(((d_puncsize/(double)(d_puncsize-d_puncholes)) * noutput) + .5);
+ }
+
+ void
+ puncture_bb_impl::forecast(int noutput_items,
+ gr_vector_int& ninput_items_required)
+ {
+ ninput_items_required[0] = (int)(((d_puncsize/(double)(d_puncsize-d_puncholes)) * noutput_items) + .5);
+ }
+
+ /*
+ void
+ puncture_bb_impl::catch_msg(pmt::pmt_t msg)
+ {
+ long mlong = pmt::pmt_to_long(msg);
+ for(int i = 0; i < mlong; ++i) {
+ d_puncholes = (d_puncholes >> 1) | ((d_puncholes & 1) << (d_puncsize - 1));
+ }
+ }
+ */
+
+ int
+ puncture_bb_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const char *in = (const char *)input_items[0];
+ char *out = (char *)output_items[0];
+
+ for(int i=0, k=0; i < noutput_items/output_multiple(); ++i) {
+ for(int j = 0; j < d_puncsize; ++j) {
+ if((d_puncpat >> (d_puncsize - 1 - j)) & 1) {
+ out[k++] = in[i*d_puncsize + j];
+ }
+ }
+ }
+
+ /*
+ GR_LOG_DEBUG(d_debug_logger, ">>>>>> start");
+ for(int i = 0, k=0; i < noutput_items; ++i) {
+ if((d_puncpat >> (d_puncsize - 1 - (i % d_puncsize))) & 1) {
+ GR_LOG_DEBUG(d_debug_logger, boost::format("%1%...%2%") \
+ % out[k++] % in[i]);
+ }
+ else {
+ GR_LOG_DEBUG(d_debug_logger, boost::format("snit %1%") % in[i]);
+ }
+ }
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("comp: %1%, %2%\n") \
+ % noutput_items % ninput_items[0]);
+ GR_LOG_DEBUG(d_debug_logger, boost::format("consuming %1%") \
+ % ((int)(((1.0/relative_rate()) * noutput_items) + .5)));
+ */
+
+ consume_each((int)(((1.0/relative_rate()) * noutput_items) + .5));
+ return noutput_items;
+ }
+
+ } /* namespace fec */
+}/* namespace gr */
diff --git a/gr-fec/lib/puncture_bb_impl.h b/gr-fec/lib/puncture_bb_impl.h
new file mode 100644
index 0000000000..abf9c09dc1
--- /dev/null
+++ b/gr-fec/lib/puncture_bb_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_PUNCTURE_BB_IMPL_H
+#define INCLUDED_FEC_PUNCTURE_BB_IMPL_H
+
+#include <gnuradio/fec/puncture_bb.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API puncture_bb_impl : public puncture_bb
+ {
+ private:
+ int d_puncsize;
+ int d_delay;
+ int d_puncholes;
+ int d_puncpat;
+
+ public:
+ puncture_bb_impl(int puncsize, int puncpat, int delay=0);
+ ~puncture_bb_impl();
+
+ //void catch_msg(pmt::pmt_t msg);
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ int fixed_rate_ninput_to_noutput(int ninput);
+ int fixed_rate_noutput_to_ninput(int noutput);
+ void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_PUNCTURE_BB_IMPL_H */
diff --git a/gr-fec/lib/puncture_ff_impl.cc b/gr-fec/lib/puncture_ff_impl.cc
new file mode 100644
index 0000000000..9a7c8f6dc2
--- /dev/null
+++ b/gr-fec/lib/puncture_ff_impl.cc
@@ -0,0 +1,153 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "puncture_ff_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <boost/bind.hpp>
+#include <pmt/pmt.h>
+#include <string>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ puncture_ff::sptr
+ puncture_ff::make(int puncsize, int puncpat, int delay)
+ {
+ return gnuradio::get_initial_sptr
+ (new puncture_ff_impl(puncsize, puncpat, delay));
+ }
+
+ puncture_ff_impl::puncture_ff_impl(int puncsize, int puncpat, int delay)
+ : block("puncture_ff",
+ io_signature::make(1, 1, sizeof(float)),
+ io_signature::make(1, 1, sizeof(float))),
+ d_puncsize(puncsize), d_delay(delay)
+ {
+ // Create a mask of all 1's of puncsize length
+ int mask = 0;
+ for(int i = 0; i < d_puncsize; i++)
+ mask |= 1 << i;
+
+ // Rotate the pattern for the delay value; then mask it if there
+ // are any excess 1's in the pattern.
+ for(int i = 0; i < d_delay; ++i) {
+ puncpat = ((puncpat & 1) << (d_puncsize - 1)) + (puncpat >> 1);
+ }
+ d_puncpat = puncpat & mask;
+
+ // Calculate the number of holes in the pattern. The mask is all
+ // 1's given puncsize and puncpat is a pattern with >= puncsize
+ // 0's (masked to ensure this). The difference between the
+ // number of 1's in the mask and the puncpat is the number of
+ // holes.
+ uint32_t count_mask=0, count_pat=0;
+ volk_32u_popcnt(&count_mask, static_cast<uint32_t>(mask));
+ volk_32u_popcnt(&count_pat, static_cast<uint32_t>(d_puncpat));
+ d_puncholes = count_mask - count_pat;
+
+ set_fixed_rate(true);
+ set_relative_rate((double)(d_puncsize - d_puncholes)/d_puncsize);
+ set_output_multiple(d_puncsize - d_puncholes);
+ //set_msg_handler(boost::bind(&puncture_ff_impl::catch_msg, this, _1));
+ }
+
+ puncture_ff_impl::~puncture_ff_impl()
+ {
+ }
+
+ int
+ puncture_ff_impl::fixed_rate_ninput_to_noutput(int ninput)
+ {
+ return (int)((((d_puncsize - d_puncholes)/(double)(d_puncsize)) * ninput) + .5);
+ }
+
+ int
+ puncture_ff_impl::fixed_rate_noutput_to_ninput(int noutput)
+ {
+ return (int)(((d_puncsize/(double)(d_puncsize-d_puncholes)) * noutput) + .5);
+ }
+
+ void
+ puncture_ff_impl::forecast(int noutput_items,
+ gr_vector_int& ninput_items_required)
+ {
+ ninput_items_required[0] = (int)(((d_puncsize/(double)(d_puncsize-d_puncholes)) * noutput_items) + .5);
+ }
+
+ /*
+ void
+ puncture_ff_impl::catch_msg(pmt::pmt_t msg)
+ {
+ long mlong = pmt::pmt_to_long(msg);
+ for(int i = 0; i < mlong; ++i) {
+ d_puncholes = (d_puncholes >> 1) | ((d_puncholes & 1) << (d_puncsize - 1));
+ }
+ }
+ */
+
+ int
+ puncture_ff_impl::general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const float *in = (const float *)input_items[0];
+ float *out = (float *)output_items[0];
+
+ for(int i=0, k=0; i < noutput_items/output_multiple(); ++i) {
+ for(int j = 0; j < d_puncsize; ++j) {
+ if((d_puncpat >> (d_puncsize - 1 - j)) & 1) {
+ out[k++] = in[i*d_puncsize + j];
+ }
+ }
+ }
+
+ /*
+ GR_LOG_DEBUG(d_debug_logger, ">>>>>> start");
+ for(int i = 0, k=0; i < noutput_items; ++i) {
+ if((d_puncpat >> (d_puncsize - 1 - (i % d_puncsize))) & 1) {
+ GR_LOG_DEBUG(d_debug_logger, boost::format("%1%...%2%") \
+ % out[k++] % in[i]);
+ }
+ else {
+ GR_LOG_DEBUG(d_debug_logger, boost::format("snit %1%") % in[i]);
+ }
+ }
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("comp: %1%, %2%\n") \
+ % noutput_items % ninput_items[0]);
+ GR_LOG_DEBUG(d_debug_logger, boost::format("consuming %1%") \
+ % ((int)(((1.0/relative_rate()) * noutput_items) + .5)));
+ */
+
+ consume_each((int)(((1.0/relative_rate()) * noutput_items) + .5));
+ return noutput_items;
+ }
+
+ } /* namespace fec */
+}/* namespace gr */
diff --git a/gr-fec/lib/puncture_ff_impl.h b/gr-fec/lib/puncture_ff_impl.h
new file mode 100644
index 0000000000..e86d0d25c5
--- /dev/null
+++ b/gr-fec/lib/puncture_ff_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_PUNCTURE_FF_IMPL_H
+#define INCLUDED_FEC_PUNCTURE_FF_IMPL_H
+
+#include <gnuradio/fec/puncture_ff.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API puncture_ff_impl : public puncture_ff
+ {
+ private:
+ int d_puncsize;
+ int d_delay;
+ int d_puncholes;
+ int d_puncpat;
+
+ public:
+ puncture_ff_impl(int puncsize, int puncpat, int delay);
+ ~puncture_ff_impl();
+
+ //void catch_msg(pmt::pmt_t msg);
+
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ int fixed_rate_ninput_to_noutput(int ninput);
+ int fixed_rate_noutput_to_ninput(int noutput);
+ void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_PUNCTURE_FF_IMPL_H */
diff --git a/gr-fec/lib/repetition_decoder_impl.cc b/gr-fec/lib/repetition_decoder_impl.cc
new file mode 100644
index 0000000000..bce41de5ca
--- /dev/null
+++ b/gr-fec/lib/repetition_decoder_impl.cc
@@ -0,0 +1,144 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "repetition_decoder_impl.h"
+#include <math.h>
+#include <boost/assign/list_of.hpp>
+#include <volk/volk.h>
+#include <sstream>
+#include <stdio.h>
+#include <vector>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ generic_decoder::sptr
+ repetition_decoder::make(int frame_size, int rep,
+ float ap_prob)
+ {
+ return generic_decoder::sptr
+ (new repetition_decoder_impl(frame_size, rep,
+ ap_prob));
+ }
+
+ repetition_decoder_impl::repetition_decoder_impl(int frame_size, int rep,
+ float ap_prob)
+ : generic_decoder("repetition_decoder")
+ {
+ // Set max frame size here; all buffers and settings will be
+ // based on this value.
+ d_max_frame_size = frame_size;
+ set_frame_size(frame_size);
+
+ if(rep < 0)
+ throw std::runtime_error("repetition_encoder: repetition rate must be >= 0");
+ if((ap_prob < 0) || (ap_prob > 1.0))
+ throw std::runtime_error("repetition_encoder: a priori probability rate must be in [0, 1]");
+
+ d_rep = rep;
+ d_ap_prob = ap_prob;
+ d_trials.resize(d_rep);
+ }
+
+ repetition_decoder_impl::~repetition_decoder_impl()
+ {
+ }
+
+ int
+ repetition_decoder_impl::get_output_size()
+ {
+ //unpacked bits
+ return d_frame_size;
+ }
+
+ int
+ repetition_decoder_impl::get_input_size()
+ {
+ return d_frame_size*d_rep;
+ }
+
+ int
+ repetition_decoder_impl::get_input_item_size()
+ {
+ return sizeof(float);
+ }
+
+ const char*
+ repetition_decoder_impl::get_input_conversion()
+ {
+ return "none";
+ }
+
+ float
+ repetition_decoder_impl::get_shift()
+ {
+ return 0;
+ }
+
+ bool
+ repetition_decoder_impl::set_frame_size(unsigned int frame_size)
+ {
+ bool ret = true;
+ if(frame_size > d_max_frame_size) {
+ GR_LOG_INFO(d_logger, boost::format("tried to set frame to %1%; max possible is %2%") \
+ % frame_size % d_max_frame_size);
+ frame_size = d_max_frame_size;
+ ret = false;
+ }
+
+ d_frame_size = frame_size;
+
+ return ret;
+ }
+
+ double
+ repetition_decoder_impl::rate()
+ {
+ return 1.0/static_cast<double>(d_rep);
+ }
+
+ void
+ repetition_decoder_impl::generic_work(void *inbuffer, void *outbuffer)
+ {
+ const float *in = (const float*)inbuffer;
+ unsigned char *out = (unsigned char *) outbuffer;
+
+ for(unsigned int i = 0; i < d_frame_size; i++) {
+ for(unsigned int r = 0; r < d_rep; r++) {
+ d_trials[r] = (in[d_rep*i + r] > 0) ? 1.0f : 0.0f;
+ }
+ float res = std::count(d_trials.begin(), d_trials.end(), 1.0f);
+ if((res / static_cast<float>(d_rep)) > d_ap_prob)
+ out[i] = 1;
+ else
+ out[i] = 0;
+ }
+ }
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/repetition_decoder_impl.h b/gr-fec/lib/repetition_decoder_impl.h
new file mode 100644
index 0000000000..33fb174456
--- /dev/null
+++ b/gr-fec/lib/repetition_decoder_impl.h
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_REPETITION_DECODER_IMPL_H
+#define INCLUDED_FEC_REPETITION_DECODER_IMPL_H
+
+#include <vector>
+#include <algorithm>
+#include <string>
+#include <gnuradio/fec/repetition_decoder.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ class FEC_API repetition_decoder_impl : public repetition_decoder
+ {
+ private:
+ //plug into the generic fec api
+ void generic_work(void *inbuffer, void *outbuffer);
+ int get_output_size();
+ int get_input_size();
+ int get_input_item_size();
+ float get_shift();
+ const char* get_input_conversion();
+ //const char* get_output_conversion();
+
+ unsigned int d_max_frame_size;
+ unsigned int d_frame_size;
+ unsigned int d_rep;
+ float d_ap_prob;
+
+ std::vector<float> d_trials;
+
+ public:
+ repetition_decoder_impl(int frame_size, int rep,
+ float ap_prob=0.5);
+ ~repetition_decoder_impl();
+
+ bool set_frame_size(unsigned int frame_size);
+ double rate();
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_REPETITION_DECODER_IMPL_H */
diff --git a/gr-fec/lib/repetition_encoder_impl.cc b/gr-fec/lib/repetition_encoder_impl.cc
new file mode 100644
index 0000000000..dd6bc01615
--- /dev/null
+++ b/gr-fec/lib/repetition_encoder_impl.cc
@@ -0,0 +1,108 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "repetition_encoder_impl.h"
+#include <gnuradio/fec/generic_encoder.h>
+#include <volk/volk.h>
+#include <sstream>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ generic_encoder::sptr
+ repetition_encoder::make(int frame_size, int rep)
+ {
+ return generic_encoder::sptr
+ (new repetition_encoder_impl(frame_size, rep));
+ }
+
+ repetition_encoder_impl::repetition_encoder_impl(int frame_size, int rep)
+ : generic_encoder("repetition_encoder")
+ {
+ d_max_frame_size = frame_size;
+ set_frame_size(frame_size);
+
+ if(rep < 0)
+ throw std::runtime_error("repetition_encoder: repetition rate must be >= 0");
+
+ d_rep = rep;
+ }
+
+ repetition_encoder_impl::~repetition_encoder_impl()
+ {
+ }
+
+ int
+ repetition_encoder_impl::get_output_size()
+ {
+ return d_frame_size*d_rep;
+ }
+
+ int
+ repetition_encoder_impl::get_input_size()
+ {
+ return d_frame_size;
+ }
+
+ bool
+ repetition_encoder_impl::set_frame_size(unsigned int frame_size)
+ {
+ bool ret = true;
+ if(frame_size > d_max_frame_size) {
+ GR_LOG_INFO(d_logger, boost::format("tried to set frame to %1%; max possible is %2%") \
+ % frame_size % d_max_frame_size);
+ frame_size = d_max_frame_size;
+ ret = false;
+ }
+
+ d_frame_size = frame_size;
+
+ return ret;
+ }
+
+ double
+ repetition_encoder_impl::rate()
+ {
+ return static_cast<double>(d_rep);
+ }
+
+ void
+ repetition_encoder_impl::generic_work(void *inbuffer, void *outbuffer)
+ {
+ const unsigned char *in = (const unsigned char*)inbuffer;
+ unsigned char *out = (unsigned char*)outbuffer;
+
+ for(unsigned int i = 0; i < d_frame_size; i++) {
+ for(unsigned int r = 0; r < d_rep; r++) {
+ out[d_rep*i + r] = in[i];
+ }
+ }
+ }
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/repetition_encoder_impl.h b/gr-fec/lib/repetition_encoder_impl.h
new file mode 100644
index 0000000000..4730110817
--- /dev/null
+++ b/gr-fec/lib/repetition_encoder_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+p * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_REPETITION_ENCODER_IMPL_H
+#define INCLUDED_FEC_REPETITION_ENCODER_IMPL_H
+
+#include <map>
+#include <string>
+#include <gnuradio/fec/repetition_encoder.h>
+
+namespace gr {
+ namespace fec {
+ namespace code {
+
+ class FEC_API repetition_encoder_impl : public repetition_encoder
+ {
+ private:
+ //plug into the generic fec api
+ void generic_work(void *inbuffer, void *outbuffer);
+ int get_output_size();
+ int get_input_size();
+
+ unsigned int d_max_frame_size;
+ unsigned int d_frame_size;
+ unsigned int d_rep;
+
+ public:
+ repetition_encoder_impl(int frame_size, int rep);
+ ~repetition_encoder_impl();
+
+ bool set_frame_size(unsigned int frame_size);
+ double rate();
+ };
+
+ } /* namespace code */
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_REPETITION_ENCODER_IMPL_H */
diff --git a/gr-fec/lib/tagged_decoder_impl.cc b/gr-fec/lib/tagged_decoder_impl.cc
new file mode 100644
index 0000000000..2841b5f57f
--- /dev/null
+++ b/gr-fec/lib/tagged_decoder_impl.cc
@@ -0,0 +1,92 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tagged_decoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ tagged_decoder::sptr
+ tagged_decoder::make(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string &lengthtagname)
+ {
+ return gnuradio::get_initial_sptr
+ ( new tagged_decoder_impl(my_decoder, input_item_size,
+ output_item_size, lengthtagname));
+ }
+
+ tagged_decoder_impl::tagged_decoder_impl(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string &lengthtagname)
+ : tagged_stream_block("fec_tagged_decoder",
+ io_signature::make(1, 1, input_item_size),
+ io_signature::make(1, 1, output_item_size),
+ lengthtagname),
+ d_input_item_size(input_item_size), d_output_item_size(output_item_size)
+ {
+ d_decoder = my_decoder;
+
+ set_relative_rate(d_decoder->rate());
+ }
+
+ int
+ tagged_decoder_impl::calculate_output_stream_length(const gr_vector_int &ninput_items)
+ {
+ return d_decoder->get_output_size();
+ }
+
+ tagged_decoder_impl::~tagged_decoder_impl()
+ {
+ }
+
+ int
+ tagged_decoder_impl::work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const unsigned char *in = (unsigned char*)input_items[0];
+ unsigned char *out = (unsigned char *)output_items[0];
+
+ d_decoder->set_frame_size(ninput_items[0]*d_decoder->rate());
+ if(noutput_items < d_decoder->get_output_size())
+ return 0;
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("%1%, %2%, %3%") \
+ % noutput_items % ninput_items[0] % d_decoder->get_output_size());
+
+ d_decoder->generic_work((void*)in, (void*)out);
+
+ return d_decoder->get_output_size();
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/tagged_decoder_impl.h b/gr-fec/lib/tagged_decoder_impl.h
new file mode 100644
index 0000000000..ec81a4fa76
--- /dev/null
+++ b/gr-fec/lib/tagged_decoder_impl.h
@@ -0,0 +1,55 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_TAGGED_DECODER_IMPL_H
+#define INCLUDED_FEC_TAGGED_DECODER_IMPL_H
+
+#include <gnuradio/fec/tagged_decoder.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API tagged_decoder_impl : public tagged_decoder
+ {
+ private:
+ generic_decoder::sptr d_decoder;
+ size_t d_input_item_size;
+ size_t d_output_item_size;
+
+ public:
+ tagged_decoder_impl(generic_decoder::sptr my_decoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string &lengthtagname="packet_len");
+ ~tagged_decoder_impl();
+
+ int work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ int calculate_output_stream_length(const gr_vector_int &ninput_items);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_TAGGED_DECODER_IMPL_H */
diff --git a/gr-fec/lib/tagged_encoder_impl.cc b/gr-fec/lib/tagged_encoder_impl.cc
new file mode 100644
index 0000000000..8461a56ef7
--- /dev/null
+++ b/gr-fec/lib/tagged_encoder_impl.cc
@@ -0,0 +1,93 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tagged_encoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <stdio.h>
+
+namespace gr {
+ namespace fec {
+
+ tagged_encoder::sptr
+ tagged_encoder::make(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string& lengthtagname)
+ {
+ return gnuradio::get_initial_sptr
+ (new tagged_encoder_impl(my_encoder, input_item_size,
+ output_item_size,
+ lengthtagname));
+ }
+
+ tagged_encoder_impl::tagged_encoder_impl(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string& lengthtagname)
+ : tagged_stream_block("fec_tagged_encoder",
+ io_signature::make(1, 1, input_item_size),
+ io_signature::make(1, 1, output_item_size),
+ lengthtagname),
+ d_input_item_size(input_item_size), d_output_item_size(output_item_size)
+ {
+ d_encoder = my_encoder;
+
+ set_relative_rate(d_encoder->rate());
+ }
+
+ tagged_encoder_impl::~tagged_encoder_impl()
+ {
+ }
+
+ int
+ tagged_encoder_impl::calculate_output_stream_length(const gr_vector_int &ninput_items)
+ {
+ return d_encoder->get_output_size();
+ }
+
+ int
+ tagged_encoder_impl::work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ char *inbuffer = (char*)input_items[0];
+ char *outbuffer = (char*)output_items[0];
+
+ d_encoder->set_frame_size(ninput_items[0]);
+ if(noutput_items < d_encoder->get_output_size())
+ return 0;
+
+ GR_LOG_DEBUG(d_debug_logger, boost::format("nout: %1% nin: %2% ret: %3%") \
+ % noutput_items % ninput_items[0] % d_encoder->get_output_size());
+
+ d_encoder->generic_work((void*)(inbuffer), (void*)(outbuffer));
+
+ return d_encoder->get_output_size();
+ }
+
+ } /* namespace fec */
+} /* namespace gr */
diff --git a/gr-fec/lib/tagged_encoder_impl.h b/gr-fec/lib/tagged_encoder_impl.h
new file mode 100644
index 0000000000..55b355342c
--- /dev/null
+++ b/gr-fec/lib/tagged_encoder_impl.h
@@ -0,0 +1,55 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_FEC_TAGGED_ENCODER_IMPL_H
+#define INCLUDED_FEC_TAGGED_ENCODER_IMPL_H
+
+#include <gnuradio/fec/tagged_encoder.h>
+
+namespace gr {
+ namespace fec {
+
+ class FEC_API tagged_encoder_impl : public tagged_encoder
+ {
+ private:
+ generic_encoder::sptr d_encoder;
+ size_t d_input_item_size;
+ size_t d_output_item_size;
+
+ public:
+ tagged_encoder_impl(generic_encoder::sptr my_encoder,
+ size_t input_item_size,
+ size_t output_item_size,
+ const std::string &lengthtagname="packet_len");
+ ~tagged_encoder_impl();
+
+ int work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ int calculate_output_stream_length(const gr_vector_int &ninput_items);
+ };
+
+ } /* namespace fec */
+} /* namespace gr */
+
+#endif /* INCLUDED_FEC_TAGGED_ENCODER_IMPL_H */
diff --git a/gr-fec/python/fec/CMakeLists.txt b/gr-fec/python/fec/CMakeLists.txt
index a7eefaa0c1..032816866d 100644
--- a/gr-fec/python/fec/CMakeLists.txt
+++ b/gr-fec/python/fec/CMakeLists.txt
@@ -23,6 +23,18 @@ include(GrPython)
GR_PYTHON_INSTALL(
FILES
__init__.py
+ bitflip.py
+ extended_encoder.py
+ extended_decoder.py
+ capillary_threaded_decoder.py
+ capillary_threaded_encoder.py
+ threaded_decoder.py
+ threaded_encoder.py
+ extended_async_encoder.py
+ extended_tagged_encoder.py
+ extended_tagged_decoder.py
+ fec_test.py
+ bercurve_generator.py
DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec
COMPONENT "fec_python"
)
diff --git a/gr-fec/python/fec/__init__.py b/gr-fec/python/fec/__init__.py
index bfec694739..6c82232d4f 100644
--- a/gr-fec/python/fec/__init__.py
+++ b/gr-fec/python/fec/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -30,3 +30,18 @@ except ImportError:
dirname, filename = os.path.split(os.path.abspath(__file__))
__path__.append(os.path.join(dirname, "..", "..", "swig"))
from fec_swig import *
+
+from bitflip import *
+from extended_encoder import extended_encoder
+from extended_decoder import extended_decoder
+from threaded_encoder import threaded_encoder
+from threaded_decoder import threaded_decoder
+from capillary_threaded_decoder import capillary_threaded_decoder
+from capillary_threaded_encoder import capillary_threaded_encoder
+from extended_async_encoder import extended_async_encoder
+from extended_tagged_encoder import extended_tagged_encoder
+from extended_tagged_decoder import extended_tagged_decoder
+
+
+from fec_test import fec_test
+from bercurve_generator import bercurve_generator
diff --git a/gr-fec/python/fec/_qa_helper.py b/gr-fec/python/fec/_qa_helper.py
new file mode 100755
index 0000000000..8722453441
--- /dev/null
+++ b/gr-fec/python/fec/_qa_helper.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import blocks
+from gnuradio import gr
+import sys, numpy
+
+from extended_encoder import extended_encoder
+from extended_decoder import extended_decoder
+
+class map_bb(gr.sync_block):
+ def __init__(self, bitmap):
+ gr.sync_block.__init__(
+ self,
+ name = "map_bb",
+ in_sig = [numpy.int8],
+ out_sig = [numpy.int8])
+ self.bitmap = bitmap
+
+ def work(self, input_items, output_items):
+ output_items[0][:] = map(lambda x: self.bitmap[x], input_items[0])
+ return len(output_items[0])
+
+
+class _qa_helper(gr.top_block):
+
+ def __init__(self, data_size, enc, dec, threading):
+ gr.top_block.__init__(self, "_qa_helper")
+
+ self.puncpat = puncpat = '11'
+
+ self.enc = enc
+ self.dec = dec
+ self.data_size = data_size
+ self.threading = threading
+
+ self.ext_encoder = extended_encoder(enc, threading=self.threading, puncpat=self.puncpat)
+ self.ext_decoder= extended_decoder(dec, threading=self.threading, ann=None,
+ puncpat=self.puncpat, integration_period=10000)
+
+ self.src = blocks.vector_source_b(data_size*[0, 1, 2, 3, 5, 7, 9, 13, 15, 25, 31, 45, 63, 95, 127], False)
+ self.unpack = blocks.unpack_k_bits_bb(8)
+ self.map = map_bb([-1, 1])
+ self.to_float = blocks.char_to_float(1)
+ self.snk_input = blocks.vector_sink_b()
+ self.snk_output = blocks.vector_sink_b()
+
+ self.connect(self.src, self.unpack, self.ext_encoder)
+ self.connect(self.ext_encoder, self.map, self.to_float)
+ self.connect(self.to_float, self.ext_decoder)
+ self.connect(self.unpack, self.snk_input)
+ self.connect(self.ext_decoder, self.snk_output)
+
+if __name__ == '__main__':
+ frame_size = 30
+ enc = fec.dummy_encoder_make(frame_size*8)
+ #enc = fec.repetition_encoder_make(frame_size*8, 3)
+ dec = fec.dummy_decoder.make(frame_size*8)
+
+ tb = _qa_helper(10*frame_size, enc, dec, None)
+ tb.run()
+
+ errs = 0
+ for i,o in zip(tb.snk_input.data(), tb.snk_output.data()):
+ if i-o != 0:
+ errs += 1
+
+ if errs == 0:
+ print "Decoded properly"
+ else:
+ print "Problem Decoding"
diff --git a/gr-fec/python/fec/bercurve_generator.py b/gr-fec/python/fec/bercurve_generator.py
new file mode 100644
index 0000000000..e67d1e17c2
--- /dev/null
+++ b/gr-fec/python/fec/bercurve_generator.py
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+import numpy
+
+from fec_test import fec_test
+
+class bercurve_generator(gr.hier_block2):
+
+ def __init__(self, encoder_list, decoder_list, esno=numpy.arange(0.0, 3.0, .25),
+ samp_rate=3200000, threading='capillary', puncpat='11', seed=0):
+ gr.hier_block2.__init__(
+ self, "ber_curve_generator",
+ gr.io_signature(0, 0, 0),
+ gr.io_signature(len(esno) * 2, len(esno) * 2, gr.sizeof_char*1))
+
+ self.esno = esno
+ self.samp_rate = samp_rate
+ self.encoder_list = encoder_list
+ self.decoder_list = decoder_list
+ self.puncpat = puncpat
+
+ self.random_gen_b_0 = blocks.vector_source_b(map(int, numpy.random.randint(0, 256, 100000)), True)
+ self.deinterleave = blocks.deinterleave(gr.sizeof_char*1)
+ self.connect(self.random_gen_b_0, self.deinterleave)
+ self.ber_generators = []
+ for i in range(0, len(esno)):
+ ber_generator_temp = fec_test(
+ generic_encoder=encoder_list[i],
+ generic_decoder=decoder_list[i],
+ esno=esno[i],
+ samp_rate=samp_rate,
+ threading=threading,
+ puncpat=puncpat,
+ seed=seed)
+ self.ber_generators.append(ber_generator_temp);
+
+ for i in range(0, len(esno)):
+ self.connect((self.deinterleave, i), (self.ber_generators[i]))
+ self.connect((self.ber_generators[i], 0), (self, i*2));
+ self.connect((self.ber_generators[i], 1), (self, i*2 + 1));
+
+ def get_esno(self):
+ return self.esno
+
+ def set_esno(self, esno):
+ self.esno = esno
+ self.ber_generator_0.set_esno(self.esno)
+
+ def get_samp_rate(self):
+ return self.samp_rate
+
+ def set_samp_rate(self, samp_rate):
+ self.samp_rate = samp_rate
+ self.ber_generator_0.set_samp_rate(self.samp_rate)
+
+ def get_encoder_list(self):
+ return self.encoder_list
+
+ def set_encoder_list(self, encoder_list):
+ self.encoder_list = encoder_list
+ self.ber_generator_0.set_generic_encoder(self.encoder_list)
+
+ def get_decoder_list(self):
+ return self.decoder_list
+
+ def set_decoder_list(self, decoder_list):
+ self.decoder_list = decoder_list
+ self.ber_generator_0.set_generic_decoder(self.decoder_list)
+
+ def get_puncpat(self):
+ return self.puncpat
+
+ def set_puncpat(self, puncpat):
+ self.puncpat = puncpat
diff --git a/gr-fec/python/fec/bitflip.py b/gr-fec/python/fec/bitflip.py
new file mode 100644
index 0000000000..235dc19a05
--- /dev/null
+++ b/gr-fec/python/fec/bitflip.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+def bitreverse(mint):
+ res = 0;
+ while mint != 0:
+ res = res << 1;
+ res += mint & 1;
+ mint = mint >> 1;
+ return res;
+
+const_lut = [2];
+specinvert_lut = [[0, 2, 1, 3]];
+
+def bitflip(mint, bitflip_lut, index, csize):
+ res = 0;
+ cnt = 0;
+ mask = (1 << const_lut[index]) - 1;
+ while (cnt < csize):
+ res += (bitflip_lut[(mint >> cnt) & (mask)]) << cnt;
+ cnt += const_lut[index];
+ return res;
+
+
+def read_bitlist(bitlist):
+ res = 0;
+ for i in range(len(bitlist)):
+ if int(bitlist[i]) == 1:
+ res += 1 << (len(bitlist) - i - 1);
+ return res;
+
+
+def read_big_bitlist(bitlist):
+ ret = []
+ for j in range(0, len(bitlist)/64):
+ res = 0;
+ for i in range(0, 64):
+ if int(bitlist[j*64+i]) == 1:
+ res += 1 << (64 - i - 1);
+ ret.append(res);
+ res = 0;
+ j = 0;
+ for i in range(len(bitlist)%64):
+ if int(bitlist[len(ret)*64+i]) == 1:
+ res += 1 << (64 - j - 1);
+ j += 1;
+ ret.append(res);
+ return ret;
+
+def generate_symmetries(symlist):
+ retlist = []
+ if len(symlist) == 1:
+ for i in range(len(symlist[0])):
+ retlist.append(symlist[0][i:] + symlist[0][0:i]);
+ invlist = symlist[0];
+ for i in range(1, len(symlist[0])/2):
+ invlist[i] = symlist[0][i + len(symlist[0])/2];
+ invlist[i + len(symlist[0])/2] = symlist[0][i];
+ for i in range(len(symlist[0])):
+ retlist.append(symlist[0][i:] + symlist[0][0:i]);
+ return retlist;
diff --git a/gr-fec/python/fec/capillary_threaded_decoder.py b/gr-fec/python/fec/capillary_threaded_decoder.py
new file mode 100644
index 0000000000..9a00cde192
--- /dev/null
+++ b/gr-fec/python/fec/capillary_threaded_decoder.py
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+import fec_swig as fec
+import math
+
+class capillary_threaded_decoder(gr.hier_block2):
+ def __init__(self, decoder_list_0, input_size, output_size):
+ gr.hier_block2.__init__(
+ self, "Capillary Threaded Decoder",
+ gr.io_signature(1, 1, input_size*1),
+ gr.io_signature(1, 1, output_size*1))
+
+ self.decoder_list_0 = decoder_list_0
+
+ check = math.log10(len(self.decoder_list_0)) / math.log10(2.0)
+ if(abs(check - int(check)) > 0):
+ gr.log.info("fec.capillary_threaded_decoder: number of decoders must be a power of 2.")
+ raise AttributeError
+
+ self.deinterleaves_0 = []
+ for i in range(int(math.log(len(decoder_list_0), 2))):
+ for j in range(int(math.pow(2, i))):
+ self.deinterleaves_0.append(blocks.deinterleave(input_size,
+ fec.get_decoder_input_size(decoder_list_0[0])))
+
+ self.generic_decoders_0 = []
+ for i in range(len(decoder_list_0)):
+ self.generic_decoders_0.append(fec.decoder(decoder_list_0[i], input_size, output_size))
+
+ self.interleaves_0 = []
+ for i in range(int(math.log(len(decoder_list_0), 2))):
+ for j in range(int(math.pow(2, i))):
+ self.interleaves_0.append(blocks.interleave(output_size,
+ fec.get_decoder_output_size(decoder_list_0[0])))
+
+ rootcount = 0
+ branchcount = 1
+ for i in range(int(math.log(len(decoder_list_0), 2)) - 1):
+ for j in range(int(math.pow(2, i))):
+ self.connect((self.deinterleaves_0[rootcount], 0), (self.deinterleaves_0[branchcount], 0))
+ self.connect((self.deinterleaves_0[rootcount], 1), (self.deinterleaves_0[branchcount + 1], 0))
+ rootcount += 1
+ branchcount += 2
+
+ codercount = 0
+ for i in range(len(decoder_list_0)/2):
+ self.connect((self.deinterleaves_0[rootcount], 0), (self.generic_decoders_0[codercount], 0))
+ self.connect((self.deinterleaves_0[rootcount], 1), (self.generic_decoders_0[codercount + 1], 0))
+ rootcount += 1
+ codercount += 2
+
+ rootcount = 0
+ branchcount = 1
+ for i in range(int(math.log(len(decoder_list_0), 2)) - 1):
+ for j in range(int(math.pow(2, i))):
+ self.connect((self.interleaves_0[branchcount], 0), (self.interleaves_0[rootcount], 0))
+ self.connect((self.interleaves_0[branchcount + 1], 0), (self.interleaves_0[rootcount], 1))
+ rootcount += 1
+ branchcount += 2
+
+ codercount = 0
+ for i in range(len(decoder_list_0)/2):
+ self.connect((self.generic_decoders_0[codercount], 0), (self.interleaves_0[rootcount], 0))
+ self.connect((self.generic_decoders_0[codercount + 1], 0), (self.interleaves_0[rootcount], 1))
+ rootcount += 1
+ codercount += 2
+
+ if ((len(self.decoder_list_0)) > 1):
+ self.connect((self, 0), (self.deinterleaves_0[0], 0))
+ self.connect((self.interleaves_0[0], 0), (self, 0))
+ else:
+ self.connect((self, 0), (self.generic_decoders_0[0], 0))
+ self.connect((self.generic_decoders_0[0], 0), (self, 0))
+
+ def get_decoder_list_0(self):
+ return self.decoder_list_0
+
+ def set_decoder_list_0(self, decoder_list_0):
+ self.decoder_list_0 = decoder_list_0
diff --git a/gr-fec/python/fec/capillary_threaded_encoder.py b/gr-fec/python/fec/capillary_threaded_encoder.py
new file mode 100644
index 0000000000..21d4af62ca
--- /dev/null
+++ b/gr-fec/python/fec/capillary_threaded_encoder.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+import fec_swig as fec
+import math
+
+class capillary_threaded_encoder(gr.hier_block2):
+ def __init__(self, encoder_list_0, input_size=gr.sizeof_char, output_size=gr.sizeof_char):
+ gr.hier_block2.__init__(self, "Capillary Threaded Encoder",
+ gr.io_signature(1, 1, input_size),
+ gr.io_signature(1, 1, output_size))
+
+ self.encoder_list_0 = encoder_list_0
+
+ check = math.log10(len(self.encoder_list_0)) / math.log10(2.0)
+ if(abs(check - int(check)) > 0.0):
+ gr.log.info("fec.capillary_threaded_encoder: number of encoders must be a power of 2.")
+ raise AttributeError
+
+ self.deinterleaves_0 = [];
+ for i in range(int(math.log(len(encoder_list_0), 2))):
+ for j in range(int(math.pow(2, i))):
+ self.deinterleaves_0.append(blocks.deinterleave(input_size,
+ fec.get_encoder_input_size(encoder_list_0[0])))
+
+ self.generic_encoders_0 = [];
+ for i in range(len(encoder_list_0)):
+ self.generic_encoders_0.append(fec.encoder(encoder_list_0[i],
+ input_size, output_size))
+
+ self.interleaves_0 = [];
+ for i in range(int(math.log(len(encoder_list_0), 2))):
+ for j in range(int(math.pow(2, i))):
+ self.interleaves_0.append(blocks.interleave(output_size,
+ fec.get_encoder_output_size(encoder_list_0[0])))
+
+ rootcount = 0;
+ branchcount = 1;
+ for i in range(int(math.log(len(encoder_list_0), 2)) - 1):
+ for j in range(int(math.pow(2, i))):
+ self.connect((self.deinterleaves_0[rootcount], 0), (self.deinterleaves_0[branchcount], 0))
+ self.connect((self.deinterleaves_0[rootcount], 1), (self.deinterleaves_0[branchcount + 1], 0))
+ rootcount += 1;
+ branchcount += 2;
+
+ codercount = 0;
+ for i in range(len(encoder_list_0)/2):
+ self.connect((self.deinterleaves_0[rootcount], 0), (self.generic_encoders_0[codercount], 0))
+ self.connect((self.deinterleaves_0[rootcount], 1), (self.generic_encoders_0[codercount + 1], 0))
+ rootcount += 1;
+ codercount += 2;
+
+
+ rootcount = 0;
+ branchcount = 1;
+ for i in range(int(math.log(len(encoder_list_0), 2)) - 1):
+ for j in range(int(math.pow(2, i))):
+ self.connect((self.interleaves_0[branchcount], 0), (self.interleaves_0[rootcount], 0))
+ self.connect((self.interleaves_0[branchcount + 1], 0), (self.interleaves_0[rootcount], 1))
+ rootcount += 1;
+ branchcount += 2;
+
+
+ codercount = 0;
+ for i in range(len(encoder_list_0)/2):
+ self.connect((self.generic_encoders_0[codercount], 0), (self.interleaves_0[rootcount], 0))
+ self.connect((self.generic_encoders_0[codercount + 1], 0), (self.interleaves_0[rootcount], 1))
+ rootcount += 1;
+ codercount += 2;
+
+ if((len(self.encoder_list_0)) > 1):
+ self.connect((self, 0), (self.deinterleaves_0[0], 0))
+ self.connect((self.interleaves_0[0], 0), (self, 0))
+ else:
+ self.connect((self, 0), (self.generic_encoders_0[0], 0))
+ self.connect((self.generic_encoders_0[0], 0), (self, 0))
+
+ def get_encoder_list_0(self):
+ return self.encoder_list_0
+
+ def set_encoder_list_0(self, encoder_list_0):
+ self.encoder_list_0 = encoder_list_0
diff --git a/gr-fec/python/fec/extended_async_encoder.py b/gr-fec/python/fec/extended_async_encoder.py
new file mode 100644
index 0000000000..fffe64aeb8
--- /dev/null
+++ b/gr-fec/python/fec/extended_async_encoder.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr
+import fec_swig as fec
+from bitflip import read_bitlist
+import weakref
+
+class extended_async_encoder(gr.hier_block2):
+ def __init__(self, encoder_obj_list, puncpat=None):
+ gr.hier_block2.__init__(self, "extended_async_encoder",
+ gr.io_signature(0, 0, 0),
+ gr.io_signature(0, 0, 0))
+
+ # Set us up as a message passing block
+ self.message_port_register_hier_in('in')
+ self.message_port_register_hier_out('out')
+
+ self.puncpat=puncpat
+
+ # If it's a list of encoders, take the first one, unless it's
+ # a list of lists of encoders.
+ if(type(encoder_obj_list) == list):
+ # This block doesn't handle parallelism of > 1
+ if(type(encoder_obj_list[0]) == list):
+ gr.log.info("fec.extended_encoder: Parallelism must be 0 or 1.")
+ raise AttributeError
+
+ encoder_obj = encoder_obj_list[0]
+
+ # Otherwise, just take it as is
+ else:
+ encoder_obj = encoder_obj_list
+
+ self.encoder = fec.async_encoder(encoder_obj)
+
+ #self.puncture = None
+ #if self.puncpat != '11':
+ # self.puncture = fec.puncture_bb(len(puncpat), read_bitlist(puncpat), 0)
+
+ self.msg_connect(weakref.proxy(self), "in", self.encoder, "in")
+
+ #if(self.puncture):
+ # self.msg_connect(self.encoder, "out", self.puncture, "in")
+ # self.msg_connect(self.puncture, "out", weakref.proxy(self), "out")
+ #else:
+ # self.msg_connect(self.encoder, "out", weakref.proxy(self), "out")
+ self.msg_connect(self.encoder, "out", weakref.proxy(self), "out")
diff --git a/gr-fec/python/fec/extended_decoder.py b/gr-fec/python/fec/extended_decoder.py
new file mode 100644
index 0000000000..7e6cf452f9
--- /dev/null
+++ b/gr-fec/python/fec/extended_decoder.py
@@ -0,0 +1,176 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+import fec_swig as fec
+from bitflip import *
+import sys
+
+if sys.modules.has_key("gnuradio.digital"):
+ digital = sys.modules["gnuradio.digital"]
+else:
+ from gnuradio import digital
+
+from threaded_decoder import threaded_decoder
+from capillary_threaded_decoder import capillary_threaded_decoder
+
+class extended_decoder(gr.hier_block2):
+
+#solution to log_(1-2*t)(1-2*.0335) = 1/taps where t is thresh (syndrome density)
+#for i in numpy.arange(.1, .499, .01):
+ #print str(log((1-(2 * .035)), (1-(2 * i)))) + ':' + str(i);
+ garbletable = {
+ 0.310786835319:0.1,
+ 0.279118162802:0.11,
+ 0.252699589071:0.12,
+ 0.230318516016:0.13,
+ 0.211108735347:0.14,
+ 0.194434959095:0.15,
+ 0.179820650401:0.16,
+ 0.166901324951:0.17,
+ 0.15539341766:0.18,
+ 0.145072979886:0.19,
+ 0.135760766313:0.2,
+ 0.127311581396:0.21,
+ 0.119606529806:0.22,
+ 0.112547286766:0.23,
+ 0.106051798775:0.24,
+ 0.10005101381:0.25,
+ 0.0944863633098:0.26,
+ 0.0893078003966:0.27,
+ 0.084472254501:0.28,
+ 0.0799424008658:0.29,
+ 0.0756856701944:0.3,
+ 0.0716734425668:0.31,
+ 0.0678803831565:0.32,
+ 0.0642838867856:0.33,
+ 0.0608636049994:0.34,
+ 0.0576010337489:0.35,
+ 0.0544791422522:0.36,
+ 0.0514820241933:0.37,
+ 0.0485945507251:0.38,
+ 0.0458019998183:0.39,
+ 0.0430896262596:0.4,
+ 0.0404421166935:0.41,
+ 0.0378428350972:0.42,
+ 0.0352726843274:0.43,
+ 0.0327082350617:0.44,
+ 0.0301183562535:0.45,
+ 0.0274574540266:0.46,
+ 0.0246498236897:0.47,
+ 0.0215448131298:0.48,
+ 0.0177274208353:0.49,
+ }
+
+ def __init__(self, decoder_obj_list, threading, ann=None, puncpat='11',
+ integration_period=10000, flush=None, rotator=None):
+ gr.hier_block2.__init__(self, "extended_decoder",
+ gr.io_signature(1, 1, gr.sizeof_float),
+ gr.io_signature(1, 1, gr.sizeof_char))
+ self.blocks=[]
+ self.ann=ann
+ self.puncpat=puncpat
+ self.flush=flush
+
+ if(type(decoder_obj_list) == list):
+ if(type(decoder_obj_list[0]) == list):
+ gr.log.info("fec.extended_decoder: Parallelism must be 1.")
+ raise AttributeError
+ else:
+ # If it has parallelism of 0, force it into a list of 1
+ decoder_obj_list = [decoder_obj_list,]
+
+ message_collector_connected=False
+
+ ##anything going through the annihilator needs shifted, uchar vals
+ if fec.get_decoder_input_conversion(decoder_obj_list[0]) == "uchar" or \
+ fec.get_decoder_input_conversion(decoder_obj_list[0]) == "packed_bits":
+ self.blocks.append(blocks.multiply_const_ff(48.0))
+
+ if fec.get_shift(decoder_obj_list[0]) != 0.0:
+ self.blocks.append(blocks.add_const_ff(fec.get_shift(decoder_obj_list[0])))
+ elif fec.get_decoder_input_conversion(decoder_obj_list[0]) == "packed_bits":
+ self.blocks.append(blocks.add_const_ff(128.0))
+
+ if fec.get_decoder_input_conversion(decoder_obj_list[0]) == "uchar" or \
+ fec.get_decoder_input_conversion(decoder_obj_list[0]) == "packed_bits":
+ self.blocks.append(blocks.float_to_uchar());
+
+ const_index = 0; #index that corresponds to mod order for specinvert purposes
+
+ if not self.flush:
+ flush = 10000;
+ else:
+ flush = self.flush;
+ if self.ann: #ann and puncpat are strings of 0s and 1s
+ cat = fec.ULLVector();
+ for i in fec.read_big_bitlist(ann):
+ cat.append(i);
+
+ synd_garble = .49
+ idx_list = self.garbletable.keys()
+ idx_list.sort()
+ for i in idx_list:
+ if 1.0/self.ann.count('1') >= i:
+ synd_garble = self.garbletable[i]
+ print 'using syndrom garble threshold ' + str(synd_garble) + 'for conv_bit_corr_bb'
+ print 'ceiling: .0335 data garble rate'
+ self.blocks.append(fec.conv_bit_corr_bb(cat, len(puncpat) - puncpat.count('0'),
+ len(ann), integration_period, flush, synd_garble))
+
+ if self.puncpat != '11':
+ self.blocks.append(fec.depuncture_bb(len(puncpat), read_bitlist(puncpat), 0))
+
+ if fec.get_decoder_input_conversion(decoder_obj_list[0]) == "packed_bits":
+ self.blocks.append(blocks.uchar_to_float())
+ self.blocks.append(blocks.add_const_ff(-128.0))
+ self.blocks.append(digital.binary_slicer_fb())
+ self.blocks.append(blocks.unpacked_to_packed_bb(1,0))
+
+ if(len(decoder_obj_list) > 1):
+ if(fec.get_history(decoder_obj_list[0]) != 0):
+ gr.log.info("fec.extended_decoder: Cannot use multi-threaded parallelism on a decoder with history.")
+ raise AttributeError
+
+ if threading == 'capillary':
+ self.blocks.append(capillary_threaded_decoder(decoder_obj_list,
+ fec.get_decoder_input_item_size(decoder_obj_list[0]),
+ fec.get_decoder_output_item_size(decoder_obj_list[0])))
+
+ elif threading == 'ordinary':
+ self.blocks.append(threaded_decoder(decoder_obj_list,
+ fec.get_decoder_input_item_size(decoder_obj_list[0]),
+ fec.get_decoder_output_item_size(decoder_obj_list[0])))
+
+ else:
+ self.blocks.append(fec.decoder(decoder_obj_list[0],
+ fec.get_decoder_input_item_size(decoder_obj_list[0]),
+ fec.get_decoder_output_item_size(decoder_obj_list[0])))
+
+ if fec.get_decoder_output_conversion(decoder_obj_list[0]) == "unpack":
+ self.blocks.append(blocks.packed_to_unpacked_bb(1, gr.GR_MSB_FIRST));
+
+ self.connect((self, 0), (self.blocks[0], 0));
+ self.connect((self.blocks[-1], 0), (self, 0));
+
+ for i in range(len(self.blocks) - 1):
+ self.connect((self.blocks[i], 0), (self.blocks[i+1], 0));
diff --git a/gr-fec/python/fec/extended_encoder.py b/gr-fec/python/fec/extended_encoder.py
new file mode 100644
index 0000000000..50a8891ea5
--- /dev/null
+++ b/gr-fec/python/fec/extended_encoder.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+
+import fec_swig as fec
+from threaded_encoder import threaded_encoder
+from capillary_threaded_encoder import capillary_threaded_encoder
+from bitflip import read_bitlist
+
+class extended_encoder(gr.hier_block2):
+ def __init__(self, encoder_obj_list, threading, puncpat=None):
+ gr.hier_block2.__init__(self, "extended_encoder",
+ gr.io_signature(1, 1, gr.sizeof_char),
+ gr.io_signature(1, 1, gr.sizeof_char))
+
+ self.blocks=[]
+ self.puncpat=puncpat
+
+ if(type(encoder_obj_list) == list):
+ if(type(encoder_obj_list[0]) == list):
+ gr.log.info("fec.extended_encoder: Parallelism must be 1.")
+ raise AttributeError
+ else:
+ # If it has parallelism of 0, force it into a list of 1
+ encoder_obj_list = [encoder_obj_list,]
+
+ if fec.get_encoder_input_conversion(encoder_obj_list[0]) == "pack":
+ self.blocks.append(blocks.pack_k_bits_bb(8))
+
+ if threading == 'capillary':
+ self.blocks.append(capillary_threaded_encoder(encoder_obj_list,
+ gr.sizeof_char,
+ gr.sizeof_char))
+ elif threading == 'ordinary':
+ self.blocks.append(threaded_encoder(encoder_obj_list,
+ gr.sizeof_char,
+ gr.sizeof_char))
+ else:
+ self.blocks.append(fec.encoder(encoder_obj_list[0],
+ gr.sizeof_char,
+ gr.sizeof_char))
+
+ if self.puncpat != '11':
+ self.blocks.append(fec.puncture_bb(len(puncpat), read_bitlist(puncpat), 0))
+
+ # Connect the input to the encoder and the output to the
+ # puncture if used or the encoder if not.
+ self.connect((self, 0), (self.blocks[0], 0));
+ self.connect((self.blocks[-1], 0), (self, 0));
+
+ # If using the puncture block, add it into the flowgraph after
+ # the encoder.
+ for i in range(len(self.blocks) - 1):
+ self.connect((self.blocks[i], 0), (self.blocks[i+1], 0));
diff --git a/gr-fec/python/fec/extended_tagged_decoder.py b/gr-fec/python/fec/extended_tagged_decoder.py
new file mode 100644
index 0000000000..1865cbfbe4
--- /dev/null
+++ b/gr-fec/python/fec/extended_tagged_decoder.py
@@ -0,0 +1,175 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+import fec_swig as fec
+from bitflip import *
+import sys
+
+if sys.modules.has_key("gnuradio.digital"):
+ digital = sys.modules["gnuradio.digital"]
+else:
+ from gnuradio import digital
+
+class extended_tagged_decoder(gr.hier_block2):
+
+#solution to log_(1-2*t)(1-2*.0335) = 1/taps where t is thresh (syndrome density)
+#for i in numpy.arange(.1, .499, .01):
+ #print str(log((1-(2 * .035)), (1-(2 * i)))) + ':' + str(i);
+ garbletable = {
+ 0.310786835319:0.1,
+ 0.279118162802:0.11,
+ 0.252699589071:0.12,
+ 0.230318516016:0.13,
+ 0.211108735347:0.14,
+ 0.194434959095:0.15,
+ 0.179820650401:0.16,
+ 0.166901324951:0.17,
+ 0.15539341766:0.18,
+ 0.145072979886:0.19,
+ 0.135760766313:0.2,
+ 0.127311581396:0.21,
+ 0.119606529806:0.22,
+ 0.112547286766:0.23,
+ 0.106051798775:0.24,
+ 0.10005101381:0.25,
+ 0.0944863633098:0.26,
+ 0.0893078003966:0.27,
+ 0.084472254501:0.28,
+ 0.0799424008658:0.29,
+ 0.0756856701944:0.3,
+ 0.0716734425668:0.31,
+ 0.0678803831565:0.32,
+ 0.0642838867856:0.33,
+ 0.0608636049994:0.34,
+ 0.0576010337489:0.35,
+ 0.0544791422522:0.36,
+ 0.0514820241933:0.37,
+ 0.0485945507251:0.38,
+ 0.0458019998183:0.39,
+ 0.0430896262596:0.4,
+ 0.0404421166935:0.41,
+ 0.0378428350972:0.42,
+ 0.0352726843274:0.43,
+ 0.0327082350617:0.44,
+ 0.0301183562535:0.45,
+ 0.0274574540266:0.46,
+ 0.0246498236897:0.47,
+ 0.0215448131298:0.48,
+ 0.0177274208353:0.49,
+ }
+
+ def __init__(self, decoder_obj_list, ann=None, puncpat='11',
+ integration_period=10000, flush=None, rotator=None, lentagname=None):
+ gr.hier_block2.__init__(self, "extended_decoder",
+ gr.io_signature(1, 1, gr.sizeof_float),
+ gr.io_signature(1, 1, gr.sizeof_char))
+ self.blocks=[]
+ self.ann=ann
+ self.puncpat=puncpat
+ self.flush=flush
+
+ if(type(decoder_obj_list) == list):
+ # This block doesn't handle parallelism of > 1
+ # We could just grab encoder [0][0], but we don't want to encourage this.
+ if(type(decoder_obj_list[0]) == list):
+ gr.log.info("fec.extended_tagged_decoder: Parallelism must be 1.")
+ raise AttributeError
+
+ decoder_obj = decoder_obj_list[0]
+
+ # Otherwise, just take it as is
+ else:
+ decoder_obj = decoder_obj_list
+
+ # If lentagname is None, fall back to using the non tagged
+ # stream version
+ if type(lentagname) == str:
+ if(lentagname.lower() == 'none'):
+ lentagname = None
+
+ message_collector_connected=False
+
+ ##anything going through the annihilator needs shifted, uchar vals
+ if fec.get_decoder_input_conversion(decoder_obj) == "uchar" or \
+ fec.get_decoder_input_conversion(decoder_obj) == "packed_bits":
+ self.blocks.append(blocks.multiply_const_ff(48.0))
+
+ if fec.get_shift(decoder_obj) != 0.0:
+ self.blocks.append(blocks.add_const_ff(fec.get_shift(decoder_obj)))
+ elif fec.get_decoder_input_conversion(decoder_obj) == "packed_bits":
+ self.blocks.append(blocks.add_const_ff(128.0))
+
+ if fec.get_decoder_input_conversion(decoder_obj) == "uchar" or \
+ fec.get_decoder_input_conversion(decoder_obj) == "packed_bits":
+ self.blocks.append(blocks.float_to_uchar());
+
+ const_index = 0; #index that corresponds to mod order for specinvert purposes
+
+ if not self.flush:
+ flush = 10000;
+ else:
+ flush = self.flush;
+ if self.ann: #ann and puncpat are strings of 0s and 1s
+ cat = fec.ULLVector();
+ for i in fec.read_big_bitlist(ann):
+ cat.append(i);
+
+ synd_garble = .49
+ idx_list = self.garbletable.keys()
+ idx_list.sort()
+ for i in idx_list:
+ if 1.0/self.ann.count('1') >= i:
+ synd_garble = self.garbletable[i]
+ print 'using syndrom garble threshold ' + str(synd_garble) + 'for conv_bit_corr_bb'
+ print 'ceiling: .0335 data garble rate'
+ self.blocks.append(fec.conv_bit_corr_bb(cat, len(puncpat) - puncpat.count('0'),
+ len(ann), integration_period, flush, synd_garble))
+
+ if self.puncpat != '11':
+ self.blocks.append(fec.depuncture_bb(len(puncpat), read_bitlist(puncpat), 0))
+
+ if fec.get_decoder_input_conversion(decoder_obj) == "packed_bits":
+ self.blocks.append(blocks.uchar_to_float())
+ self.blocks.append(blocks.add_const_ff(-128.0))
+ self.blocks.append(digital.binary_slicer_fb())
+ self.blocks.append(blocks.unpacked_to_packed_bb(1,0))
+
+ else:
+ if(not lentagname):
+ self.blocks.append(fec.decoder(decoder_obj,
+ fec.get_decoder_input_item_size(decoder_obj),
+ fec.get_decoder_output_item_size(decoder_obj)))
+ else:
+ self.blocks.append(fec.tagged_decoder(decoder_obj,
+ fec.get_decoder_input_item_size(decoder_obj),
+ fec.get_decoder_output_item_size(decoder_obj),
+ lentagname))
+
+ if fec.get_decoder_output_conversion(decoder_obj) == "unpack":
+ self.blocks.append(blocks.packed_to_unpacked_bb(1, gr.GR_MSB_FIRST));
+
+ self.connect((self, 0), (self.blocks[0], 0));
+ self.connect((self.blocks[-1], 0), (self, 0));
+
+ for i in range(len(self.blocks) - 1):
+ self.connect((self.blocks[i], 0), (self.blocks[i+1], 0));
diff --git a/gr-fec/python/fec/extended_tagged_encoder.py b/gr-fec/python/fec/extended_tagged_encoder.py
new file mode 100644
index 0000000000..2f78b8e5c9
--- /dev/null
+++ b/gr-fec/python/fec/extended_tagged_encoder.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+
+import fec_swig as fec
+from bitflip import read_bitlist
+
+class extended_tagged_encoder(gr.hier_block2):
+ def __init__(self, encoder_obj_list, puncpat=None, lentagname=None):
+ gr.hier_block2.__init__(self, "extended_tagged_encoder",
+ gr.io_signature(1, 1, gr.sizeof_char),
+ gr.io_signature(1, 1, gr.sizeof_char))
+
+ self.blocks=[]
+ self.puncpat=puncpat
+
+ # If it's a list of encoders, take the first one, unless it's
+ # a list of lists of encoders.
+ if(type(encoder_obj_list) == list):
+ # This block doesn't handle parallelism of > 1
+ # We could just grab encoder [0][0], but we don't want to encourage this.
+ if(type(encoder_obj_list[0]) == list):
+ gr.log.info("fec.extended_tagged_encoder: Parallelism must be 0 or 1.")
+ raise AttributeError
+
+ encoder_obj = encoder_obj_list[0]
+
+ # Otherwise, just take it as is
+ else:
+ encoder_obj = encoder_obj_list
+
+ # If lentagname is None, fall back to using the non tagged
+ # stream version
+ if type(lentagname) == str:
+ if(lentagname.lower() == 'none'):
+ lentagname = None
+
+ if fec.get_encoder_input_conversion(encoder_obj) == "pack":
+ self.blocks.append(blocks.pack_k_bits_bb(8))
+
+ if(not lentagname):
+ self.blocks.append(fec.encoder(encoder_obj,
+ gr.sizeof_char,
+ gr.sizeof_char))
+ else:
+ self.blocks.append(fec.tagged_encoder(encoder_obj,
+ gr.sizeof_char,
+ gr.sizeof_char,
+ lentagname))
+
+ if self.puncpat != '11':
+ self.blocks.append(fec.puncture_bb(len(puncpat), read_bitlist(puncpat), 0))
+
+ # Connect the input to the encoder and the output to the
+ # puncture if used or the encoder if not.
+ self.connect((self, 0), (self.blocks[0], 0));
+ self.connect((self.blocks[-1], 0), (self, 0));
+
+ # If using the puncture block, add it into the flowgraph after
+ # the encoder.
+ for i in range(len(self.blocks) - 1):
+ self.connect((self.blocks[i], 0), (self.blocks[i+1], 0));
diff --git a/gr-fec/python/fec/fec_test.py b/gr-fec/python/fec/fec_test.py
new file mode 100644
index 0000000000..6466a0bcb4
--- /dev/null
+++ b/gr-fec/python/fec/fec_test.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio.fec.bitflip import read_bitlist
+from gnuradio import gr, blocks, analog
+import math
+import sys
+
+if sys.modules.has_key("gnuradio.digital"):
+ digital = sys.modules["gnuradio.digital"]
+else:
+ from gnuradio import digital
+
+from extended_encoder import extended_encoder
+from extended_decoder import extended_decoder
+
+class fec_test(gr.hier_block2):
+
+ def __init__(self, generic_encoder=0, generic_decoder=0, esno=0,
+ samp_rate=3200000, threading="capillary", puncpat='11',
+ seed=0):
+ gr.hier_block2.__init__(self, "fec_test",
+ gr.io_signature(1, 1, gr.sizeof_char*1),
+ gr.io_signature(2, 2, gr.sizeof_char*1))
+
+ self.generic_encoder = generic_encoder
+ self.generic_decoder = generic_decoder
+ self.esno = esno
+ self.samp_rate = samp_rate
+ self.threading = threading
+ self.puncpat = puncpat
+
+ self.map_bb = digital.map_bb(([-1, 1]))
+ self.b2f = blocks.char_to_float(1, 1)
+
+ self.unpack8 = blocks.unpack_k_bits_bb(8)
+ self.pack8 = blocks.pack_k_bits_bb(8)
+
+ self.encoder = extended_encoder(encoder_obj_list=generic_encoder,
+ threading=threading,
+ puncpat=puncpat)
+
+ self.decoder = extended_decoder(decoder_obj_list=generic_decoder,
+ threading=threading,
+ ann=None, puncpat=puncpat,
+ integration_period=10000, rotator=None)
+
+ noise = math.sqrt((10.0**(-esno/10.0))/2.0)
+ #self.fastnoise = analog.fastnoise_source_f(analog.GR_GAUSSIAN, noise, seed, 8192)
+ self.fastnoise = analog.noise_source_f(analog.GR_GAUSSIAN, noise, seed)
+ self.addnoise = blocks.add_ff(1)
+
+ # Send packed input directly to the second output
+ self.copy_packed = blocks.copy(gr.sizeof_char)
+ self.connect(self, self.copy_packed)
+ self.connect(self.copy_packed, (self, 1))
+
+ # Unpack inputl encode, convert to +/-1, add noise, decode, repack
+ self.connect(self, self.unpack8)
+ self.connect(self.unpack8, self.encoder)
+ self.connect(self.encoder, self.map_bb)
+ self.connect(self.map_bb, self.b2f)
+ self.connect(self.b2f, (self.addnoise, 0))
+ self.connect(self.fastnoise, (self.addnoise,1))
+ self.connect(self.addnoise, self.decoder)
+ self.connect(self.decoder, self.pack8)
+ self.connect(self.pack8, (self, 0))
+
+
+ def get_generic_encoder(self):
+ return self.generic_encoder
+
+ def set_generic_encoder(self, generic_encoder):
+ self.generic_encoder = generic_encoder
+
+ def get_generic_decoder(self):
+ return self.generic_decoder
+
+ def set_generic_decoder(self, generic_decoder):
+ self.generic_decoder = generic_decoder
+
+ def get_esno(self):
+ return self.esno
+
+ def set_esno(self, esno):
+ self.esno = esno
+
+ def get_samp_rate(self):
+ return self.samp_rate
+
+ def set_samp_rate(self, samp_rate):
+ self.samp_rate = samp_rate
+
+ def get_threading(self):
+ return self.threading
+
+ def set_threading(self, threading):
+ self.threading = threading
+
+ def get_puncpat(self):
+ return self.puncpat
+
+ def set_puncpat(self, puncpat):
+ self.puncpat = puncpat
diff --git a/gr-fec/python/fec/qa_depuncture.py b/gr-fec/python/fec/qa_depuncture.py
new file mode 100644
index 0000000000..5566e83a25
--- /dev/null
+++ b/gr-fec/python/fec/qa_depuncture.py
@@ -0,0 +1,192 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+import fec_swig as fec
+import blocks_swig as blocks
+from collections import deque
+
+class test_depuncture (gr_unittest.TestCase):
+
+ def depuncture_setup(self):
+ p = []
+ for i in range(self.puncsize):
+ p.append(self.puncpat >> (self.puncsize - 1 - i) & 1)
+ d = deque(p)
+ d.rotate(self.delay)
+ _puncpat = list(d)
+
+ k = 0
+ self.expected = []
+ for n in range(len(self.src_data)/(self.puncsize - self.puncholes)):
+ for i in range(self.puncsize):
+ if _puncpat[i] == 1:
+ self.expected.append(self.src_data[k]);
+ k+=1
+ else:
+ self.expected.append(self.sym)
+
+ def setUp(self):
+ self.src_data = 2000*range(64)
+ self.tb = gr.top_block ()
+
+ def tearDown(self):
+ self.tb = None
+
+ def test_000(self):
+ # Test normal operation of the depuncture block
+
+ self.puncsize = 8
+ self.puncpat = 0xEF
+ self.delay = 0
+ self.sym = 0
+ self.puncholes = 1
+
+ self.depuncture_setup()
+
+ src = blocks.vector_source_b(self.src_data)
+ op = fec.depuncture_bb(self.puncsize, self.puncpat,
+ self.delay, self.sym)
+ dst = blocks.vector_sink_b()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ for i in xrange(len(dst_data)):
+ dst_data[i] = int(dst_data[i])
+
+ self.assertEqual(self.expected, dst_data)
+
+ def test_001(self):
+ # Test normal operation of the depuncture block with a delay
+
+ self.puncsize = 8
+ self.puncpat = 0xEF
+ self.delay = 1
+ self.sym = 0
+ self.puncholes = 1
+
+ self.depuncture_setup()
+
+ src = blocks.vector_source_b(self.src_data)
+ op = fec.depuncture_bb(self.puncsize, self.puncpat,
+ self.delay, self.sym)
+ dst = blocks.vector_sink_b()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ for i in xrange(len(dst_data)):
+ dst_data[i] = int(dst_data[i])
+
+ self.assertEqual(self.expected, dst_data)
+
+ def test_002(self):
+ # Test scenario where we have defined a puncture pattern with
+ # more bits than the puncsize.
+
+ self.puncsize = 4
+ self.puncpat = 0x5555
+ self.delay = 0
+ self.sym = 0
+ self.puncholes = 2
+
+ self.depuncture_setup()
+
+ src = blocks.vector_source_b(self.src_data)
+ op = fec.depuncture_bb(self.puncsize, self.puncpat,
+ self.delay, self.sym)
+ dst = blocks.vector_sink_b()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ for i in xrange(len(dst_data)):
+ dst_data[i] = int(dst_data[i])
+
+ self.assertEqual(self.expected, dst_data)
+
+ def test_003(self):
+ # Test scenario where we have defined a puncture pattern with
+ # more bits than the puncsize with a delay. The python code
+ # doesn't account for this when creating self.expected, but
+ # this should be equivalent to a puncpat of the correct size.
+
+ self.puncsize = 4
+ self.puncpat0 = 0x5555 # too many bits set
+ self.puncpat1 = 0x55 # num bits = puncsize
+ self.delay = 1
+ self.sym = 0
+
+ src = blocks.vector_source_b(self.src_data)
+ op0 = fec.depuncture_bb(self.puncsize, self.puncpat0,
+ self.delay, self.sym)
+ op1 = fec.depuncture_bb(self.puncsize, self.puncpat1,
+ self.delay, self.sym)
+ dst0 = blocks.vector_sink_b()
+ dst1 = blocks.vector_sink_b()
+
+ self.tb.connect(src, op0, dst0)
+ self.tb.connect(src, op1, dst1)
+ self.tb.run()
+
+ dst_data0 = list(dst0.data())
+ for i in xrange(len(dst_data0)):
+ dst_data0[i] = int(dst_data0[i])
+
+ dst_data1 = list(dst1.data())
+ for i in xrange(len(dst_data1)):
+ dst_data1[i] = int(dst_data1[i])
+
+ self.assertEqual(dst_data1, dst_data0)
+
+ def test_004(self):
+ # Test normal operation of the depuncture block without
+ # specifying the fill symbol (defaults to 127).
+
+ self.puncsize = 8
+ self.puncpat = 0xEF
+ self.delay = 0
+ self.sym = 127
+ self.puncholes = 1
+
+ self.depuncture_setup()
+
+ src = blocks.vector_source_b(self.src_data)
+ op = fec.depuncture_bb(self.puncsize, self.puncpat,
+ self.delay)
+ dst = blocks.vector_sink_b()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ for i in xrange(len(dst_data)):
+ dst_data[i] = int(dst_data[i])
+
+ self.assertEqual(self.expected, dst_data)
+
+if __name__ == '__main__':
+ gr_unittest.run(test_depuncture, "test_depuncture.xml")
diff --git a/gr-fec/python/fec/qa_fecapi_cc.py b/gr-fec/python/fec/qa_fecapi_cc.py
new file mode 100644
index 0000000000..bbd500161e
--- /dev/null
+++ b/gr-fec/python/fec/qa_fecapi_cc.py
@@ -0,0 +1,195 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+import fec_swig as fec
+from _qa_helper import _qa_helper
+
+from extended_encoder import extended_encoder
+from extended_decoder import extended_decoder
+
+class test_fecapi_cc(gr_unittest.TestCase):
+
+ def setUp(self):
+ self.tb = gr.top_block()
+
+ def tearDown(self):
+ self.tb = None
+
+ def test_parallelism0_00(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ enc = fec.cc_encoder_make(frame_size*8, k, rate, polys)
+ dec = fec.cc_decoder.make(frame_size*8, k, rate, polys)
+ threading = None
+ self.test = _qa_helper(4*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism0_01(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ enc = fec.cc_encoder_make(frame_size*8, k, rate, polys)
+ dec = fec.cc_decoder.make(frame_size*8, k, rate, polys)
+ threading = 'ordinary'
+ self.test = _qa_helper(5*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism0_02(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ enc = fec.cc_encoder_make(frame_size*8, k, rate, polys)
+ dec = fec.cc_decoder.make(frame_size*8, k, rate, polys)
+ threading = 'capillary'
+ self.test = _qa_helper(5*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_00(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), range(0,1))
+ dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), range(0,1))
+ threading = None
+ self.test = _qa_helper(5*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_01(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), range(0,1))
+ dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), range(0,1))
+ threading = 'ordinary'
+ self.test = _qa_helper(5*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_02(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), range(0,1))
+ dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), range(0,1))
+ threading = 'capillary'
+ self.test = _qa_helper(5*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_03(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ mode = fec.CC_TERMINATED
+ enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+ dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+ threading = 'capillary'
+ self.test = _qa_helper(4*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_04(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ mode = fec.CC_TRUNCATED
+ enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+ dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+ threading = 'capillary'
+ self.test = _qa_helper(4*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_05(self):
+ frame_size = 30
+ k = 7
+ rate = 2
+ polys = [109,79]
+ mode = fec.CC_TAILBITING
+ enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+ dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+ threading = 'capillary'
+ self.test = _qa_helper(4*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_out = self.test.snk_output.data()
+ data_in = self.test.snk_input.data()[0:len(data_out)]
+
+ self.assertEqual(data_in, data_out)
+
+if __name__ == '__main__':
+ gr_unittest.run(test_fecapi_cc, "test_fecapi_cc.xml")
diff --git a/gr-fec/python/fec/qa_fecapi_dummy.py b/gr-fec/python/fec/qa_fecapi_dummy.py
new file mode 100644
index 0000000000..a07890fb84
--- /dev/null
+++ b/gr-fec/python/fec/qa_fecapi_dummy.py
@@ -0,0 +1,190 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+import fec_swig as fec
+from _qa_helper import _qa_helper
+
+from extended_encoder import extended_encoder
+from extended_decoder import extended_decoder
+
+class test_fecapi_dummy(gr_unittest.TestCase):
+
+ def setUp(self):
+ self.tb = gr.top_block()
+
+ def tearDown(self):
+ self.tb = None
+
+ def test_parallelism0_00(self):
+ frame_size = 30
+ enc = fec.dummy_encoder_make(frame_size*8)
+ dec = fec.dummy_decoder.make(frame_size*8)
+ threading = None
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism0_01(self):
+ frame_size = 30
+ enc = fec.dummy_encoder_make(frame_size*8)
+ dec = fec.dummy_decoder.make(frame_size*8)
+ threading = 'ordinary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism0_02(self):
+ frame_size = 30
+ enc = fec.dummy_encoder_make(frame_size*8)
+ dec = fec.dummy_decoder.make(frame_size*8)
+ threading = 'capillary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_00(self):
+ frame_size = 30
+ enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,1))
+ dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,1))
+ threading = None
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_01(self):
+ frame_size = 30
+ enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,1))
+ dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,1))
+ threading = 'ordinary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_02(self):
+ frame_size = 300
+ enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,1))
+ dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,1))
+ threading = 'capillary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_03(self):
+ frame_size = 30
+ dims = 10
+ enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
+ dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
+ threading = 'ordinary'
+ self.test = _qa_helper(dims*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_04(self):
+ frame_size = 30
+ dims = 16
+ enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
+ dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
+ threading = 'capillary'
+ self.test = _qa_helper(dims*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_05(self):
+ frame_size = 30
+ dims = 5
+ enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
+ #dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
+ threading = 'capillary'
+
+ self.assertRaises(AttributeError, lambda: extended_encoder(enc, threading=threading, puncpat="11"))
+
+ def test_parallelism1_06(self):
+ frame_size = 30
+ dims = 5
+ #enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
+ dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
+ threading = 'capillary'
+
+ self.assertRaises(AttributeError, lambda: extended_decoder(dec, threading=threading, puncpat="11"))
+
+ def test_parallelism2_00(self):
+ frame_size = 30
+ dims1 = 16
+ dims2 = 16
+ enc = map((lambda b: map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims1))), range(0,dims2))
+ #dec = map((lambda b: map((lambda a: fec.dummy_decoder_make(frame_size*8)), range(0,dims1))), range(0,dims2))
+ threading = 'capillary'
+
+ self.assertRaises(AttributeError, lambda: extended_encoder(enc, threading=threading, puncpat="11"))
+
+ def test_parallelism2_01(self):
+ frame_size = 30
+ dims1 = 16
+ dims2 = 16
+ dec = map((lambda b: map((lambda a: fec.dummy_decoder_make(frame_size*8)), range(0,dims1))), range(0,dims2))
+ threading = 'capillary'
+
+ self.assertRaises(AttributeError, lambda: extended_decoder(dec, threading=threading, puncpat="11"))
+
+if __name__ == '__main__':
+ gr_unittest.run(test_fecapi_dummy, "test_fecapi_dummy.xml")
diff --git a/gr-fec/python/fec/qa_fecapi_repetition.py b/gr-fec/python/fec/qa_fecapi_repetition.py
new file mode 100644
index 0000000000..7998d61bd1
--- /dev/null
+++ b/gr-fec/python/fec/qa_fecapi_repetition.py
@@ -0,0 +1,161 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+import fec_swig as fec
+from _qa_helper import _qa_helper
+
+from extended_encoder import extended_encoder
+from extended_decoder import extended_decoder
+
+class test_fecapi_repetition(gr_unittest.TestCase):
+
+ def setUp(self):
+ self.tb = gr.top_block()
+
+ def tearDown(self):
+ self.tb = None
+
+ def test_parallelism0_00(self):
+ frame_size = 30
+ rep = 3
+ enc = fec.repetition_encoder_make(frame_size*8, rep)
+ dec = fec.repetition_decoder.make(frame_size*8, rep)
+ threading = None
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism0_01(self):
+ frame_size = 30
+ rep = 3
+ enc = fec.repetition_encoder_make(frame_size*8, rep)
+ dec = fec.repetition_decoder.make(frame_size*8, rep)
+ threading = 'ordinary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism0_02(self):
+ frame_size = 30
+ rep = 3
+ enc = fec.repetition_encoder_make(frame_size*8, rep)
+ dec = fec.repetition_decoder.make(frame_size*8, rep)
+ threading = 'capillary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_00(self):
+ frame_size = 30
+ rep = 3
+ enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,1))
+ dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,1))
+ threading = None
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_01(self):
+ frame_size = 30
+ rep = 3
+ enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,1))
+ dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,1))
+ threading = 'ordinary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_02(self):
+ frame_size = 300
+ rep = 3
+ enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,1))
+ dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,1))
+ threading = 'capillary'
+ self.test = _qa_helper(10*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_03(self):
+ frame_size = 30
+ rep = 3
+ dims = 10
+ enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,dims))
+ dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,dims))
+ threading = 'ordinary'
+ self.test = _qa_helper(dims*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_04(self):
+ frame_size = 30
+ rep = 3
+ dims = 16
+ enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,dims))
+ dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,dims))
+ threading = 'capillary'
+ self.test = _qa_helper(dims*frame_size, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+if __name__ == '__main__':
+ gr_unittest.run(test_fecapi_repetition, "test_fecapi_repetition.xml")
diff --git a/gr-fec/python/fec/qa_puncture.py b/gr-fec/python/fec/qa_puncture.py
new file mode 100644
index 0000000000..fdd15c9a08
--- /dev/null
+++ b/gr-fec/python/fec/qa_puncture.py
@@ -0,0 +1,244 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+import fec_swig as fec
+import blocks_swig as blocks
+from collections import deque
+
+class test_puncture (gr_unittest.TestCase):
+
+ def puncture_setup(self):
+ p = []
+ for i in range(self.puncsize):
+ p.append(self.puncpat >> (self.puncsize - 1 - i) & 1)
+ d = deque(p)
+ d.rotate(self.delay)
+ _puncpat = list(d)
+
+ self.expected = []
+ for n in range(len(self.src_data)/self.puncsize):
+ for i in range(self.puncsize):
+ if _puncpat[i] == 1:
+ self.expected.append(self.src_data[n*self.puncsize+i]);
+
+ def setUp(self):
+ self.src_data = 10000*range(64)
+ self.tb = gr.top_block()
+
+ def tearDown(self):
+ self.tb = None
+
+ def test_000(self):
+ # Test normal operation of the puncture block
+
+ self.puncsize = 8
+ self.puncpat = 0xEF
+ self.delay = 0
+
+ self.puncture_setup()
+
+ src = blocks.vector_source_b(self.src_data)
+ op = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
+ dst = blocks.vector_sink_b()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ for i in xrange(len(dst_data)):
+ dst_data[i] = int(dst_data[i])
+
+ self.assertEqual(self.expected, dst_data)
+
+
+ def test_001(self):
+ # Test normal operation of the puncture block with a delay
+
+ self.puncsize = 8
+ self.puncpat = 0xEE
+ self.delay = 1
+
+ self.src_data = range(16)
+
+ self.puncture_setup()
+
+ src = blocks.vector_source_b(self.src_data)
+ op = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
+ dst = blocks.vector_sink_b()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ for i in xrange(len(dst_data)):
+ dst_data[i] = int(dst_data[i])
+
+ self.assertEqual(self.expected, dst_data)
+
+
+ def test_002(self):
+ # Test scenario where we have defined a puncture pattern with
+ # more bits than the puncsize.
+
+ self.puncsize = 4
+ self.puncpat = 0x5555
+ self.delay = 0
+
+ self.puncture_setup()
+
+ src = blocks.vector_source_b(self.src_data)
+ op = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
+ dst = blocks.vector_sink_b()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ for i in xrange(len(dst_data)):
+ dst_data[i] = int(dst_data[i])
+
+ self.assertEqual(self.expected, dst_data)
+
+ def test_003(self):
+ # Test scenario where we have defined a puncture pattern with
+ # more bits than the puncsize with a delay. The python code
+ # doesn't account for this when creating self.expected, but
+ # this should be equivalent to a puncpat of the correct size.
+
+ self.puncsize = 4
+ self.puncpat0 = 0x5555 # too many bits set
+ self.puncpat1 = 0x55 # num bits = puncsize
+ self.delay = 1
+
+ src = blocks.vector_source_b(self.src_data)
+ op0 = fec.puncture_bb(self.puncsize, self.puncpat0, self.delay)
+ op1 = fec.puncture_bb(self.puncsize, self.puncpat1, self.delay)
+ dst0 = blocks.vector_sink_b()
+ dst1 = blocks.vector_sink_b()
+
+ self.tb.connect(src, op0, dst0)
+ self.tb.connect(src, op1, dst1)
+ self.tb.run()
+
+ dst_data0 = list(dst0.data())
+ for i in xrange(len(dst_data0)):
+ dst_data0[i] = int(dst_data0[i])
+
+ dst_data1 = list(dst1.data())
+ for i in xrange(len(dst_data1)):
+ dst_data1[i] = int(dst_data1[i])
+
+ self.assertEqual(dst_data1, dst_data0)
+
+
+
+ def test_f_000(self):
+ # Test normal operation of the float puncture block
+
+ self.puncsize = 8
+ self.puncpat = 0xEF
+ self.delay = 0
+
+ self.puncture_setup()
+
+ src = blocks.vector_source_f(self.src_data)
+ op = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
+ dst = blocks.vector_sink_f()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ self.assertEqual(self.expected, dst_data)
+
+
+ def test_f_001(self):
+ # Test normal operation of the puncture block with a delay
+
+ self.puncsize = 8
+ self.puncpat = 0xEE
+ self.delay = 1
+
+ self.src_data = range(16)
+
+ self.puncture_setup()
+
+ src = blocks.vector_source_f(self.src_data)
+ op = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
+ dst = blocks.vector_sink_f()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ self.assertEqual(self.expected, dst_data)
+
+
+ def test_f_002(self):
+ # Test scenariou where we have defined a puncture pattern with
+ # more bits than the puncsize.
+
+ self.puncsize = 4
+ self.puncpat = 0x5555
+ self.delay = 0
+
+ self.puncture_setup()
+
+ src = blocks.vector_source_f(self.src_data)
+ op = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
+ dst = blocks.vector_sink_f()
+
+ self.tb.connect(src, op, dst)
+ self.tb.run()
+
+ dst_data = list(dst.data())
+ self.assertEqual(self.expected, dst_data)
+
+ def test_f_003(self):
+ # Test scenariou where we have defined a puncture pattern with
+ # more bits than the puncsize with a delay. The python code
+ # doesn't account for this when creating self.expected, but
+ # this should be equivalent to a puncpat of the correct size.
+
+ self.puncsize = 4
+ self.puncpat0 = 0x5555 # too many bits set
+ self.puncpat1 = 0x55 # num bits = puncsize
+ self.delay = 1
+
+ src = blocks.vector_source_f(self.src_data)
+ op0 = fec.puncture_ff(self.puncsize, self.puncpat0, self.delay)
+ op1 = fec.puncture_ff(self.puncsize, self.puncpat1, self.delay)
+ dst0 = blocks.vector_sink_f()
+ dst1 = blocks.vector_sink_f()
+
+ self.tb.connect(src, op0, dst0)
+ self.tb.connect(src, op1, dst1)
+ self.tb.run()
+
+ dst_data0 = list(dst0.data())
+ dst_data1 = list(dst1.data())
+
+ self.assertEqual(dst_data1, dst_data0)
+
+if __name__ == '__main__':
+ gr_unittest.run(test_puncture, "test_puncture.xml")
diff --git a/gr-fec/python/fec/threaded_decoder.py b/gr-fec/python/fec/threaded_decoder.py
new file mode 100644
index 0000000000..115ad7b5d3
--- /dev/null
+++ b/gr-fec/python/fec/threaded_decoder.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+import fec_swig as fec
+
+class threaded_decoder(gr.hier_block2):
+ def __init__(self, decoder_list_0, input_size, output_size):
+ gr.hier_block2.__init__(
+ self, "Threaded Decoder",
+ gr.io_signature(1, 1, input_size*1),
+ gr.io_signature(1, 1, output_size*1))
+
+ self.decoder_list_0 = decoder_list_0
+
+ self.deinterleave_0 = blocks.deinterleave(input_size,
+ fec.get_decoder_input_size(decoder_list_0[0]))
+
+ self.generic_decoders_0 = []
+ for i in range(len(decoder_list_0)):
+ self.generic_decoders_0.append(fec.decoder(decoder_list_0[i],
+ input_size, output_size))
+
+ self.interleave_0 = blocks.interleave(output_size,
+ fec.get_decoder_output_size(decoder_list_0[0]))
+
+ for i in range(len(decoder_list_0)):
+ self.connect((self.deinterleave_0, i), (self.generic_decoders_0[i], 0))
+
+ for i in range(len(decoder_list_0)):
+ self.connect((self.generic_decoders_0[i], 0), (self.interleave_0, i))
+
+
+ self.connect((self, 0), (self.deinterleave_0, 0))
+ self.connect((self.interleave_0, 0), (self, 0))
+
+ def get_decoder_list_0(self):
+ return self.decoder_list_0
+
+ def set_decoder_list_0(self, decoder_list_0):
+ self.decoder_list_0 = decoder_list_0
diff --git a/gr-fec/python/fec/threaded_encoder.py b/gr-fec/python/fec/threaded_encoder.py
new file mode 100644
index 0000000000..391baa5442
--- /dev/null
+++ b/gr-fec/python/fec/threaded_encoder.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, blocks
+import fec_swig as fec
+
+class threaded_encoder(gr.hier_block2):
+ def __init__(self, encoder_list_0, input_size, output_size):
+ gr.hier_block2.__init__(
+ self, "Threaded Encoder",
+ gr.io_signature(1, 1, input_size*1),
+ gr.io_signature(1, 1, output_size*1))
+
+ self.encoder_list_0 = encoder_list_0
+
+ self.fec_deinterleave_0 = blocks.deinterleave(input_size,
+ fec.get_encoder_input_size(encoder_list_0[0]))
+
+ self.generic_encoders_0 = [];
+ for i in range(len(encoder_list_0)):
+ self.generic_encoders_0.append(fec.encoder(encoder_list_0[i],
+ input_size, output_size))
+
+ self.fec_interleave_0 = blocks.interleave(output_size,
+ fec.get_encoder_output_size(encoder_list_0[0]))
+
+ for i in range(len(encoder_list_0)):
+ self.connect((self.fec_deinterleave_0, i), (self.generic_encoders_0[i], 0))
+
+ for i in range(len(encoder_list_0)):
+ self.connect((self.generic_encoders_0[i], 0), (self.fec_interleave_0, i))
+
+ self.connect((self, 0), (self.fec_deinterleave_0, 0))
+ self.connect((self.fec_interleave_0, 0), (self, 0))
+
+ def get_encoder_list_0(self):
+ return self.encoder_list_0
+
+ def set_encoder_list_0(self, encoder_list_0):
+ self.encoder_list_0 = encoder_list_0
diff --git a/gr-fec/swig/fec_swig.i b/gr-fec/swig/fec_swig.i
index 62bb767f22..8ad845fd1c 100644
--- a/gr-fec/swig/fec_swig.i
+++ b/gr-fec/swig/fec_swig.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2012 Free Software Foundation, Inc.
+ * Copyright 2012,2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,13 +27,72 @@
//load generated python docstrings
%include "fec_swig_doc.i"
+%include "gnuradio/fec/cc_common.h"
+
+%nodefaultctor gr::fec::generic_encoder;
+%template(generic_encoder_sptr) boost::shared_ptr<gr::fec::generic_encoder>;
+
+%nodefaultctor gr::fec::generic_decoder;
+%template(generic_decoder_sptr) boost::shared_ptr<gr::fec::generic_decoder>;
+
%{
+#include "gnuradio/fec/generic_decoder.h"
+#include "gnuradio/fec/generic_encoder.h"
+#include "gnuradio/fec/decoder.h"
+#include "gnuradio/fec/encoder.h"
+#include "gnuradio/fec/tagged_decoder.h"
+#include "gnuradio/fec/tagged_encoder.h"
+#include "gnuradio/fec/async_decoder.h"
+#include "gnuradio/fec/async_encoder.h"
+#include "gnuradio/fec/cc_decoder.h"
+#include "gnuradio/fec/cc_encoder.h"
+#include "gnuradio/fec/ccsds_encoder.h"
+#include "gnuradio/fec/dummy_decoder.h"
+#include "gnuradio/fec/dummy_encoder.h"
+#include "gnuradio/fec/repetition_decoder.h"
+#include "gnuradio/fec/repetition_encoder.h"
#include "gnuradio/fec/decode_ccsds_27_fb.h"
#include "gnuradio/fec/encode_ccsds_27_bb.h"
+#include "gnuradio/fec/ber_bf.h"
+#include "gnuradio/fec/conv_bit_corr_bb.h"
+#include "gnuradio/fec/puncture_bb.h"
+#include "gnuradio/fec/puncture_ff.h"
+#include "gnuradio/fec/depuncture_bb.h"
%}
+%include "gnuradio/fec/generic_decoder.h"
+%include "gnuradio/fec/generic_encoder.h"
+%include "gnuradio/fec/decoder.h"
+%include "gnuradio/fec/encoder.h"
+%include "gnuradio/fec/tagged_decoder.h"
+%include "gnuradio/fec/tagged_encoder.h"
+%include "gnuradio/fec/async_decoder.h"
+%include "gnuradio/fec/async_encoder.h"
+%include "gnuradio/fec/cc_decoder.h"
+%include "gnuradio/fec/cc_encoder.h"
+%include "gnuradio/fec/ccsds_encoder.h"
+%include "gnuradio/fec/dummy_decoder.h"
+%include "gnuradio/fec/dummy_encoder.h"
+%include "gnuradio/fec/repetition_decoder.h"
+%include "gnuradio/fec/repetition_encoder.h"
%include "gnuradio/fec/decode_ccsds_27_fb.h"
%include "gnuradio/fec/encode_ccsds_27_bb.h"
+%include "gnuradio/fec/ber_bf.h"
+%include "gnuradio/fec/conv_bit_corr_bb.h"
+%include "gnuradio/fec/puncture_bb.h"
+%include "gnuradio/fec/puncture_ff.h"
+%include "gnuradio/fec/depuncture_bb.h"
+GR_SWIG_BLOCK_MAGIC2(fec, decoder);
+GR_SWIG_BLOCK_MAGIC2(fec, encoder);
+GR_SWIG_BLOCK_MAGIC2(fec, tagged_decoder);
+GR_SWIG_BLOCK_MAGIC2(fec, tagged_encoder);
+GR_SWIG_BLOCK_MAGIC2(fec, async_decoder);
+GR_SWIG_BLOCK_MAGIC2(fec, async_encoder);
GR_SWIG_BLOCK_MAGIC2(fec, decode_ccsds_27_fb);
GR_SWIG_BLOCK_MAGIC2(fec, encode_ccsds_27_bb);
+GR_SWIG_BLOCK_MAGIC2(fec, ber_bf);
+GR_SWIG_BLOCK_MAGIC2(fec, conv_bit_corr_bb);
+GR_SWIG_BLOCK_MAGIC2(fec, puncture_bb);
+GR_SWIG_BLOCK_MAGIC2(fec, puncture_ff);
+GR_SWIG_BLOCK_MAGIC2(fec, depuncture_bb);