Improvement:Update the timeslave to comply to SCORE conventions and add full-chain demo#28
Improvement:Update the timeslave to comply to SCORE conventions and add full-chain demo#28gordon9901 wants to merge 3 commits into
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
BjoernAtBosch
left a comment
There was a problem hiding this comment.
Some comments added.
Main thing to discuss: Shall we "rename" the executables to snake_case or keep CamelCase?
|
|
||
| node "TimeDaemon" { | ||
| node "time_daemon" { | ||
| [MessageBroker] as msg_broker |
| end box | ||
|
|
||
| box TimeDaemon: Absolute Time Pipeline #MistyRose | ||
| box time_daemon: Absolute Time Pipeline #MistyRose |
There was a problem hiding this comment.
I think, we should not rename it here because the process (and main C++ class) are still called TimeDaemon
| } | ||
|
|
||
| node "TimeDaemon" { | ||
| node "time_daemon" { |
| @@ -1,17 +1,17 @@ | |||
| Concept for TimeDaemon | |||
|
|
||
| cc_binary( | ||
| name = "TimeSlave", | ||
| name = "time_slave", |
There was a problem hiding this comment.
Do we want to rename the processes also?
| { | ||
| ::close(shm_fd_); | ||
| shm_fd_ = -1; | ||
| Close(); |
| @@ -35,34 +32,23 @@ GptpIpcPublisher::~GptpIpcPublisher() | |||
|
|
|||
| bool GptpIpcPublisher::Init(const std::string& ipc_name) | |||
There was a problem hiding this comment.
Maybe same as for the receiver: Open/Close instead of Init/Destroy (me personally don't like the term destroy for a function that much because that's what the destructor is doing)
| @@ -1,24 +1,24 @@ | |||
| Concept for TimeSlave | |||
| Concept for time_slave | |||
There was a problem hiding this comment.
I think we should shortly discuss how we want to name the executables (snake case or camel case). Don't actually know if their is some S-CORE convention.
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| Feature Requirements |
There was a problem hiding this comment.
I think, the feature requirements are maintained in the score repo. See https://github.com/eclipse-score/score/blob/main/docs/features/time/docs/requirements/index.rst
| ********************************************************************************/ | ||
|
|
||
| // Usage: ./demo_app [iterations] (default: runs forever until Ctrl-C) | ||
|
|
There was a problem hiding this comment.
Why not using the TimeDaemon binary here?
Summary
Replaces the raw POSIX shared memory implementation in the gPTP IPC library with
score::memory::shared::SharedMemoryFactory.This aligns gPTP IPC shared memory lifecycle management with the existing
time_daemon→timeIPC pattern.The existing seqlock concurrency protocol is preserved unchanged.
A full-chain demo is also added for end-to-end validation on the target board:
Changes
gPTP IPC migration
Added new package:
Replaces previous usage of:
Migrated publisher and receiver shared memory handling to
SharedMemoryFactory.Added stale artifact cleanup before shared memory creation.
Preserved existing
GptpIpcRegionandGptpIpcDatastructures unchanged.Added a new
gptp_ipcBUILD target with dependency on:TimeDaemon call-site update
Updated the TimeDaemon gPTP SHM call sites to use the new package path.
Affected area:
Main updates:
score/libTSClient/toscore/ts_client/src/.Build fix
Updated:
Added missing log backend dependency to related
cc_testtargets:This fixes pre-existing linker errors unrelated to the shared memory migration.
Full-chain demo
Added demo sources under:
Included components:
fake_time_slave.cppTimeSlave.demo_time_daemon.cppdemo_app.cppSynchronizedVehicleTimefromTimeDaemon.svt_handler_shm.*/factory_shm.*GPTPShmMachineinto the SVT pipeline.Notes
Task:#20