See https://github.com/CyberRadio/gr-cyberradio/blob/maint-3.10_timestamp_check/gr-CyberRadio/lib/vita_udp_rx_impl.cc for a different radio. It’s a similar concept; packets are tagged with a rolling 1-nibble counter. The block is written such that it is guaranteed that it can provide at least one full packet (1024 samples) whenever it is called. The packet counter is checked for sequential increment; if one or more dropped packets is detected, it produces null bytes in their place.
This works because this interface has a fixed packet size. It’s harder if your block does not.
---
Jim Melton
Sent: Wednesday, April 5, 2023 16:40
To: GNURadio Mailing List <discuss-gnuradio@gnu.org>
Subject: [EXTERNAL] Question on dropped samples
I was working on a block that I thought was going to be super simple, but have now realized that there are a lot of little corner cases that make it tougher than first glance.
Basically, I want to fill in the dropped samples in a stream. So if I happen to have a usrp stream and get a new tag, and I realize that 6 samples were lost, I would like to stuff 6 dummy samples into place, and adjust the downstream tags accordingly.
It isn't "hard", but knowing that you have x samples in your work function, that you have y samples dropped, stuffing those in, but making sure that you don't put more samples than noutput can handle, and then adjusting all future tags accordingly starts to become a lesson in records management.
Does anyone know of something out there that already does this? Or maybe how I am way overcomplicating it.
No comments:
Post a Comment