Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Working on #382
Slave-only for now.
I've implemented PTPv1-related functions side-by-side in the same
impl
blocks that PTPv2 implementation. Some logic was adjusted to the IEEE1588-2002 specification, some was reused or copied without logical changes, so probably not yet standard-compliant. But it works as a slave in Dante network.Putting it here early because I want your opinion on this approach, or maybe you have a better idea of code organization?
To do:
TODO DRY
)local_clock_stratum
,local_clock_identifier
,epoch_numer
, in PtpInstanceState:clock_class
,clock_accuracy
I've put the following remark in a comment:
But it is requiring library user to do something that could be already implemented in Statime. But implementing it in the library would require a refactor, adding an intermediate layer because we want one physical port to correspond to multiple IEEE1588 ports so that PTPv1 slave clock can be PTPv2 master or vice versa (inter-version boundary clock, Dante devices do this)
How to run:
add
protocol-version = "PTPv1"
to port config