By the way, the rx_samples_to_file.cpp example has a "multi_streamer" command line option and the example has associated functionality to implement separate streamers in the Rx direction. But, I don't think the tx examples have this option although it should be roughly analogous to the Rx case. Rob
On Fri, May 12, 2023 at 12:03 PM Rob Kossler <rkoss...@nd.edu> wrote: > Hi David, > You need to create two streamers - one with a channel list of {0} and the > other with a channel list of {1}. Let me know if you have any questions. > Rob > > On Fri, May 12, 2023 at 11:52 AM <david.fernan...@viveris.fr> wrote: > >> Hi everyone, >> >> I need to develop a system which streams independent samples at different >> moments to the differents channels (channel 0 and channel 1) of an USRP >> X310. >> >> To achieve that, I use the example codes available in the documentation >> which look like the following : >> >> // 1. Create the stream args object and initialize the data formats to >> fc32 and sc16: >> uhd::stream_args_t stream_args("fc32", "sc16"); >> // 2. Set the channel list, we want 2 streamers coming from channels 0 >> and 1, in that order >> stream_args.channels = {0, 1}; >> // Now use these args to create a tx streamer (We assume that usrp is a >> valid uhd::usrp::multi_usrp) >> uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); >> // Now, any calls to rx_stream must provide a vector of 2 buffers, one >> per channel. >> // Ex: tx_stream->send(buffs, 1024, md); (assuming buffs is a vector of 2 >> buffers) >> >> Then, I have created 2 threads, each thread will call the >> “tx_stream->send” function at different moments to stream samples through >> its corresponding channel (thread0 ==> channel0 and thread1 ==> channel1). >> >> My question is : how can I call the “tx_stream->send” function in each >> thread to send samples through only 1 of the channels ? Is there any other >> better method to achieve that ? >> >> Thank you very much for your support. >> _______________________________________________ >> USRP-users mailing list -- usrp-users@lists.ettus.com >> To unsubscribe send an email to usrp-users-le...@lists.ettus.com >> >
_______________________________________________ USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe send an email to usrp-users-le...@lists.ettus.com