Hei Kimmo,

Take this with a pinch of salt because it has been ~3 years since I worked
with GNU radio but I think I can answer this based on my experience of
hosting Swift app on Linux.

I'm assuming a little bit of latency isn't an issue.

Perhaps we could write a custom block, which as you said will act as buffer
during file name change. The File Sink block thread could be paused
momentarily, and then the following commands are executed:
cp outputFile archive-dd-mm-yyyy.ext
echo "" > outputFile

Then resume the paused thread?

Obviously if the file is very large, there can be latency. Probably not the
best way to do.

I use to build gnu-radio from source. So personally I wouldn't hesitate to
make a derivative of that file sink block if necessary and possible.

Hope it helps.

Terveisin,
Kaushik


On Wed, Apr 9, 2025, 01:49 Kimmo Lehtinen <kimmo.lehti...@yahoo.fi> wrote:

> Hi
>
> We are using the 'File sink' block to continuously stream data to output
> file.
> We want to change the name of the output file automatically, once a day.
>
> We could modify the Python program produced by GRC, as suggested at
> https://lists.gnu.org/archive/html/discuss-gnuradio/2017-05/msg00190.html
>
> That method involves disconnecting the 'file sink' block, changing the
> name of the output file, and then connecting the file sink block again. But
> this means that we would miss some samples, which we do not want to do.
>
> Should we save the data into a buffer just before disconnecting the 'file
> sink' block, and then empty the buffer after the file sink block has been
> connected ?
>
> We are using the Ettus USRP N210 receiver.
>
> Cheers, Kimmo
>
>
>
>
>
>
>
>
>

Reply via email to