[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to set minimum noutput_items for python custom blocks
From: |
krono86 |
Subject: |
How to set minimum noutput_items for python custom blocks |
Date: |
Mon, 11 Jul 2022 17:24:04 +0200 |
Hello guys!
I'm trying to implement a python custom (general) block with the following in/out signature:
- in_sig=[(np.complex64, M)]
- out_sig=[np.complex64]
The block has three parameters: M, N and L.
The idea is to get 2D frames (N,M), do some signal processing, and output N*M+L serial samples for each frame.
I'm managing the input buffer using the following forecast function:
def forecast(self, noutput_items, ninputs):
noutput_frames = noutput_items//(self.M*self.N+self.L)
ninput_items_required = [noutput_frames*self.N]
return ninput_items_required
The problem I have is to force noutput_items greater or equal to N*M+L.
I tried self.set_min_noutput_items(N*M+L) running raises the following error:
self.set_min_noutput_items(N*M+L)
File "/usr/lib/python3/dist-packages/gnuradio/gr/gateway.py", line 129, in __getattr__
if not hasattr(self, "gateway"):
File "/usr/lib/python3/dist-packages/gnuradio/gr/gateway.py", line 129, in __getattr__
if not hasattr(self, "gateway"):
File "/usr/lib/python3/dist-packages/gnuradio/gr/gateway.py", line 129, in __getattr__
if not hasattr(self, "gateway"):
[Previous line repeated 494 more times]
RecursionError: maximum recursion depth exceeded
Is it possible to set minimum noutput_items also for python blocks?
Thanks a lot.
Ivan
Voucher MISE per P.IVA e PMI: fino a 2500€ per la Banda Ultralarga. https://casa.tiscali.it/promo/?u=https://promozioni.tiscali.it/voucher_business/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to set minimum noutput_items for python custom blocks,
krono86 <=