Difference between revisions of "Default Header Format Obj."

From GNU Radio
Jump to: navigation, search
(Created page with "Category:Block Docs Category:Stub Docs This is the template for the "Page-per-block Docs". This first section should describe what the block...")
 
(bits per symbol not bits/sec)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
[[Category:Block Docs]]
 
[[Category:Block Docs]]
[[Category:Stub Docs]]
+
Default header formatter for PDU formatting. Used to handle the default packet header.
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 necessary.  Note 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.
 
  
As this is a basic template, it's also in the [[:Category:Stub_Docs|"Stub Docs category"]]. Please improve it.
+
See the parent class header_format_base for details of how these classes operate.
 +
 
 +
The default header created in this base class consists of an access code and the packet length. The length is encoded as a 16-bit value repeated twice:
 +
 
 +
  | access code | hdr | payload |
 +
 
 +
Where the access code is <= 64 bits and hdr is:
 +
 
 +
  |  0 -- 15 | 16 -- 31 |
 +
  | pkt len  | pkt len  |
 +
 
 +
The access code and header are formatted for network byte order.
 +
 
 +
This header generator does not calculate or append a CRC to the packet. Use the CRC32 Async block for that before adding the header. The header's length will then measure the payload plus the CRC length (4 bytes for a CRC32).
 +
 
 +
The default header parser produces a PMT dictionary that contains the following keys. All formatter blocks MUST produce these two values in any dictionary.
 +
 
 +
See [https://www.gnuradio.org/doc/doxygen/classgr_1_1digital_1_1header__format__default.html] for more info.
  
 
== Parameters ==
 
== Parameters ==
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
+
; Access Code
 +
: An access code that is used to find and synchronize the start of a packet. Used in the parser and in other blocks like a corr_est block that helps trigger the receiver. Can be up to 64-bits long.  
  
; Param 1 (''R'')
+
; Threshold
: 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).
+
: How many bits can be wrong in the access code and still count as correct.  
  
; Param 2
+
; Payload Bits per Symbol
: blah blah blah
+
: The number of bits per symbol used in the payload's modulator.
  
 
== Example Flowgraph ==
 
== Example Flowgraph ==

Latest revision as of 23:07, 9 October 2020

Default header formatter for PDU formatting. Used to handle the default packet header.

See the parent class header_format_base for details of how these classes operate.

The default header created in this base class consists of an access code and the packet length. The length is encoded as a 16-bit value repeated twice:

 | access code | hdr | payload |

Where the access code is <= 64 bits and hdr is:

 |  0 -- 15 | 16 -- 31 |
 | pkt len  | pkt len  |

The access code and header are formatted for network byte order.

This header generator does not calculate or append a CRC to the packet. Use the CRC32 Async block for that before adding the header. The header's length will then measure the payload plus the CRC length (4 bytes for a CRC32).

The default header parser produces a PMT dictionary that contains the following keys. All formatter blocks MUST produce these two values in any dictionary.

See [1] for more info.

Parameters[edit]

Access Code
An access code that is used to find and synchronize the start of a packet. Used in the parser and in other blocks like a corr_est block that helps trigger the receiver. Can be up to 64-bits long.
Threshold
How many bits can be wrong in the access code and still count as correct.
Payload Bits per Symbol
The number of bits per symbol used in the payload's modulator.

Example Flowgraph[edit]

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[edit]

C++ files
TODO
Header files
TODO
Public header files
TODO
Block definition
TODO