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
38 changes: 21 additions & 17 deletions score/ts_client/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ Time Sync Client
:id: doc__ts_client
:status: draft
:version: 1
:safety: ASIL_B
:safety: QM
:security: NO
:realizes: wp__cmpt_request
: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,29 +37,33 @@ Time Sync Client
Abstract
========

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

This component provides IPC mechanisms for time synchronization data exchange between time daemons and client applications within an ECU.

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

[Describe the requirements, architecture of any component.] or


How to Teach This
=================

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

.. 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.
The component provides shared memory-based IPC for distributing time synchronization data with thread-safe, low-latency access:

* :need:`comp_req__ts_client__shared_memory_mgmt`
* :need:`comp_req__ts_client__shm_validation`
* :need:`comp_req__ts_client__publisher_creates`
* :need:`comp_req__ts_client__receiver_multi_reader`
* :need:`comp_req__ts_client__data_validity`
* :need:`comp_req__ts_client__seqlock_protocol`
* :need:`comp_req__ts_client__sync_status_data`
* :need:`comp_req__ts_client__sync_fup_data`
* :need:`comp_req__ts_client__pdelay_data`
* :need:`comp_req__ts_client__time_correlation_data`
* :need:`comp_req__ts_client__platform_linux`
* :need:`comp_req__ts_client__platform_qnx`
* :need:`comp_req__ts_client__error_reporting`
* :need:`comp_req__ts_client__cache_optimization`
* :need:`aou_req__ts_client__single_publisher`
* :need:`aou_req__ts_client__shm_permissions`

Footnotes
=========

[A collection of footnotes cited in the CR, and a place to list non-inline hyperlink targets.]


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

Component Detail Information
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.
232 changes: 227 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,235 @@
# 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]
: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 daemon and time-aware applications.

.. 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]
: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]
: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]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client Receiver shall indicate whether received data is valid or 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]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall implement lock-free synchronization between writer and readers to prevent blocking 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: ASIL_B
: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, timeout condition, time discontinuity detection (future and past), and correctness indication.

.. comp_req:: Sync/FollowUp Message Metadata Exchange
:id: comp_req__ts_client__sync_fup_data
:reqtype: Interface
: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 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: ASIL_B
: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: ASIL_B
: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:: Linux Platform Support
:id: comp_req__ts_client__platform_linux
: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 component shall support Linux platforms for shared memory operations and inter-process communication.

.. comp_req:: QNX Platform Support
:id: comp_req__ts_client__platform_qnx
: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 component shall support QNX 8.0 SDP platforms for shared memory operations and inter-process communication.

Error Handling
^^^^^^^^^^^^^^

.. comp_req:: Error Reporting
:id: comp_req__ts_client__error_reporting
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__time__vehicle_time_sync_log[version==1]
:status: valid
:version: 1
:satisfied_by: comp__ts_client

The ts_client component shall log messages via the score::mw::log interface when shared memory operations fail (error level), validation errors occur (error level), or channel creation/opening fails (error level).

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 shared memory permissions to allow publisher write access and reader read access. Incorrect permissions will cause channel creation or opening failures.

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

.. toctree::
:maxdepth: 1

requirements
chklst_req_inspection
Loading
Loading