discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] code clarification in usrp.py


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] code clarification in usrp.py
Date: Mon, 15 Aug 2005 09:13:43 -0700
User-agent: Mutt/1.5.6i

On Sun, Aug 14, 2005 at 06:30:06PM -0700, Ges wrote:
> Hi Eric,
> 
> I would like to clarify this stub of code found in
> usrp.py:
> 
> def source_c(which, *args, **kwargs):
>     return ((usrp0.source_c, usrp1.source_c)[look_for_usrp(which)])(which, 
> *args, **kwargs)
> 
> when some creates an object usrp.source_c(...)
>  then this function gets called, which calls the
> look_for_usrp(which) to check if the specifies usrp
> rev 0 or 1, if 0 is returned then
> usrp0.source_c(which,*args,**kwargs) is called.
> 
> If 1 is returned, then
> usrp1.source_c(which,*args,**kwargs) is called.
> 
> Is this explanation correct?

Yes.

> Also, should the usrp rev always be passed?

No, "which" allows you to distinguish between multiple usrps
on the USB in the event that you have more than one plugged in.
Pass 0 if you've got a single USRP plugged in.

> And what is the difference between rev 1 and rev 0?
> I think I have rev 0, so i would like to know.

You have a rev 2 board.  The rev 1 and rev 2 boards are very similar,
and run the same host code.  The rev 0 boards were quite a bit
different and didn't have daughterboards.

Eric




reply via email to

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