How to toggle between two different file paths in File Source

2020-08-26 Thread Jonathan Morales
Hello!

I've been struggling to figure out how to send one file, delay, then switch
to sending a second different file. I've been using gnuradio-companion to
generate a Python script which I manipulate. I've tried resetting the
filepath call after a delay but, when I run the script it continues to
only send the first file.

Regards,
J


Re: How to toggle between two different file paths in File

2020-09-09 Thread Jonathan Morales
Thanks for the reply!

I tried doing that, but the data being transmitted doesn't change from the
first file source. My actual code I entered was:

tb.blocks_file_source_0 = blocks.file_source(gr.sizeof_char*1, 'filename',
True)

Any thoughts on how to get the file source to actually switch?


Re: How to toggle between two different file paths in File

2020-09-09 Thread Jonathan Morales
Nevermind, am an idiot. Did what you said and it worked:
tb.blocks_file_source_0.open('filename', True)

On Wed, Sep 9, 2020 at 11:26 AM Jonathan Morales <
jonathan.morales...@gmail.com> wrote:

> Thanks for the reply!
>
> I tried doing that, but the data being transmitted doesn't change from the
> first file source. My actual code I entered was:
>
> tb.blocks_file_source_0 = blocks.file_source(gr.sizeof_char*1, 'filename',
> True)
>
> Any thoughts on how to get the file source to actually switch?
>


Re: How to toggle between two different file paths in File Source

2020-08-26 Thread Jeff Long
Try calling src.open(filename, repeat) after the delay.

On Wed, Aug 26, 2020 at 5:41 PM Jonathan Morales <
jonathan.morales...@gmail.com> wrote:

>
> Hello!
>
> I've been struggling to figure out how to send one file, delay, then
> switch to sending a second different file. I've been using
> gnuradio-companion to generate a Python script which I manipulate. I've
> tried resetting the filepath call after a delay but, when I run the script
> it continues to only send the first file.
>
> Regards,
> J
>