Skip to content

Improvement:Update the timeslave to comply to SCORE conventions and add full-chain demo#28

Open
gordon9901 wants to merge 3 commits into
eclipse-score:mainfrom
gordon9901:ecarx_update_timeslave
Open

Improvement:Update the timeslave to comply to SCORE conventions and add full-chain demo#28
gordon9901 wants to merge 3 commits into
eclipse-score:mainfrom
gordon9901:ecarx_update_timeslave

Conversation

@gordon9901
Copy link
Copy Markdown
Contributor

@gordon9901 gordon9901 commented May 22, 2026

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_daemontime IPC 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:

fake_time_slave → demo_time_daemon → demo_app

Changes

gPTP IPC migration

  • Added new package:

    score/ts_client/src/
    
  • Replaces previous usage of:

    score/libTSClient/
    
  • Migrated publisher and receiver shared memory handling to SharedMemoryFactory.

  • Added stale artifact cleanup before shared memory creation.

  • Preserved existing GptpIpcRegion and GptpIpcData structures unchanged.

  • Added a new gptp_ipc BUILD target with dependency on:

    @score_baselibs//score/memory/shared
    

TimeDaemon call-site update

Updated the TimeDaemon gPTP SHM call sites to use the new package path.

Affected area:

score/TimeDaemon/code/ptp_machine/shm/

Main updates:

  • BUILD dependency updates.
  • Include path updates from score/libTSClient/ to score/ts_client/src/.

Build fix

Updated:

score/time_slave/src/gptp/details/BUILD

Added missing log backend dependency to related cc_test targets:

@score_baselibs//score/mw/log:console_only_backend

This fixes pre-existing linker errors unrelated to the shared memory migration.

Full-chain demo

Added demo sources under:

examples/full_chain_demo/

Included components:

  • fake_time_slave.cpp

    • Simulates TimeSlave.
    • Writes gPTP IPC data periodically.
  • demo_time_daemon.cpp

    • Reads gPTP shared memory.
    • Publishes SVT without lifecycle manager.
  • demo_app.cpp

    • Reads SynchronizedVehicleTime from TimeDaemon.
    • BUILD target is currently commented out pending include path confirmation.
  • svt_handler_shm.* / factory_shm.*

    • Reference backups for wiring GPTPShmMachine into the SVT pipeline.

Notes

  • The seqlock protocol is not changed.
  • Existing gPTP IPC data layout is not changed.
  • Demo-related files are intended for target-board validation and integration reference.

Task:#20

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: 1dc99f24-3e0d-4e0b-9c41-bb957a711dc0
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@1.5.3, but got aspect_rules_lint@2.0.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Loading: 
Loading: 2 packages loaded
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)

Analyzing: target //:license-check (77 packages loaded, 9 targets configured)

Analyzing: target //:license-check (143 packages loaded, 833 targets configured)

Analyzing: target //:license-check (157 packages loaded, 4292 targets configured)

Analyzing: target //:license-check (158 packages loaded, 7983 targets configured)

Analyzing: target //:license-check (169 packages loaded, 8049 targets configured)

Analyzing: target //:license-check (169 packages loaded, 8049 targets configured)

Analyzing: target //:license-check (169 packages loaded, 8049 targets configured)

Analyzing: target //:license-check (170 packages loaded, 8049 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10058 targets configured)

INFO: Analyzed target //:license-check (174 packages loaded, 10184 targets configured).
[3 / 14] checking cached actions
[13 / 16] [Prepa] Generating Dash formatted dependency file ...
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[14 / 16] checking cached actions
[15 / 16] [Prepa] Building license.check.license_check.jar ()
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 39.128s, Critical Path: 2.32s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

@gordon9901 gordon9901 requested a deployment to workflow-approval May 22, 2026 07:13 — with GitHub Actions Waiting
@gordon9901 gordon9901 requested a deployment to workflow-approval May 22, 2026 07:13 — with GitHub Actions Waiting
@gordon9901 gordon9901 requested a review from lavrovvalera May 22, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant