Controlling File Sink

Hello all,

In GRC, I’ve set up a packet detector that is working using the Header
Payload Demux block. Unexpectedly, however, it seems the payload output
port does not go silent when no header is detected. It outputs zeros,
which
the file sink block I have connected to that port then stores.

I’ve attached a screenshot of my flowgraph. The top row generates the
packets. The middle row adds zeros between packets, to give the header
payload demux something to do. The third row detects the packets, strips
the header and sends the payload out to a file sink.

I would like the payload output port to be quiet when no header is
detected, or I would like a way to control what the file sink stores.
Tagged File Sink is not what I’m looking for, because it creates a new
file
every time a tag is detected.

Would someone kindly recommend a way to do what I would like?

v/r,
Rich

Have your packet detector set the filename on the filesink to
“/dev/null” when you don’t want anything recorded, and to your output
filename when you do, and use the “append” option.

On 2015-03-12 14:36, Richard B. wrote:


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio [1]

Links:

Marcus,

I’m not sure how to do what you’re saying. Can you elaborate with an
example?

Rich

On 12.03.2015 11:36, Richard B. wrote:

Hello all,

In GRC, I’ve set up a packet detector that is working using the Header
Payload Demux block. Unexpectedly, however, it seems the payload output
port does not go silent when no header is detected. It outputs zeros,
which the file sink block I have connected to that port then stores.

Richard,

the HPD does not output zeros between bursts. It will send out
whatever the header return message tells it to output. Check the OFDM
examples for how these things happen. You can add message probes to see
what exactly is encoded by the messages.

M

Hey Richard,

I looked at your previous post, and turns out that I actually have a
similar need; I’m trying to figure out a way to control the
functionality
of the tagged file sink because I don’t want it to create so many files
lol
(I’d just like it to place everything in one file).

So I was thinking, since we already have the source code for these
blocks,
and there’s a nice tutorial on how to write blocks either in c++ or
python
at http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules,
so
a good starting point would be to create our own version of the block,
and
use the current source code as a starting point in adding the extra
functionality that’s needed.

Best,
Ali

On Fri, Mar 13, 2015 at 12:32 PM, Martin B. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs