discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] problem with Tagged File Sink


From: Jason Matusiak
Subject: [Discuss-gnuradio] problem with Tagged File Sink
Date: Wed, 29 Nov 2017 12:35:45 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

I have a custom block that is adding the "burst" "True" and "False" tags via:
add_item_tag(0, d_total_passed_samples, pmt::mp("burst"), pmt::mp("True"));
and
add_item_tag(0, d_total_passed_samples-1, pmt::mp("burst"), pmt::mp("False"));

When I run it and look at the output via Tag Debug, I see:
----------------------------------------------------------------------
Tag Debug: burst
Input Stream: 00
  Offset: 0  Source: n/a     Key: burst   Value: True
----------------------------------------------------------------------

----------------------------------------------------------------------
Tag Debug: burst
Input Stream: 00
  Offset: 4999999  Source: n/a     Key: burst   Value: False
----------------------------------------------------------------------

Which seems correct to me.  I have a sample rate of 5Msps, and was attempting to save 1 seconds worth of data, so 5000000 seems like the right number of samples to pass through.

Yet if I look at what gets generated by Tagged File Sink, I see this file:
file4_0_0.00000000.dat of size 39997440

Then when I close the flowgraph, it appears that it finishes writing the file and it looks like this:
file4_0_0.00000000.dat of size 40000000

If I don't close the flowgraph and send another burst through, I get the Tag Debug of:
----------------------------------------------------------------------
Tag Debug: burst
Input Stream: 00
  Offset: 5000000  Source: n/a     Key: burst   Value: True
----------------------------------------------------------------------

----------------------------------------------------------------------
Tag Debug: burst
Input Stream: 00
  Offset: 9999999  Source: n/a     Key: burst   Value: False
----------------------------------------------------------------------


and the file is the same name and now has a size of 39997440 until I close it, then it has a size of 40000000.

So this leads me to believe that my Flase tag is not making it through the stream, but I think I am pringing it right.

Is there a bug in Tagged File Sink (not likely)?  Or am I doing something wrong (where my money is)?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]