[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Dynamically changing parameters of a block
From: |
kaleem ahmad |
Subject: |
Re: [Discuss-gnuradio] Dynamically changing parameters of a block |
Date: |
Tue, 30 Sep 2008 02:09:47 -0700 (PDT) |
Any suggestions!!!!!!!!!!!!!!!
kaleem ahmad wrote:
>
> Hi Eric and others,
>
> I also have a similar problem, but it is not limited to 'gain control',
> Actually I want to implement an echo back or ping pong transmission
> system.
>
> First I implemented two separate transmitt and receive flow graphs in two
> separate transmit(), and receive() functions as mentioned in the
> following:
>
> Master Transceiver:
>
> Transmit() Transmitt one data packet
> Receive() Wait in receive for the echoed back packet or
> timeout
>
> Slave Transceiver:
>
> if (Receive()): Always wait in receive
> Transmit() Transmitt back the received data packet
>
> But in this method I get an error 'cant open usb device....cant open USRP
> 0/1'
>
> Then I found flowgraph.disconnect() method and thought that I should
> implement a single flowgraph which can dynamically connect different
> blocks to transmit and then disconnect and connect with receive blocks and
> so on...
>
> Is it possible and is there any example code which doing something like
> this or otherwise can you please suggest me some way to do this.
>
> Thanks
>
> Kaleem Ahmad
>
>
>
> Eric Blossom wrote:
>>
>> 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
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Dynamically-changing-parameters-of-a-block-tp19698798p19738563.html
Sent from the GnuRadio mailing list archive at Nabble.com.