Clear file_sink every minute

Hi, All,

I average symbols’ magnitude over a packet and output the value to a
file_sink.
self.connect(self.symbol_filt,
gr.file_sink(gr.sizeof_double*self._occupied_tones, “ofdm_rss_f.dat”))

Although I output a value every packet, the file I got has many zeros.
Suppose I’m using 64 subcarriers with BPSK.
For a 400 bytes packet, I get 64 * 50 = 3200 zeros before I get the last
64 average values.
Seems that although I do not output in my program explicitly, each time
I consume 64 symbols there are 64 outputs of zeros to the file_sink.
I can use Octave to read the binary file and extract the values that I
need.
But for a long time measurement, I may get memory problem for a large
binary file.
So I want to open another thread, extracting values every minute.
But how could I safely clear the content of the file created by the
file_sink while do not interrupt the recording.

Thanks,
Pei

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