Forum: GNU Radio timed command

Posted by Gong Zhang (Guest)
on 2013-03-04 04:29
(Received via mailing list)
Hi,
I wanna transmit a 1khz Sinusoidal signal for one second and transmit
2khz for another second.The code maybe something like this:
set_command_time(&mytime)
sig_sin_source.work(...)
set_command_time(&mytime+1)
sig_sin_source.work(...)
But as I know,the first set_command_time would back-pressure all
subsequent timed commands.This would make it impossible for the second
set_command_time to reach the USRP buffer in time.
Is it correct?And what's the suggestion?
I appreciate any tips.
Thank you.
Posted by Josh Blum (Guest)
on 2013-03-04 08:57
(Received via mailing list)
On 03/03/2013 09:28 PM, Gong Zhang wrote:
> Is it correct?And what's the suggestion?
> I appreciate any tips.
> Thank you.
>

For timing the transmission of samples you will want to use the stream
tagging feature of gnuradio (some examples and docs in the link):
http://code.ettus.com/redmine/ettus/projects/uhd/w...

The timed commands thing is really for timing settings like tuning the
device, or setting gain at a specific time, its separate from the
streaming interface.

-josh
Posted by Gong Zhang (Guest)
on 2013-03-04 13:19
(Received via mailing list)
2013/3/4 15:56, Josh Blum wrote:
>> subsequent timed commands.This would make it impossible for the second
> device, or setting gain at a specific time, its separate from the
> streaming interface.
>
> -josh
>
Thank you for your valuable feedback.//If I wanna retune the device
every second,it really has nothing to do with data stream.Maybe I should
refer to python or UHD.Can you give me some example?
Posted by Josh Blum (Guest)
on 2013-03-04 18:30
(Received via mailing list)
>>
> Thank you for your valuable feedback.//If I wanna retune the device
> every second,it really has nothing to do with data stream.Maybe I should
> refer to python or UHD.Can you give me some example?
>

Here is an example in C++ for tuning two LOs at a given time, the same
methods are also available on the gr-uhd blocks and python wrappers:

http://files.ettus.com/uhd_docs/manual/html/sync.h...

The name of the functions may be slightly different because the
source/sink abstraction, see the name of the functions here:

http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/...

-josh
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.