[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] My custom GRC block outputs thousands of unwanted NUL
Jeffrey M. Rose
[Discuss-gnuradio] My custom GRC block outputs thousands of unwanted NULL characters - what am I doing wrong?
Fri, 1 Feb 2019 17:43:04 +0000 (UTC)
I’m a GNU Radio/GRC newbie so forgive me if my question sounds too simple.
I wrote a custom GRC block called gensup_ff that receives a stream of “0” and
“1” characters and is supposed to output a stream of of only the “1” characters
In my flowgraph, I have a file sink that sinks these “1” characters into a
However, when I open the file, not only does it have the “1” characters but it
has thousands of unwanted NULL characters, too.
In short, this sink file grows very big, very fast because of all the NULL
characters it’s getting from gensup_ff, which is a problem.
Again, I only want to sink the “1” characters (not all those NULL characters).
You can see my flowgraph attached.
You can also see my custom GRC block source code, which includes the
Maybe my general_work() function is incorrect (somehow passing a bunch of NULL
characters) but I just don’t know.
I have extensively studied the on-line documentation for creating custom blocks
but I’m a little confused about exactly what values to return and the use of
consume() and produce(). Sorry, it’s not clear to me.
Can someone please correct my source code or flowgraph or otherwise advise me
how I can achieve what I want?
Thank you in advance.
Nevermind that the name of the GRC block ends with “ff” – that was a mistake in
Description: PNG image
Description: Binary data
- [Discuss-gnuradio] My custom GRC block outputs thousands of unwanted NULL characters - what am I doing wrong?,
Jeffrey M. Rose <=