Hi Marcus,
Do you mean that I only performed assignment operations on out_items[0][1] to
out_items[0][9], and I did not perform any operations on other out_items[0][i],
and then reported to GNURadio? ?
I observed the performance of "QT GUI Time sink", which is a graph resembling a
rectangular signal, which seems understandable because I assigned a value of
0.5 to out_items[0][1] to out_items[0][9]. As time goes by, the rectangular
signal moves to the right. If you look more closely, the width of the
rectangular signal has actually changed! I really don't understand.
Please forgive me for being stupid, but hope someone can help me explain it in
detail.
Sincerely
Liu Maolin
------------------ ???????? ------------------
??????:
"Marcus M??ller"
<[email protected]>;
????????: 2021??6??23??(??????) ????8:26
??????: "discuss-gnuradio"<[email protected]>;
????: Re: the out_items of python block?
Hi liumaolin,
> def work(self, input_items, output_items):
> """example: multiply with constant"""
> for i in range(10) :
You can't do that: you need to make sure you've got at least 10 output items to
fill!
> return len(output_items[0])
Here you tell GNU Radio that you produced `len(output_items[0])` items, where
in reality
you produced 10, which might (and will) be less or more than
`len(output_items[0])`!
Best regards,
Marcus