|
From: | Activecat |
Subject: | Re: [Discuss-gnuradio] Should return the number of input or the number of output? |
Date: | Sun, 4 May 2014 09:49:30 +0800 |
OK, I admit I was unclear. Let's try from scratch:
- The return function from work() or general_work() is the amount of
items that were *produced*.
- In a sync block, the number of items produced is the number of items
consumed, so we can use that to save the developer from manually
consuming(). In other words, in a sync block, the return value is *both*
the number of produced and consumed items.
- Sinks and sources are syncs, therefore the mechanic is always the same.
- Sinks are a special case because they don't produce anything. However,
the scheduler knows the block's io signature, and knows what to do. The
consume/produce mechanic stays the same, for consistency's sake, as with
all other sync blocks.
Hope this clears things up!
M
[Prev in Thread] | Current Thread | [Next in Thread] |