discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Hopping Frequency Synchronization algorithm used


From: Josh Blum
Subject: Re: [Discuss-gnuradio] Hopping Frequency Synchronization algorithm used in PRE-COG
Date: Mon, 24 Jun 2013 05:13:24 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6


On 06/24/2013 03:58 AM, Gong Zhang wrote:
>  Josh,
>     I'm curious about how it tune the LO in USRP. Does it control the LO
> via
> 'post_msg(CTRL_PORT,pmt.pmt_string_to_symbol('usrp_sink.set_center_freq')'?
>      Thanks.
> 

Well, current pre-cog uses the v3.6 gr-extras out of tree message
passing to execute functions on the USRP python object. Basically the
control block would pass some sort of PMT to an output message port,
this would go to the input port of the PMT RPC block, which would then
execute a function on the usrp object in the python flowgraph.

Here is pre-cog making the call: This line:
https://github.com/jmalsbury/pre-cog/blob/master/python/fhss_engine_rx.py#L185

And the old PMT RPC block:
https://github.com/guruofquality/grextras/blob/grextras_v3.6/python/pmt_rpc.py#L78

That works, but no one is really endorsing that particular method. Think
of it as a one-off to set things working. What I think we really want is
a good API friendly framework supported way to set properties on blocks.
Given that I have learned a lot from the pre-cog development struggles,
GRAS now has a programmatic way for blocks to register properties and
access the properties of other blocks.

Properties interface:
https://github.com/guruofquality/gras/wiki/Codeguide#wiki-property-interface

USRP control block to set properties on:
https://github.com/guruofquality/grextras/wiki/Blocks#wiki-misc-uhd-blocks

Now the code in fhss_engine, might look more like this (thanks Yogesh):
self.uhd_control_sink.set("command_time",uhd.time_spec_t(self.interval_start))
self.uhd_control_sink.set("rx_freq",uhd.tune_request_t(self.freq_list[self.hop_index]))
self.uhd_control_sink.set("command_time",uhd.time_spec_t(0.0))

sort of relevant discussion
http://www.ruby-forum.com/topic/4414817#1112615

-josh



reply via email to

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