feat: add TimeSlave process and libTSClient shm IPC channel#8
Open
gordon9901 wants to merge 4 commits intoeclipse-score:mainfrom
Open
feat: add TimeSlave process and libTSClient shm IPC channel#8gordon9901 wants to merge 4 commits intoeclipse-score:mainfrom
gordon9901 wants to merge 4 commits intoeclipse-score:mainfrom
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat: introduce TimeSlave process and libTSClient IPC channel
Summary
This PR splits the gPTP protocol stack out of
TimeDaemoninto a new standalone process —TimeSlave— and introduces a lightweight shared-memory IPC library (libTSClient) so thatTimeDaemoncan consumePtpTimeInfosnapshots fromTimeSlavewithout running the raw-socket protocol itself.Changes
score/TimeSlave/(new) A self-contained gPTP slave process (score::ts::TimeSlave) that:GptpEngine(existingRxThread+PdelayThreadlogic) to participate in IEEE 802.1AS protocol.raw_socket,network_identity,phc_adjuster).probe) and recording (recorder) capabilities.PtpTimeInfosnapshots to shared memory viaGptpIpcPublisher.score/libTSClient/(new) A process-boundary IPC library providing:GptpIpcRegion— 64-byte cache-line-aligned shared memory layout with a seqlock (seq/seq_confirm) for lock-free single-writer / multi-reader access.GptpIpcPublisher— creates and writes to the POSIX shared memory segment (used byTimeSlave).GptpIpcReceiver— opens and reads from the segment with seqlock retry (used byTimeDaemonviaRealPTPEngine).score/TimeDaemon/code/ptp_machine/real/(new)RealPTPEngine— aPTPEngine-compatible adapter backed byGptpIpcReceiver.GPTPRealMachine— type alias forPTPMachine<RealPTPEngine>, slotting cleanly into the existingTimeDaemonpipeline.CreateGPTPRealMachine()— factory function for convenient construction.score/TimeDaemon/code/common/BUILD,data_types/BUILD(modified) Widened Bazel visibility from//score/TimeDaemon:__subpackages__to//score:__subpackages__so thatTimeSlaveandlibTSClientcan reuse shared data types (PtpTimeInfo, etc.) without duplication.score/TimeDaemon/code/ptp_machine/BUILD(modified) Added//score/TimeDaemon/code/ptp_machine/real:unit_test_suiteto the aggregated test target.Architecture
Test Coverage
Ticket:eclipse-score/score#2691