Hi Marcus! >> get_time_now is a public function of usrp_sink, it is accessible from >> everywhere :)
Great, I thought it was a public function, just wasn't sure how to get a pointer to it. >> uhd::time_spec_t now = my_usrp_sink->get_time_now(); Sure thing. >> You'll need a (shared) pointer to that usrp_sink I am not clear how I obtain that (to then I pass it to my C++ module as a constructor?) Regards, David ________________________________________ From: Marcus Müller [marcus.muel...@ettus.com] Sent: 30 April 2014 14:37 To: David Halls Cc: discuss-gnuradio@gnu.org Subject: Re: [Discuss-gnuradio] Obtaining 'time_spec' from Out-of-tree C++ Module Hello David, as get_time_now is a public function of usrp_sink, it is accessible from everywhere :) You'll need a (shared) pointer to that usrp_sink;using that, you can do something like uhd::time_spec_t now = my_usrp_sink->get_time_now(); You could, for example, take an usrp_sink::sptr as an argument for your block's constructor and store that reference to use it later in your work() function. Greetings, Marcus On Wed, Apr 30, 2014 at 2:26 PM, David Halls <david.ha...@toshiba-trel.com<mailto:david.ha...@toshiba-trel.com>> wrote: Dear All, I would like to have knowledge of the USRP time in my transmitter flow graph. In the receiver flow graph this is straight forward because 'rx_time' tag is propagated from a USRP source as a tag. How can I obtain the time_spec from a c++ block in my transmitter flow graph? "usrp_sink_impl.cc" has the function ::uhd::time_spec_t usrp_sink_impl::get_time_now(size_t mboard) { return _dev->get_time_now(mboard); } But how can I call this from outside the usrp_sink block? Many thanks! David ________________________________ NOTE: The information in this email and any attachments may be confidential and/or legally privileged. This message may be read, copied and used only by the intended recipient. If you are not the intended recipient, please destroy this message, delete any copies held on your system and notify the sender immediately. Toshiba Research Europe Limited, registered in England and Wales (2519556). Registered Office 208 Cambridge Science Park, Milton Road, Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl<http://www.toshiba.eu/research/trl> ________________________________ This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com ________________________________ _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org<mailto:Discuss-gnuradio@gnu.org> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ________________________________ NOTE: The information in this email and any attachments may be confidential and/or legally privileged. This message may be read, copied and used only by the intended recipient. If you are not the intended recipient, please destroy this message, delete any copies held on your system and notify the sender immediately. Toshiba Research Europe Limited, registered in England and Wales (2519556). Registered Office 208 Cambridge Science Park, Milton Road, Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl --------------------------------------------------------------------------------------- This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com ---------------------------------------------------------------------------------------
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio