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: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] Limit on file_sources in GRC ?
Date: Fri, 22 Jun 2012 22:00:57 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

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.






--
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org





reply via email to

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