[Top][All Lists]
[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: |
Thu, 5 Aug 2010 06:09:43 -0700 (PDT) |
Hi Josh,
I have tried the code above and used a printing block with the following
work function and vec_len=1 to see the output of one of the MIMO source
output ports:
int library_print_c::work (int noutput_items, gr_vector_const_void_star
&input_items,gr_vector_void_star &output_items){
const gr_complex *in= (const gr_complex *) input_items[0];
gr_complex temp_in[vec_len];
for (int i = 0; i <noutput_items; i++){
memcpy(&temp_in[0],in,vec_len*sizeof(gr_complex));
for (int k=0; k<vec_len; k++)
std::cout<<temp_in[k]<<std::endl;
}
return noutput_items;
}
However, if the size variable is 1000 the output printed is a value
repeated 1000 times then a new value repeated 1000 times and so on. What I
was expecting as you know is to see 1000 differnt samples then a pause then
1000 samples and so on. I wonder if this is the real output or it's
scheduler issue between the two blocks, though the printing block is such a
conceptual copy of the howtosquare.
Regards,
Zohair
Zohair wrote:
>
> 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-tp29336824p29356346.html
Sent from the GnuRadio mailing list archive at Nabble.com.