[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] My custom GRC block outputs thousands of unwanted NUL
From: |
Jeffrey M. Rose |
Subject: |
[Discuss-gnuradio] My custom GRC block outputs thousands of unwanted NULL characters - what am I doing wrong? |
Date: |
Fri, 1 Feb 2019 17:43:04 +0000 (UTC) |
Hi.
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
it received.
In my flowgraph, I have a file sink that sinks these “1” characters into a
file.
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
general_work() function.
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.
- Jeff
P.S.
Nevermind that the name of the GRC block ends with “ff” – that was a mistake in
naming it.
suppress_2_experimenting.grc.png
Description: PNG image
gensup_ff_impl.cc
Description: Binary data
- [Discuss-gnuradio] My custom GRC block outputs thousands of unwanted NULL characters - what am I doing wrong?,
Jeffrey M. Rose <=