* Bump NQPTP_SHM_STRUCTURES_VERSION to 8.
* Remove the ability to handle multiple instances of AirPlay-2-capable Shairport Sync on the same system -- it seems clear that clients can not use this facility.
* Greatly simplify NQPTP by only monitoring PTP information coming from the client, ignoring all other PTP information.
* Improve the accuracy of the clock by taking correction field information into account.
* In addition to trying to restart a clock that is silent, also send a restart to a clock if the clock's grandmaster appears to have stopped.
Squashed commit of the following:
Add some experimental exploratory code.
Ignore the INSTALL document. Let INSTALL always be autogenerated.
Enhanced and corrected ptp definitions.
Fix shm name to work with FreeBSD. Update the SHM version.
Change order of includes to avoid a compilation error in FreeBSD
Fix potential bugs in finding a clock ID in a FreeBSD device.
Only try to restart a stopped clock if it's the clock itself that has stopped and not a different grandmaster. Allow fast changes for up to one second after the start of mastership.
Make the code to restart a clock a separate function and call it if a clock gets stuck. Include the correction field in the calculation of the precise origin timestamp. If a new clock is out by more than -4 seconds, treat it as a discontinuity rather than noise.
Add a net-to-host converter for 64-bit arithmetic
Mike Brady [Mon, 12 Sep 2022 14:07:15 +0000 (15:07 +0100)]
* Bump NQPTP_SHM_STRUCTURES_VERSION to 8.
* Remove the ability to handle multiple instances of AirPlay-2-capable Shairport Sync on the same system -- it seems clear that clients can not use this facility.
* Greatly simplify NQPTP by only monitoring PTP information coming from the client, ignoring all other PTP information.
* Improve the accuracy of the clock by taking correction field information into account.
* In addition to trying to restart a clock that is silent, also send a restart to a clock if the clock's grandmaster appears to have stopped.
Squashed commit of the following:
Add some experimental exploratory code.
Ignore the INSTALL document. Let INSTALL always be autogenerated.
Enhanced and corrected ptp defiinitions.
Fix shm name to work with FreeBSD. Update the SHM version.
Change order of includes to avoid a compilation error in FreeBSD
Fix potential bugs in finding a clock ID in a FreeBSD device.
Only try to restart a stopped clock if it's the clock itself that has stopped and not a different grandmaster. Allow fast changes for up to one second after the start of mastership.
Mike Brady [Sun, 31 Jul 2022 11:35:30 +0000 (12:35 +0100)]
Add a handle_sync to see if a correctionfiled is ever used. Modify handle_follow_up to (mostly) only work on a master clock. Wait for a minute to restart a stopped clock. Always invalidate the clock when an empty peer list is sent.
Mike Brady [Thu, 14 Jul 2022 16:55:38 +0000 (17:55 +0100)]
Make the code to restart a clock a separate function and call it if a clock gets stuck. Include the correction field in the calculation of the precise origin timestamp. If a new clock is out by more than -4 seconds, treat it as a discontinuity rather than noise.
Mike Brady [Sat, 9 Jul 2022 09:02:35 +0000 (10:02 +0100)]
If the previous offset's grandmaster is different from the current one, discard all the smoothing stuff, including previous offset data, and work as if it was a completely new clock.
Mike Brady [Sat, 9 Jul 2022 09:00:18 +0000 (10:00 +0100)]
Add is a field to store the grandmaster the previous offset refers to. The idea is that if the new grandmaster is different from the previous one, start over.
Mike Brady [Sun, 19 Jun 2022 12:19:30 +0000 (13:19 +0100)]
Remove code for qualifying an Anounce message -- it is not used in 802.1AS. Simplify code by removing redunadant and obselete code, variables and fields.
Mike Brady [Sat, 18 Jun 2022 14:01:40 +0000 (15:01 +0100)]
Fix a bug that would cause the offset to get stuck at a fixed value, no matter what happened.
Simplify by removing clock_is_becoming_master time_of_last_sync. Watch for discontinuities to allow large changes of offset.
Mike Brady [Mon, 28 Feb 2022 06:42:25 +0000 (17:42 +1100)]
Always create a new SHM interface for every new shm address provided. Remove redundant coded. Add a few debug messages. Enhance the service record to define the service provided.
Mike Brady [Fri, 31 Dec 2021 10:04:28 +0000 (10:04 +0000)]
Enable nqptp to deal with multiple independent clients and their associated clock groups. Each client supplies the name of its SMI whenever it wishes to access the service. Note: named SMI interfaces are not garbage collected!