Hello GNURadioers!
I’ve been working with GNURadio since about one year ago. I just figured
out the following limitation of GNURadio’s framework that I want to
diacuss
them to clarify whether I’m wrong or not:
1- For general blocks with multiple output ports, there is a problem
with
the amount of producing items when the general work routine just gives
you
the “maximum” available number of output items for all output ports, and
also set_output_multiple or other functions like set_alignment dealing
with
all output ports rather than individual ones. So if one wants to produce
items on the output ports with large different numbers, such as 100
items
on one port and 2000 items on the other one, the scheduler will fail to
manage this high “diverse” ports.
2- The scheduler jumps through different blocks before finishing the
work
routine’s job which causes some problems. For example, consider the
below
code which is placed somewhere in the work (general_work ):
“”"""""""""""""""
memcpy (out, temp, n_out_produced * sizeof(gr_complex);
produce(0, n_out_produced);
add_item_tag(0, nitems_written(0), … , … );
“”"""""""""""""""
So if we change the order of the code like this:
“”"""""""""""""""
memcpy (out, temp, n_out_produced * sizeof(gr_complex);
add_item_tag(0, nitems_written(0), … , … );
produce(0, n_out_produced);
“”"""""""""""""""
In the second case there is no problem with tagging process, although in
the first case the scheduler may jump out of this block right after
calling
produce function, so the position of the tagging which is "
nitems_written(0)" will change to the new value. Suppose in the next
call
to the first code, after calling produce function, the add_item_tag is
called and the item is tagged on “nitems_written(0)” position which is
the
same as the previous call. So these two consecutive tags are placed on
the
same position in the stream. Why is this happening? This is just because
before finishing the job of this work routine, scheduler jumps somewhere
else.
Please help me find the rational reason!
Thanks in advance,
Alizadeh