Thursday, February 4, 2016

Re: [Discuss-gnuradio] USRP control thread in GR block - how do I pass a USRP sptr?

On Thu, 2016-02-04 at 17:53 +0000, Nowlan, Sean wrote:

> Thanks, Andy. I haven't yet encountered any issues from initializing
> USRP settings (freq/gain/antenna/etc.) from "main" thread and polling
> PPS from another thread,

Neither have I. (FWIW, I poll the GPSDO NMEA strings and USRP timestamp
synchronized to the USRP PPS output pulse provided to the host's serial
port DCD line at RS-232 levels.)

> since the polling thread doesn't actually start until the main thread
> calls "start" on my OOT block until after it's finished configuring
> the USRP at startup.

Ah, smarter than what I did. My block's polling thread just waits 1
second at startup, and then drops into a loop around a
blocking ::time_pps_fetch() call.

>
> Regarding the order of instantiation, I should update what I said
> about the USRP block alias: Under the USRP Sink config settings in
> GRC, the user can set the block alias under the Advanced tab.

OK, I never noticed that.

-Andy

> I set this to the same value as what I pass to my OOT block:
>
> // gr-my-oot/include/my-oot/clock_manager.h
> class MY_OOT_API clock_manager : virtual public gr::block
> {
> …
> public:
> static sptr make(const std::string &usrp_alias);
> …
> }
>
>

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment