Difference between revisions of "FEC Async Encoder"

From GNU Radio
Jump to: navigation, search
 
Line 1: Line 1:
 
[[Category:Block Docs]]
 
[[Category:Block Docs]]
[[Category:Stub Docs]]
+
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 is the template for the [[:Category:Block_Docs|"Page-per-block Docs"]].  This first section should describe what the block does and how to use it, using however many paragraphs necessaryNote that the title of the wiki page should match the block's name in GRC, i.e. the one defined in the block's .grc file.  Look at the [[FFT]] Block for a good example.
+
   
 
+
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 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.
As this is a basic template, it's also in the [[:Category:Stub_Docs|"Stub Docs category"]]. Please improve it.
+
   
 +
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 rev_unpack and 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.
  
 
== Parameters ==
 
== Parameters ==
  
 
; Encoder Obj.
 
; Encoder Obj.
: Description of parameter, provide any tips or recommended values.  Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
+
: An FECAPI encoder object child of the generic_encoder class.
  
 
; MTU (bytes)
 
; MTU (bytes)
: blah blah blah
+
: The Maximum Transmission Unit (MTU) of the input frame that the block will be able to process. Specified in bytes and defaults to 1500.
  
 
; Packed
 
; Packed
:  
+
: True if working on packed bytes (like PDUs).
  
 
; Rev. Unpacking
 
; Rev. Unpacking
:  
+
: Reverse the unpacking order from input bytes to bits.
  
 
; Rev. Packing
 
; Rev. Packing
:  
+
: Reverse the packing order from bits to output bytes.
  
 
== Example Flowgraph ==
 
== Example Flowgraph ==
Line 29: Line 32:
  
 
; C++ files
 
; C++ files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-fec/lib/async_encoder_impl.cc]
  
 
; Header files
 
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-fec/lib/async_encoder_impl.h]
  
 
; Public header files
 
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-fec/include/gnuradio/fec/async_encoder.h]
  
 
; Block definition
 
; Block definition
 
: [https://github.com/gnuradio/gnuradio/blob/master/gr-fec/grc/fec_async_encoder.block.yml]
 
: [https://github.com/gnuradio/gnuradio/blob/master/gr-fec/grc/fec_async_encoder.block.yml]

Latest revision as of 08:49, 12 September 2019

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 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 rev_unpack and 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.

Parameters

Encoder Obj.
An FECAPI encoder object child of the generic_encoder class.
MTU (bytes)
The Maximum Transmission Unit (MTU) of the input frame that the block will be able to process. Specified in bytes and defaults to 1500.
Packed
True if working on packed bytes (like PDUs).
Rev. Unpacking
Reverse the unpacking order from input bytes to bits.
Rev. Packing
Reverse the packing order from bits to output bytes.

Example Flowgraph

Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.

Source Files

C++ files
[1]
Header files
[2]
Public header files
[3]
Block definition
[4]