Editing Tagged Stream Blocks

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 43: Line 43:
 
Here's a minimal example of how the header file could look:
 
Here's a minimal example of how the header file could look:
  
<syntaxhighlight lang="cpp">
 
 
  #include <gnuradio/digital/api.h>
 
  #include <gnuradio/digital/api.h>
 
  #include <gnuradio/tagged_stream_block.h>  
 
  #include <gnuradio/tagged_stream_block.h>  
Line 60: Line 59:
 
   } // namespace digital
 
   } // namespace digital
 
  } // namespace gr
 
  } // namespace gr
</syntaxhighlight>
 
  
 
It is very similar to any other block definition. Two things are stand out: First,
 
It is very similar to any other block definition. Two things are stand out: First,
Line 72: Line 70:
 
The implementation header (*_impl.h) also looks a bit different (again this is cropped to the relevant parts):
 
The implementation header (*_impl.h) also looks a bit different (again this is cropped to the relevant parts):
  
 
<syntaxhighlight lang="cpp">
 
 
  #include <digital/crc32_bb.h>
 
  #include <digital/crc32_bb.h>
 
  namespace gr {
 
  namespace gr {
Line 93: Line 89:
 
   } // namespace digital
 
   } // namespace digital
 
  } // namespace gr
 
  } // namespace gr
</syntaxhighlight>
 
  
 
First, the work function signature is new. The argument list looks like that from
 
First, the work function signature is new. The argument list looks like that from
Line 109: Line 104:
 
Finally, this is part of the actual block implementation (heavily cropped again, to highlight the relevant parts):
 
Finally, this is part of the actual block implementation (heavily cropped again, to highlight the relevant parts):
  
 
<syntaxhighlight lang="cpp">
 
 
  #include <gnuradio/io_signature.h>
 
  #include <gnuradio/io_signature.h>
 
  #include "crc32_bb_impl.h"
 
  #include "crc32_bb_impl.h"
Line 158: Line 151:
 
   } // namespace digital
 
   } // namespace digital
 
  } // namespace gr
 
  } // namespace gr
</syntaxhighlight>
 
  
 
The make function is not different to any other block. The constructor calls
 
The make function is not different to any other block. The constructor calls

Please note that all contributions to GNU Radio are considered to be released under the Creative Commons Attribution-ShareAlike (see GNU Radio:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)