discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] change a block parameter using a python script


From: Josh Blum
Subject: Re: [Discuss-gnuradio] change a block parameter using a python script
Date: Mon, 27 Jan 2014 23:47:31 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0


On 01/27/2014 11:19 PM, Marco Bosco wrote:
> Hi all!
> 
> I have a simple flowgraph: a signal source, a throttle and a
> waterfall plot. I'd like to change the frequency of the signal source
> during runtime using the output of a python script. The output of the
> python script is time-varying, then I should see some variations in
> the plot during runtime.  How can be this done? Is there a 'simple'
> way?
> 

Take a look at the XML RPC blocks in GRC.

If you are not using GRC, its still pretty simple to create an xml rpc
server in python, and register the signal source's .set_frequency()
parameter into the server. Then your python script that is performing
the control can talk to the xml rpc client (it was a separate file from
the flow graph, right?).

http://docs.python.org/2/library/simplexmlrpcserver.html
Its a pretty small number of lines to get working, and xmlrpc generally
comes packaged with python. Good luck!

-josh

> Thanks
> 
> Marco
> 
> _______________________________________________ Discuss-gnuradio
> mailing list address@hidden 
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 



reply via email to

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