discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] how to implement synchronous source block correctly ?


From: Artem Pisarenko
Subject: [Discuss-gnuradio] how to implement synchronous source block correctly ?
Date: Tue, 3 Dec 2013 03:59:34 -0800 (PST)

Last few days I tried to implement RTP stream source block (based on
sync_block) and found that this simple task is not trivial, as it seems to
be, because GNU Radio scheduler and general data flow are not documented
(for users).

What mecahisms are allowed to be used in order to achieve producing data
synchronously and make possible to use block in any flow graph ?
Blocking/sleeping inside work() function ? I wasted a lot of time to find
out that my flow graph works crappy not because of my block. Create "signal
source -> throttle -> complex to float -> audio sink" and you will hear
jerky sound. Is it because of having more than one synchronous block in
single flow chain ? If so, do I have to implement two versions of my block
(sync and async) and user have to be responsible in selecting correct one ?
Furthermore, there are no correct way to stop graph, instead work() function
must never block for more than some finite interval of time. How to choose
it - 10, 50, 100 ms ?.. Also note, that stop() method doesn't allow
implementing any kind of interruption, it just called after graph finished
already.

I consider these issues are fundamental.

Hope, at least, my remarks will help users who read encouraging "writing
gnuradio blocks is simple !" at wiki and being stuck in practice.



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/how-to-implement-synchronous-source-block-correctly-tp45083.html
Sent from the GnuRadio mailing list archive at Nabble.com.



reply via email to

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