[Top][All Lists]

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

Re: [Discuss-gnuradio] help with USRP syntax

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] help with USRP syntax
Date: Sun, 7 Jan 2007 15:14:03 -0800
User-agent: Mutt/1.5.9i

On Sun, Jan 07, 2007 at 06:03:53PM -0500, Josh Blum wrote:
> GRC is my little graphical interface for gnu radio. 
> http://www.joshknows.com/?key=grc


> I want to add graphical source/sink for the USRP. So, I am trying to 
> figure out a generic way to make a USRP source/sink given a bunch of 
> parameters. If certain USRP daughter boards need special attention, then 
> I can make special graphical blocks just for them.

No, you can treat them all the same.

> Thank you very much for you response. It helped a lot. I have a few more 
> questions:
> I assume that the tune function only works for certain daughter 
> boards(setting the center frequency), but is it safe to call regardless?

Tune works for all daughterboards.  In general it controls the front
end PLL and the DDC.  On boards without a front end PLL, it just tunes
the DDC.

> I found this pick_subdevice code (below) in one of the examples. Is 
> "u.db[0][0].dbid() >= 0" in the format u.db[side][subdevice]? And is 
> this the correct way to test if a particular subdevice is valid?

Yes.  dbid() will be < 0 if there's no daugtherboard, or if we don't
recognize it.  Note that this is used to provide a default value.
Generally speaking we require the user to specify what they want on
the command line.  This is particularly important for folks with both
sides of their USRP populated.  Anything that transmits requires the
user to explicitly specify the subdevice.  Guessing which board the
user want to use to transmit seems like a very bad idea ;)

> Thanks again,
> -Josh
> def pick_subdevice(u):
>    """
>    The user didn't specify a subdevice on the command line.
>    If there's a daughterboard on A, select A.
>    If there's a daughterboard on B, select B.
>    Otherwise, select A.
>    """
>    if u.db[0][0].dbid() >= 0:       # dbid is < 0 if there's no d'board 
> or a problem
>        return (0, 0)
>    if u.db[1][0].dbid() >= 0:
>        return (1, 0)
>    return (0, 0)

You're welcome!

reply via email to

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