discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Limit on file_sources in GRC ?


From: John Shields
Subject: Re: [Discuss-gnuradio] Limit on file_sources in GRC ?
Date: Sat, 23 Jun 2012 16:59:12 +1200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 23/06/12 14:00, Marcus D. Leech wrote:
Ubuntu 12.04 LTS, GNU Radio 3.6.1git-2-g2c7ea132 (on i7).

I have a simple GRC flow with a couple of file sources - these are FIFOs. I have a separate application which will simulate various antenna configurations and it attempts to open both of these FIFOs in O_WRONLY|O_NONBLOCK . As the FIFO's are Write, the other end needs to be 'reading' in order that I don't get "No such device or address". I accomplish this by starting the GRC flow.The separate application attempts to open the FIFO's if unsuccessful 10 times.

With either of the source files, only, enabled in GRC, I can get that FIFO open first time from the application but cannot get them both to open.

Is there a limit on the # of file sources in GRC which is leading to this behaviour?

          Kind Regards,

                       John

The problem isn't, per se, Gnu Radio. The semantics of opening for write are such that there *must* be a reader available. Not so with opening for read, provided that you've opened NONBLOCK. Opening for read will block until there's a writer if it isn't opened NONBLOCK.

So the problem is that you can't guarantee which *order* things will happen in -- that is, your opening for write may not correspond to the reader that Gnu Radio has opened (and is waiting to proceed). I'd say keep trying to open all of your writer FIFOs at once, and figure out
  which one(s) have succeeded.  Pause a little between each iteration.






Thanks Marcus - will give that a try. I was hoping I didn't need to send data to the first FIFO opened so that the second one would/could succeed so this is good news; 1 TPB helps, I guess.

        Kind Regards,

                John



reply via email to

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