UHD query PPS

Is it, or could it be possible to add a query method to get the PPS
state (something like u2->get_pps())?

Maybe I misunderstand how to synchronise…

if I have two usrp2s, and I do a set_time_next_pps(), there is a chance
that the pps could occur after the first call, so the second call will
set the second usrp a second later. I would need to know when there is a
pps or seconds transition prior to setup, then have one or two seconds
to call set_time_next_pps(). Ok, I could read the system time, but I
would need a gps with pps/ref out, and sync’d using ntpd or gpsd, and
this may not be guaranteed. Or I could just monitor the pps level via
the serial port (DCD, like ntpd does with nmea stream) to guarantee when
the seconds tick over. If the pps state could be read back from the usrp
(approx 80ns rtt) however, this would simplify the system and hardware
requied (USB dongle, TTL to RS232 convertor, extra wires, etc…). So…

while (get_pps_level() == 0); // wait for rising edge
while (get_pps_level() == 1);

u1->set_time_next_pps(…); // We are guaranteed at least one second to
issue this to both usrp at once
u2->set_time_next_pps(…);

Cheers,
David

----- Original Message ----
From: Josh B. [email protected]
To: David E. [email protected]
Sent: Sat, 22 May, 2010 17:37:32
Subject: Re: [Discuss-gnuradio] UHD query PPS

Not sure what you mean. Perhaps readback the current time on the device?
-Josh