Friday, June 22, 2012

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

> 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



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment