Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a480111
Add initial analysis and plans
paulgear Aug 18, 2025
239a89f
Complete Task 1.4: Integrate PTP spawner creation in system coordinator
paulgear Aug 19, 2025
217275d
1.4 Integrate PTP spawner creation in system coordinator
paulgear Aug 19, 2025
d51ae49
Eliminate duplicate structure and module declaration
paulgear Aug 19, 2025
4886967
Reference the correct future implementation
paulgear Aug 19, 2025
279ae82
Include all files touched and update tasks
paulgear Aug 19, 2025
62a053f
Implement PTP Source Task with Dual-Thread Architecture
paulgear Aug 19, 2025
b30967a
Checkpoint before changing PtpSourceConfig
paulgear Aug 27, 2025
9f083ac
Replace fixed polling interval with controller-driven adaptive polling
paulgear Aug 27, 2025
0055706
Update crates
paulgear Aug 27, 2025
c3f4c39
Use fixed poll interval from configuration instead of adaptive polling
paulgear Aug 27, 2025
9781490
Add PTP source from config
paulgear Aug 27, 2025
4b7e672
3.1 Implement PTP configuration parsing from ntpd-rs config files
paulgear Aug 28, 2025
bc9328e
3.3 Implement graceful error handling for device unavailability
paulgear Aug 28, 2025
a384958
Make PTP precision parameter optional with default of 1 nanosecond
paulgear Aug 28, 2025
41c37fd
Fix PTP driver implementation
paulgear Aug 28, 2025
fad323b
Add timestamp capability detection and fallback to PTP driver
paulgear Aug 28, 2025
6e2ce5d
Remove unused code in PTP driver
paulgear Aug 28, 2025
97f9a1d
Checkpoint tasks
paulgear Sep 1, 2025
43174ae
4.4 Test system integration and message passing
paulgear Sep 1, 2025
412ed0c
4.5 Run system integration tests and fix any problems encountered
paulgear Sep 1, 2025
78f135d
5.4 Run the integration tests and fix any problems encountered
paulgear Sep 1, 2025
7315992
Add delay and stratum overrides for PTP config
paulgear Sep 2, 2025
fb2c608
Move offset calculation into PtpTimestamp and add custom debug output
paulgear Sep 2, 2025
9f976ac
Switch PTP sources from period to interval and correct ntp-ctl output
paulgear Sep 2, 2025
00d24f2
Use RFC5905-compliant PTP refid
paulgear Sep 2, 2025
97fc51e
Update documentation to include PTP driver
paulgear Sep 2, 2025
1390590
Fix failing test
paulgear Sep 2, 2025
b093b35
Fix typo
paulgear Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Added

- Support for PTP devices as sources (subject to the "ptp" compile flag, enabled by default). See docs/guide/ptp.md for details.

## [1.6.1] - 2025-07-16

### Fixed
Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ toml = { version = ">=0.6.0,<0.9.0", default-features = false, features = ["pars
timestamped-socket = "0.2.2"
clock-steering = "0.2.1"
pps-time = "0.2.3"
ptp-time = "0.1.0"

# TLS
rustls23 = { package = "rustls", version = "0.23.16", features = ["logging", "std"] }
Expand Down
11 changes: 8 additions & 3 deletions docs/development/code-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ ntpd-rs is split into several crates with three goals in mind:
straightforward to verify.

The main `ntp-proto` and `ntpd` crates are set up such that neither contains any
unsafe code. Unsafe code is limited to the (external) `timestamped-socket`, `clock-steering` and `pps-time` crates,
which are purposefully kept small and only offer a safe API.
unsafe code. Unsafe code is limited to the (external) `timestamped-socket`,
`clock-steering`, `pps-time`, and `ptp-time` crates, which are purposefully kept
small and only offer a safe API.

### ntp-proto

Expand Down Expand Up @@ -47,6 +48,11 @@ clock. Touching the system clock uses `libc` and is inherently unsafe.
The [`pps-time` crate](https://github.com/pendulum-project/pps-time) wraps the system calls needed to interact with a PPS device. To
interact with PPS devices ioctl system calls are used, which uses `libc` and is inherently unsafe.

### ptp-time

The [`ptp-time` crate](https://github.com/paulgear/ptp-time) wraps the system calls needed to interact with a PTP device. To
interact with PTP devices ioctl system calls are used, which uses `libc` and is inherently unsafe.

### ntpd

The `ntpd` crate contains the code for all three end-user binaries that our
Expand Down Expand Up @@ -140,4 +146,3 @@ an example of how to interact with this socket.

Because this task reads from its socket, it is advised to restrict the
permissions on this socket.

1 change: 1 addition & 0 deletions docs/development/prompts/ptp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This directory contains some of the prompts which were used in the AI-assisted development of the PTP driver. They may be deleted when no longer considered useful.
Loading
Loading