Hi,

 

What is the correct way to destroy a tx_stream? I've tried calling
tx_stream.reset() (which I've seen suggested on the mailing list for
rx_streams) and assigning nullptr, but both give some strange results, as
below. I'm using UHD 4.0 with a B210. Outline of my code:

 

      

       // Init and send some data - this works ok

       usrp = uhd::usrp::multi_usrp::make(some_args);

       usrp->set_freq_etc();

       tx_stream = usrp->get_tx_stream(args);

       repeat

             tx_stream->send(buf, size, md);

        // Indicate no more data

        md.end_of_burst = true;

        tx_stream->send(buf, 0, md);

        // Throw away any underflows, so we don't get them next time

        while (tx_stream->recv_async_msg(amd)) 

              ;

 

        // What do I do here when I'm done?

        tx_stream.reset();

        tx_stream = nullptr;

 

       // Some time later - send again

       tx_stream = usrp->get_tx_stream(args);

       repeat

             tx_stream->send(buf, size, md);

      .

 

For the first transmissions, the output spectrum is as I'd expect (in
attached OkSpectrum.PNG). However, if I call tx_stream.reset(), then the
spectrum appears wrong for subsequent transmissions, as in OddSpectrum.PNG
(i.e. the unexpected peak at the centre freq).

 

Perhaps something silly I'm doing wrong, but I can't see this done in any of
the example code. The docs say: 'When calling
<https://files.ettus.com/manual/classuhd_1_1device.html#a66d1bf289dd03a03df3
860f3eee578c0> get_tx_stream() a second time, the first streamer must be
destroyed beforehand.', but it seems the opposite for me. If I don't call
it, subsequent transmissions seem fine.

 

Thanks,

Jon  

 

 

_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to