Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udp fix #7

Merged
merged 6 commits into from Oct 15, 2021
Merged

Udp fix #7

merged 6 commits into from Oct 15, 2021

Conversation

jwmelto
Copy link
Contributor

@jwmelto jwmelto commented Sep 17, 2021

This change is not backwards-compatible. It will break any existing code.

Key aspect of this change is to inherit from gr::block. Also the work function (now general_work) was updated based on a better understanding of the GNU Radio scheduler. Finally, removed the virtual inheritance from the interface class; this caused a very subtle bug and adds no practical value.

For sources that provide sequence numbers, this change detects dropped packets and inserts null samples to keep the data in alignment. Practically, this should almost never happen, if the kernel is properly tuned with sufficient buffer space. It has been observed near start-up; there may yet be an issue with initialization

I've also observed a reported (tagged) sample rate of 250(!). I don't know where that comes from, but it quickly switches back to a correct sample rate.

I noticed the files I modified don't have a proper copyright statement. You might want to update that?

I added the .clang-format file from GNU Radio, thinking it's reasonable to be consistent with that project. Only my modified files were re-formatted.

I've tested with the NDR-358, and the tags are on the proper packets.

According to willcode4, sources and sinks should inherit from gr::block
Also, the work() function (or general_work() in this case) is expected
to block until the requested number of items are available.

This implementation sets an output_multiple so that it is only called
when a whole packet can be consumed. For formats that support it,
dropped packet detection is implemented by inserted null samples for
each missing packet.
For some reason, the "Base" ctor wasn't calling the right gr::block ctor, so it failed miserably
@jwmelto jwmelto marked this pull request as ready for review September 28, 2021 22:30
@crs-bs crs-bs merged commit 4a92086 into CyberRadio:maint-3.8 Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants