discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: the out_items of python block?


From: Marcus Müller
Subject: Re: the out_items of python block?
Date: Wed, 23 Jun 2021 14:26:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Hi liumaolin,

> ?0?2?0?2?0?2 def work(self, input_items, output_items):
> ?0?2?0?2?0?2?0?2?0?2?0?2?0?2 """example: multiply with constant"""
> ?0?2?0?2?0?2?0?2?0?2?0?2?0?2 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



reply via email to

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