GNU Radio 4.0 OOT Module Porting Guide: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Created page with "== Porting Guide for 4.0 Out of Tree Modules == '''Right now this is a placeholder with a series of notes and reminders, and not an actual porting guide''' === Zero Item Size Blocks === * Head * Copy * Null Source * Null Sink The parameter for item size has been moved to the end, and defaults to 0. This means the item size will be deduced from the connection of the previous block. To make a block with a deduced item size, you need to get the size of items from the...")
(No difference)

Revision as of 13:11, 13 October 2022

Porting Guide for 4.0 Out of Tree Modules

Right now this is a placeholder with a series of notes and reminders, and not an actual porting guide

Zero Item Size Blocks

  • Head
  • Copy
  • Null Source
  • Null Sink

The parameter for item size has been moved to the end, and defaults to 0. This means the item size will be deduced from the connection of the previous block.

To make a block with a deduced item size, you need to get the size of items from the buffer object in the work function

work(work_io& wio) { ... auto size = wio.outputs()[0].n_items * wio.outputs()[0].buf().item_size(); ... }