On Tue, Jan 12, 2021 at 05:35:55PM -0800, Richard Cochran wrote: > On Wed, Jan 13, 2021 at 01:59:52AM +0200, Vladimir Oltean wrote: > > If I was willing to create, for inclusion into linuxptp, an all-in-one > > program that waits until a certain clock is synchronized, how would that > > ideally look, in your opinion? > > Part of the problem is defining what it means for a clock to be > synchronized. People have asked me, "can't we just have a Boolean > flag that says synchronized or not?" > > Unfortunately this depends on your requirements, and these can be very > different depending on the application.
Feel free to explain what other, more exotic definitions of synchronization might look like. I could not find a precise definition in IEEE 1588 except for this (clause 12.2 Synchronization): The specific means for synchronization are out of the scope of this standard but shall result in the minimization of the <offsetFromMaster> value computed by the slave per 11.2. So I might expect that what you mean by "different requirements" is simply that some might be ok with simply a one-time measurement of offsetFromMaster that falls below (in absolute value) than the user-provided threshold, while others might want to compare a time average of the offsetFromMaster with the threshold. Maybe we can do both? > (But I agree that phc2sys really should have a management interface.) So this is where I was trying to get at. What should this management interface look like? Should it be compliant to IEEE 1588 clause 15 Management, or should it be a custom implementation? If the former, I guess we would have to fake a portIdentity for CLOCK_REALTIME, and we should make it answer the managementIDs that make sense (CLOCK_ACCURACY, CLOCK_DESCRIPTION, TIMESCALE_PROPERTIES, TIME_STATUS_NP, TRACEABILITY_PROPERTIES). Or we could treat it like a full-blown ordinary clock and register all the clock data sets for one: defaultDS, currentDS, parentDS, timePropertiesDS, portDS. If the latter, any ideas? _______________________________________________ Linuxptp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxptp-users
