[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

?????? the out_items of python block?

From: ????????
Subject: ?????? the out_items of python block?
Date: Thu, 24 Jun 2021 09:49:14 +0800

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.
Liu Maolin

------------------ ???????? ------------------
??????: "Marcus M??ller" <mmueller@gnuradio.org>;
????????: 2021??6??23??(??????) ????8:26
??????: "discuss-gnuradio"<discuss-gnuradio@gnu.org>;
????: 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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]