discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] MIMO source - bursts


From: Zohair
Subject: Re: [Discuss-gnuradio] MIMO source - bursts
Date: Tue, 3 Aug 2010 13:04:22 -0700 (PDT)

Yes, I am interested in  multiple bursts so Iam using the NUM_SAMP_AND_DONE
repeatedly. 

If I understood what you've said correctly, hte following code may be
working. I havent tried it because I'm at home but would be grateful if you
tell me what you think of the modified code below.

Regards.

    int work( int noutput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items ){

        set_streaming(true);
        uhd::rx_metadata_t metadata; //not passed out of this block
        int size =   _dev->get_device()->recv(output_items, noutput_items,
metadata, type, 
                                                              
uhd::device::RECV_MODE_FULL_BUFF) ;
        return size == 0 ? -1: size ;
    }

protected:
    uhd::usrp::mimo_usrp::sptr _dev;
    const uhd::io_type_t _type;
    bool _is_streaming;

    void set_streaming(bool enb){
        if (enb){
            //setup a stream command that starts streaming slightly in the
future
            uhd::stream_cmd_t
stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
            stream_cmd.stream_now = false;
            stream_cmd.num_samps=1000;
            stream_cmd.time_spec = get_time_now() + uhd::time_spec_t(0.05);

            _dev->issue_stream_cmd(stream_cmd);
        }
        else
           
_dev->issue_stream_cmd(uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS);
//        _is_streaming = enb;   // REMOVED
    }
};
-- 
View this message in context: 
http://old.nabble.com/MIMO-source---bursts-tp29336824p29339540.html
Sent from the GnuRadio mailing list archive at Nabble.com.




reply via email to

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