What is the need for two types of work functions in a block(work and
general_work). Can’t we do that behavioral with single work function?.
there any particular reason behind that.
-----BEGIN PGP SIGNED MESSAGE-----
yes, referring to the introductory tutorials I can explain:
gr::block, the mother of all blocks that can process samples, has
general_work. That gets called to process samples, but does not make
any guarantees about the ratio of the numbers of input- and output
items, so you need to call consume() yourself to tell GNU Radio how
many input items you consumed to produce your output.
work is the function of a block that has a defined ratio between the
numbers of in- and output items (gr::sync_block and derived types,
which itself is a subclass of gr::block),
which “wraps” the functionality to alleviate the need to call
consume() yourself, since from the number of items a sync block
produced you directly know how many it consumed.
So, no, by choice of design we can’t have the same behaviour with a
Hope that was helpful!
On 07.02.2014 12:26, Siva Krishna wrote:
Hi, What is the need for two types of work functions in a
block(work and general_work). Can’t we do that behavioral with
single work function?. Is there any particular reason behind that.
mailing list [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----