Give sample rate to throttle block dynamically

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!

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 B.
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

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 B.
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