discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Dynamically changing parameters of a block


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Dynamically changing parameters of a block
Date: Fri, 26 Sep 2008 18:47:27 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Sep 26, 2008 at 06:40:29PM -0700, Karthik Vijayraghavan wrote:
> Suppose I have myblock = gr.multiply_const_ff(var_value) sitting
> somewhere in my flowgraph. I want the user to be able to change the
> value of var_value by using a slider. I know how to make a slider, but
> I am not able to find information on how to dynamically change the
> block at runtime. One option that I can think of is to
> 
> 1. Stop the flow graph
> 2. Disconnect the block in question with any block it may be connected to
> 3. Redefine the block with new parameters
> 4. Reconnect the block
> 5. Restart the flow graph
> 
> I tried the above method, but I did know how to redefine an existing
> block. Do I have to somehow "destroy" or "clear" the existing block
> before defining another block with the same name?
> 
> Karthik


No need for all of that, just call 

  myblock.set_k(new_value)

while it's running.

Eric




reply via email to

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