discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] AttributeError: uhd module object has no attribut


From: Josh Blum
Subject: Re: [Discuss-gnuradio] AttributeError: uhd module object has no attribute 'stream_cmd'
Date: Mon, 07 Nov 2011 16:52:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1


On 11/07/2011 03:50 PM, Yan Nie wrote:
> Really appreciate your answer, Josh.
> 
> I am wondering how to control data streaming from devices to host in
> Python, if the stream command issuing approaching cannot work in
> Python? What I am trying to do is detecting pps pulse then 2ms later
> start receiving data from USRP N200. The received data will feed in
> next block of the flowgraph.
> 

Basically, the way python controls streaming is to call tb.start() or
tb.stop(). I realize that isnt a lot of control.

Option 1) Consider making a modification so that the user (you) can
specify the time that the streaming will start. Basically an API call
like uhd.set_stream_time(<time>). Where <time> will be used in the
source block's start() method.... Or more simply, forget the API change,
and hardcode the start-time that you want into the source block.

Option 2) The USRP source already tags the samples with a timestamp. You
dont need to control when streaming begins, because your donwnstream
block can determine the time of any sample using tags (aka packet metadata).

Option 3) Post messages into the source block to control streaming. This
is a more advanced feature that isnt yet implemented either in the
source block or from an API perspective. I mention it, because this is
something I may add in the near future once my message passing work gets
merged.

Options 1 or 2 are probably most practical for you.

-Josh

> Thanks, Yan
> 
> On 11/07/11, Josh Blum  <address@hidden> wrote:
>> I dont thing stream command has been "swigged" up into python. This
>> is because starting and stopping is handled by the scheduler which
>> is written in c++. So there was not a need to issue stream commands
>> in python.
> 
> _______________________________________________ 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]