Forum: GNU Radio Give sample rate to throttle block dynamically

E7501968da88b4eb2aa658457172e653?d=identicon&s=25 Jenny Galasso (Guest)
on 2013-11-13 16:43
(Received via mailing list)
Hi,
I am parsing the sample rate from a file name and would like to
dynamically pass that to a downstream block (for instance the throttle
block). I tried using a function proble to get the sample rate value and
having the throttle getthe sample rate from it. It seems like the
throttle is only getting the initial value from the function probe
though and not updating. Please let me know if I'm on the right track,
or if there is a better way to pass the sample rate to other blocks.
Thanks!
Ad80d352eb445a3d7dccd5a779db0e43?d=identicon&s=25 Martin Braun (CEL) (Guest)
on 2013-11-13 20:00
(Received via mailing list)
On Wed, Nov 13, 2013 at 07:42:35AM -0800, Jenny Galasso wrote:
> I am parsing the sample rate from a file name and would like to dynamically
> pass that to a downstream block (for instance the throttle block).  I tried
> using a function proble to get the sample rate value and having the throttle
> get the sample rate from it.  It seems like the throttle is only getting the
> initial value from the function probe though and not updating.  Please let me
> know if I'm on the right track, or if there is a better way to pass the sample
> rate to other blocks.

Hi Jenny,

the throttle block is really only used to run offline flowgraphs and
make sure
they don't swamp the CPU. Do you have any other clocks in your
flowgraph, or is this the only one?

If you're reading the sample rate from a file name, my suggestion is to
figure that out before you start the FG, and set it while initializing.

If you want to change sampling rates dynamically, this calls for stream
tags. However, there's no block in stock GNU Radio that reads sampling
rates from stream tags.

MB

--
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
Ad80d352eb445a3d7dccd5a779db0e43?d=identicon&s=25 Martin Braun (CEL) (Guest)
on 2013-11-14 14:29
(Received via mailing list)
Hi Jenny,

please stick to the mailing list.

On Wed, Nov 13, 2013 at 12:07:19PM -0800, Jenny Galasso wrote:
> Thanks for your response, Martin- It's very helpful.  I still have some
> confusion about the function probe though.  Briefly, how do I query it's value
> from another block?

I'm not sure what you mean. You can write the variable name from the
function probe into any field that has a callback.

MB

--
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.