discuss-gnuradio
[Top][All Lists]
Advanced

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

Number of samples processed in the work function


From: Perkins, Daniel (US)
Subject: Number of samples processed in the work function
Date: Tue, 28 Jun 2022 16:44:56 +0000

I have written a source block that reads an IQ data stream from a socket. 

It is my understanding that:

  • the work function should attempt to process the number of samples as determined by the noutput_items variable
  • processing fewer samples is acceptable
  • processing more samples is not recommended

 

My socket packets contain a fixed number of samples so to avoid an extra memory transfer, I prefer to copy straight from the socket buffer directly to the output buffer with a volk function.  To make this work, I need to return that number (1024) of samples from the work function which sometimes violates the “processing more samples” rule.  However, this seems to work without any issues and only the occasional dropped UDP frame.  I can also manipulate what GNU Radio will assign to noutput_items by calling  set_min_noutput_items.  When I set the min nouput_items to the size of my payload, I get a bunch of underruns.  What is the optimal way to deal with this?


reply via email to

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