Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 23 additions & 12 deletions score/ts_client/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Time Sync Client
:tags: ts_client

.. comp:: Time Sync Client
:id: comp__time_ts_client
:id: comp__ts_client
:security: NO
:safety: ASIL_B
:status: valid
Expand All @@ -37,28 +37,39 @@ Time Sync Client
Abstract
========

[A short (~200 word) description of the component.]

This component encapsulates the IPC mechanisms for time synchronization data exchange between the components time_slave and time_daemon.

Specification
=============

[Describe the requirements, architecture of any component.] or
The ts_client component provides shared memory IPC channel for gPTP time synchronization data exchange between one publisher and multiple readers within ECU.

Channel lifecycle follows producer-consumer model:

How to Teach This
=================
1. **Channel setup**: Publisher creates shared memory channel and Receiver opens existing channel in read-only mode.
2. **Validation and synchronization**: Receiver validates shared memory region on open, then reads data through lock-free synchronization with concurrent write detection.
3. **Data exchange**: Channel carries synchronization status, Sync/FollowUp metadata, PDelay metadata, and time correlation data for downstream processing.

[How to teach users, new and experienced, how to apply the CR to their work.]
Key Behaviors
-------------

.. note::
For a CR that adds new functionality or changes behaviour, it is helpful to include a section on how to teach users, new and experienced, how to apply the CR to their work.
**Lock-Free Multi-Reader Access**: Multiple readers can access same shared memory channel concurrently while single publisher writes.

Footnotes
=========
**Data Integrity Handling**: Receiver reports invalid or corrupted reads when integrity checks fail.

**Platform Support**: Shared memory IPC flow supported on Linux and QNX 8.0 SDP.

**Error Reporting**: Shared memory create/open/validation failures are logged via score::mw::log.

[A collection of footnotes cited in the CR, and a place to list non-inline hyperlink targets.]
**Cache-Aware Layout**: Shared memory layout is optimized to reduce cache contention between writer and readers.

Assumptions of Use
------------------

Only one publisher process may open and write given shared memory segment. Users must configure permissions so publisher has write access and readers have read access.

Footnotes
=========

Further Documentation of the component can be found in the following sections:

Expand Down
Empty file.
3 changes: 0 additions & 3 deletions score/ts_client/docs/requirements/chklst_req_inspection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,3 @@ And also the following AoUs in "valid" state and with "inspected" tag set (for t
:columns: id;status;tags
:colwidths: 25,25,25
:sort: title

.. attention::
The above tables filtering must be updated according to your Component.
205 changes: 200 additions & 5 deletions score/ts_client/docs/requirements/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,208 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

Requirements
############
Component Time Sync Client Requirements
########################################

.. note::
Work in progress: page structure only, content to follow in later PRs.
.. document:: Time Sync Client Requirements
:id: doc__ts_client_requirements
:status: draft
:version: 1
:safety: ASIL_B
:security: NO
:realizes: wp__requirements_comp[version==1]
:tags: requirements, ts_client


Functional Requirements
-----------------------

Shared Memory Management
^^^^^^^^^^^^^^^^^^^^^^^^

.. comp_req:: Shared Memory Channel Management
:id: comp_req__ts_client__shared_memory_mgmt
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_sync[version==1], feat_req__time__vehicle_time_ctrl_flow[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall provide operations to create, open, and close shared memory channels for gPTP data exchange between time_slave and time_daemon.

.. comp_req:: Shared Memory Region Validation
:id: comp_req__ts_client__shm_validation
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_sync[version==1], feat_req__time__vehicle_time_acc_qual_api[version==1], feat_req__time__vehicle_time_time_pt_qual[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall validate shared memory region integrity on Open operations and reject regions that fail validation.

.. comp_req:: Publisher Creates Channels
:id: comp_req__ts_client__publisher_creates
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_sync[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client Publisher shall create shared memory channels that Receivers subsequently open.

.. comp_req:: Receiver Multi-Reader Semantics
:id: comp_req__ts_client__receiver_multi_reader
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_ctrl_flow[version==1]
Comment thread
ryan-steel marked this conversation as resolved.
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client Receiver shall support multiple concurrent readers accessing shared memory channels in read-only mode.

.. comp_req:: Data Validity Indication
:id: comp_req__ts_client__data_validity
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_sync[version==1], feat_req__time__vehicle_time_acc_qual_api[version==1], feat_req__time__vehicle_time_time_pt_qual[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client Receiver shall indicate whether the shared memory channel is obviously corrupted.

Data Synchronization
^^^^^^^^^^^^^^^^^^^^

.. comp_req:: Lock-Free Synchronization
:id: comp_req__ts_client__seqlock_protocol
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_sync[version==1], feat_req__time__vehicle_time_ctrl_flow[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall implement non-blocking synchronization between writer and readers and ensure readers can detect concurrent writes.

Data Exchange Interfaces
^^^^^^^^^^^^^^^^^^^^^^^^^

.. comp_req:: gPTP Synchronization Status Exchange
:id: comp_req__ts_client__sync_status_data
:reqtype: Interface
:security: NO
:safety: QM
:derived_from: feat_req__time__vehicle_time_sync[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall exchange gPTP synchronization status information containing synchronized state and timeout condition.

Comment thread
ryan-steel marked this conversation as resolved.
.. comp_req:: Sync/FollowUp Message Metadata Exchange
:id: comp_req__ts_client__sync_fup_data
:reqtype: Interface
:security: NO
:safety: QM
:derived_from: feat_req__time__vehicle_time_sync[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall exchange gPTP Sync and FollowUp message metadata containing precise origin timestamp, reference global timestamp, reference local timestamp, sync ingress timestamp, correction field, sequence identifier, path delay, port number, and clock identity.

.. comp_req:: PDelay Message Metadata Exchange
:id: comp_req__ts_client__pdelay_data
:reqtype: Interface
:security: NO
:safety: QM
:derived_from: feat_req__time__vehicle_time_sync[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall exchange gPTP Peer Delay (PDelay) message metadata containing request origin timestamp, request receipt timestamp, response origin timestamp, response receipt timestamp, path delay measurement, request port number, response port number, and request clock identity.

.. comp_req:: Time Correlation Data Exchange
:id: comp_req__ts_client__time_correlation_data
:reqtype: Interface
:security: NO
:safety: QM
:derived_from: feat_req__time__vehicle_time_sync[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall exchange time correlation data containing synchronized PTP assumed time, local system time reference, and clock rate deviation.

Platform Abstraction
^^^^^^^^^^^^^^^^^^^^

.. comp_req:: Platform Support
:id: comp_req__ts_client__platform_support
:reqtype: Functional
:security: NO
:safety: QM
:derived_from: feat_req__time__vehicle_time_sync[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall support POSIX and QNX 8.0 SDP platforms for shared memory operations and inter-process communication.

Non-Functional Requirements
---------------------------

.. comp_req:: Cache-Optimized Memory Layout
:id: comp_req__ts_client__cache_optimization
:reqtype: Non-Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_ctrl_flow[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall optimize shared memory layout to prevent cache contention between concurrent writer and reader processes.

Assumption of Use Requirements
------------------------------

.. aou_req:: Single Publisher Process
:id: aou_req__ts_client__single_publisher
:reqtype: Process
:security: NO
:safety: ASIL_B
:status: valid
:version: 1

The ts_client user shall ensure that only one publisher process opens and writes to a shared memory segment to maintain data consistency. Multiple publishers writing to the same segment will cause data corruption and readers will receive invalid data.

.. aou_req:: Shared Memory Permissions
:id: aou_req__ts_client__shm_permissions
:reqtype: Process
:security: NO
:safety: ASIL_B
:status: valid
:version: 1

The user shall configure system permissions to allow publisher write access and readers read access to shared memory segments. Incorrect permissions will cause channel creation or opening failures.

.. needextend:: "c.this_doc()"
:+tags: ts_client

.. toctree::
:maxdepth: 1

requirements
chklst_req_inspection
111 changes: 0 additions & 111 deletions score/ts_client/docs/requirements/requirements.rst

This file was deleted.

Loading