Hi Joe, You need to create a stream first and set the stream mode, num_samps, and time spec (when to start receiving). After setting that, you need to receive samples from the stream object. By doing this, you will be providing rx_metada_t to recv function which will give you the information you need. If you call usrp->get_time_now(), it will return the current hardware time, not the buffer receive time. Here is an example for your reference,
uhd::rx_metadata_t md; // Assuming you have buffs and samps_ber_buff variables set before size_t num_rx_samps = rx_stream->recv(buffs, samps_per_buff, md); Here is the buffer time -> md.time_spec_t Here is the hardware time -> usrp->get_time_now() Also, is there a limit on the number of packets there can be in a burst? > Do you mean the number of samples? A. On Fri, Feb 17, 2023 at 7:15 PM <jmalo...@umass.edu> wrote: > Hello, > > I have an application where I collect I burst of samples from Rx ports, > and stream the samples into my host computer. I would like to also store > the timestamps from the packages onto the host computer, as well as store > from which RX port the signal arrived so I may separate the data in > different files. > > I am a little lost however how to do with within the API. I see there is a > call “usrp->get_time_now” in several of the examples, but it does not > appear this takes the timestamp from the bursts themselves. > > Is there a way within the existing API to retrieve the timestamp from the > packets at the beginning of each burst. I also see a “get_timestamp” in the > API but I am unsure what packet this would get the timestamp from if the > burst has multiple packets. > > Also, is there a limit on the number of packets there can be in a burst? > > > Thanks, > > Joe > _______________________________________________ > 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