From 995831f18642f682482f9fccd734727d941803a8 Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Thu, 13 Aug 2026 17:16:19 +0100 Subject: [PATCH 1/5] docs: migrate docs/features/time_daemon to component --- docs/features/time_daemon/index.rst | 988 ------------------ .../_assets/app/app_class.puml | 0 .../_assets/app/app_init_seq.puml | 0 .../_assets/app/app_workflow_seq.puml | 0 .../_assets/ctrlflow/ctrlflow_class.puml | 0 .../_assets/ctrlflow/ctrlflow_init_seq.puml | 0 .../ctrlflow/ctrlflow_workflow_seq.puml | 0 .../detailed_design}/_assets/dd_class.puml | 0 .../_assets/dd_data_control_flow.puml | 0 .../_assets/dd_deployment.puml | 0 .../abs_time/abs_time_data_control_flow.puml | 0 .../abs_time/abs_time_deployment.puml | 0 .../examples/qvt/qvt_data_control_flow.puml | 0 .../_assets/examples/qvt/qvt_deployment.puml | 0 .../_assets/ipc/ipc_class.puml | 0 .../_assets/ipc/ipc_init_seq.puml | 0 .../_assets/ipc/ipc_publish_seq.puml | 0 .../_assets/ipc/ipc_receive_seq.puml | 0 .../_assets/msg_broker/msg_broker_class.puml | 0 .../msg_broker/msg_broker_init_seq.puml | 0 .../msg_broker/msg_broker_workflow_seq.puml | 0 .../detailed_design}/_assets/mw/mw_class.puml | 0 .../_assets/mw/mw_time_receive_seq.puml | 0 .../mw/mw_time_receive_simple_seq.puml | 0 .../ptp_machine/ptp_machine_class.puml | 0 .../ptp_machine_get_new_data_seq.puml | 0 .../ptp_machine/ptp_machine_init_seq.puml | 0 .../_assets/sad_deployment.puml | 0 .../_assets/ver_machine/ver_class.puml | 0 .../_assets/ver_machine/ver_init_seq.puml | 0 .../ver_machine/ver_verification_seq.puml | 0 .../docs/detailed_design/detailed_design.rst | 96 -- .../docs/detailed_design/index.rst | 940 ++++++++++++++++- 33 files changed, 927 insertions(+), 1097 deletions(-) delete mode 100644 docs/features/time_daemon/index.rst rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/app/app_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/app/app_init_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/app/app_workflow_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ctrlflow/ctrlflow_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ctrlflow/ctrlflow_init_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ctrlflow/ctrlflow_workflow_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/dd_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/dd_data_control_flow.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/dd_deployment.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/examples/abs_time/abs_time_data_control_flow.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/examples/abs_time/abs_time_deployment.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/examples/qvt/qvt_data_control_flow.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/examples/qvt/qvt_deployment.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ipc/ipc_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ipc/ipc_init_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ipc/ipc_publish_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ipc/ipc_receive_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/msg_broker/msg_broker_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/msg_broker/msg_broker_init_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/msg_broker/msg_broker_workflow_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/mw/mw_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/mw/mw_time_receive_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/mw/mw_time_receive_simple_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ptp_machine/ptp_machine_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ptp_machine/ptp_machine_init_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/sad_deployment.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ver_machine/ver_class.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ver_machine/ver_init_seq.puml (100%) rename {docs/features/time_daemon => score/time_daemon/docs/detailed_design}/_assets/ver_machine/ver_verification_seq.puml (100%) delete mode 100644 score/time_daemon/docs/detailed_design/detailed_design.rst diff --git a/docs/features/time_daemon/index.rst b/docs/features/time_daemon/index.rst deleted file mode 100644 index 9af39f65..00000000 --- a/docs/features/time_daemon/index.rst +++ /dev/null @@ -1,988 +0,0 @@ -Concept for TimeDaemon -======================= - -.. contents:: Table of Contents - :depth: 3 - :local: - -TimeDaemon concept -------------------- - -Use Cases -~~~~~~~~~ - -TimeDaemon is the non Autosar adaptive process who is intended to get the Vehicle Time from the ptp slave daemon (ptpd or any other), verify and validate the timepoints and distribute time information across the clients. - -More precisely we can specify the following use cases for the time daemon: - -1. Providing current Vehicle time to different applications -2. Setting the synchronization qualifier (aka Synchronized, Timeout, so on) -3. Providing needed information for diagnostics -4. Providing needed information for addition verification, ex SafeCarTime - -The raw architectural diagram is represented below. - -.. raw:: html - -
- -.. uml:: _assets/sad_deployment.puml - :alt: Raw architectural diagram - -.. raw:: html - -
- -Components decomposition -~~~~~~~~~~~~~~~~~~~~~~~~~ - -The design consists of several sw components: - -1. `Application <#application-sw-component>`_ -2. `Message Broker <#message-broker-sw-component>`_ -3. `ControlFlowDivider <#controlflowdivider-sw-component>`_ -4. `PTP Machine <#ptp-machine-sw-component>`_ -5. `Verification Machine <#verification-machine-sw-component>`_ -6. `IPC Machine <#ipc-machine-sw-component>`_ -7. `VehicleClock (score::time) <#vehicleclock-sw-component>`_ - -Deployment view -~~~~~~~~~~~~~~~ - -The design deployment is represented on the following diagram: - -.. raw:: html - -
- -.. uml:: _assets/dd_deployment.puml - :alt: Deployment View - -.. raw:: html - -
- -Class view -~~~~~~~~~~ - -Main classes and components are presented on this diagram: - -.. raw:: html - -
- -.. uml:: _assets/dd_class.puml - :alt: Class View - :width: 100% - :align: center - -.. raw:: html - -
- -Data and control flow -~~~~~~~~~~~~~~~~~~~~~ - -The Data and Control flow are presented in the following diagram: - -.. raw:: html - -
- -.. uml:: _assets/dd_data_control_flow.puml - :alt: Data and Control flow View - -.. raw:: html - -
- -On this view you could see several "workers" scopes: - -1. PTP retrieving scope -2. PTPTimeInfo handling scope -3. PTPTimeInfo receiving on Application side scope - -Each control flow is implemented with the dedicated thread or process and is independent form another ones. - -Control flows -^^^^^^^^^^^^^ - -PTP retrieving scope -'''''''''''''''''''' - -This control flow is responsible for the: - -1. retrieve the latest information from the ptp stack and -2. provide it to the ``PTPTimeInfo handling`` control flow - -PTPTimeInfo handling scope -''''''''''''''''''''''''''' - -This control flow is responsible for the: - -1. Validate the time information, provided by the ``PTP retrieving`` workflow and -2. publish it to the ``Applications`` via some IPC - -PTPTimeInfo receiving on Application side scope -'''''''''''''''''''''''''''''''''''''''''''''''' - -This control flow is responsible for the: - -1. Propagate the time information from the ``PTPTimeInfo handling`` to the business logic of the applications. - -Data types or events -^^^^^^^^^^^^^^^^^^^^ - -There are also several data types, which components are communicating to each other: - -Raw ptp data -'''''''''''' - -``raw_ptp_data`` is the data, which is provided by ``PTPMachine`` component and is just the raw data from ptp stack. is handled in the "PTP retrieving scope" - -Input ptp data -'''''''''''''' - -``input_ptp_data`` is the same data as `raw_ptp_data <#raw-ptp-data>`_ but which is handled already in "PTPTimeInfo handling scope" - -Verified ptp data -''''''''''''''''' - -``verified_ptp_data`` is the `input_ptp_data <#input-ptp-data>`_ which was verified according to the business logic and updated accordingly. This data should be published to the Applications. - -SW Components decomposition -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Application SW component -^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``Application`` component is the main entry point for the ``TimeDaemon``. It is responsible for orchestrating the overall lifecycle and initialization of all daemon components. - -The ``TimebaseHandler`` component is an timebase-specific logic implementation. There might be several handlers available in the ``Application`` per amount of timebases supported. This separation allows for different timebase implementations while maintaining a consistent application structure. - -Component requirements -'''''''''''''''''''''' - -The ``Application`` has the following requirements: - -- The ``Application`` shall implement the ``Initialize()`` method to create and initialize all daemon components -- The ``Application`` shall implement the ``Run()`` method to start all components and wait for termination -- The ``Application`` shall connect components to the ``MessageBroker`` by setting up all required subscriptions during initialization stage -- The ``Application`` shall support extension for different timebases. - -Class view -'''''''''' - -The Class Diagram is presented below: - -.. raw:: html - -
- -.. uml:: _assets/app/app_class.puml - :alt: Class Diagram - -.. raw:: html - -
- -Initialization flow -''''''''''''''''''' - -During initialization, the ``Application`` uses the ``MachineFactory`` to create, configure and subscribe all components in a specific order: - -- Create the ``MessageBroker`` first, as other components depend on it -- Create ProactiveMachines (``PtpMachine``, ``ControlFlowDivider``) that drive system behavior - - - Initialize each component - - Set up MessageBroker subscriptions to component notifications - - Set up component subscriptions to MessageBroker topics - -- Create ReactiveMachines (``VerificationMachine``, ``IPCMachine``) that respond to events - - - Initialize each component - - Set up MessageBroker subscriptions to component notifications - - Set up component subscriptions to MessageBroker topics - -The initialization workflow is represented in the following sequence diagram: - -.. raw:: html - -
- -.. uml:: _assets/app/app_init_seq.puml - :alt: Initialization workflow - -.. raw:: html - -
- -Execution and shutdown flow -'''''''''''''''''''''''''''' - -During execution, the ``Application``: - -- Starts all ``ProactiveMachines`` in the correct order -- Monitors the stop token for termination requests -- When termination is requested, stops all ``ProactiveMachines`` in reverse order - -The execution and shutdown workflow is represented in the following sequence diagram: - -.. raw:: html - -
- -.. uml:: _assets/app/app_workflow_seq.puml - :alt: Execution workflow - -.. raw:: html - -
- -Message Broker SW component -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``Message Broker`` component is the central communication hub that implements the Publish-Subscribe pattern within the ``TimeDaemon``. It enables decoupled communication between components by managing topics and distributing messages to interested subscribers. - -The component maintains a registry of topics and their subscribers, delivering messages to all registered subscribers when a component publishes to a topic. This decoupling allows components to evolve independently without direct dependencies on each other. - -Component requirements -'''''''''''''''''''''' - -The ``Message Broker`` has the following requirements: - -- The ``Message Broker`` shall maintain a registry of topics and their subscribers -- The ``Message Broker`` shall allow components to subscribe to topics of interest -- The ``Message Broker`` shall distribute messages to all subscribers when a topic is published to - -Class view -'''''''''' - -The Class Diagram is presented below: - -.. raw:: html - -
- -.. uml:: _assets/msg_broker/msg_broker_class.puml - :alt: Class Diagram - -.. raw:: html - -
- -Initialization flow -''''''''''''''''''' - -During initialization, all machine objects, see ``BaseMachine``, the ``Application`` component needs to subscribe machines to ``Message Broker`` to the topics of interest. - -The initialization workflow is represented in the following sequence diagram: - -.. raw:: html - -
- -.. uml:: _assets/msg_broker/msg_broker_init_seq.puml - :alt: Initialization workflow - -.. raw:: html - -
- -Message flow -'''''''''''' - -The message flow through the ``Message Broker`` is represented in the following sequence diagram: - -.. raw:: html - -
- -.. uml:: _assets/msg_broker/msg_broker_workflow_seq.puml - :alt: Message DiagramFlow - -.. raw:: html - -
- -Concurrency aspects -''''''''''''''''''' - -The ``Message Broker`` doesn't provide any synchronization between the publish-callback invoking processes. -Moreover, the callback invoke will happened in the scope of the thread, where the ``publish`` method is called. -To separate the control flows, the `ControlFlowDivider <#controlflowdivider-sw-component>`_ shall be used - -Scalability -''''''''''' - -The ``Message Broker`` can be extended to support configuration-driven subscriptions, where topic relationships are defined in configuration files rather than hardcoded. - -ControlFlowDivider SW component -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``ControlFlowDivider`` component is responsible for separating control (execution) flows within the ``TimeDaemon`` and providing the execution control flow for the data processing. It contains dedicated threads where data is published to the ``Message Broker``, ensuring that blocking operations in one component do not affect the execution of other components and data missing is not affecting the data analysis in processing pipeline. - -This component acts as a crucial intermediary that maintains the responsiveness of the system by decoupling the execution contexts of different operations, particularly between the PTP data retrieval and the time data processing pipelines. - -Component requirements -'''''''''''''''''''''' - -The ``ControlFlowDivider`` has the following requirements: - -- The ``ControlFlowDivider`` shall provide separate execution threads for different control flows -- The ``ControlFlowDivider`` shall isolate components from execution time variations in other components -- The ``ControlFlowDivider`` shall maintain consistent data publishing rates to the subscribers -- The ``ControlFlowDivider`` shall push the last received data to the subscribers if there is no new data for some time with the predefined rate, to avoid data missing in the processing pipeline -- The ``ControlFlowDivider`` shall enable periodic processing of the pipeline through consistent event generation -- The ``ControlFlowDivider`` shall buffer incoming data from fast producers - -Class view -'''''''''' - -The Class Diagram is presented below: - -.. raw:: html - -
- -.. uml:: _assets/ctrlflow/ctrlflow_class.puml - :alt: Class Diagram - -.. raw:: html - -
- -Initialization flow -''''''''''''''''''' - -During initialization, the ``ControlFlowDivider`` performs the following steps: - -- Initialize internal data structures (queue, mutex, condition variable) -- Create a worker thread to process data independently -- Start the worker thread which enters a waiting state - -The initialization workflow is represented in the following sequence diagram: - -.. raw:: html - -
- -.. uml:: _assets/ctrlflow/ctrlflow_init_seq.puml - :alt: Initialization workflow - -.. raw:: html - -
- -Message flow -'''''''''''' - -When the ``ControlFlowDivider`` receives new data from the ``PTP Machine`` via the ``Message Broker``, it processes it through the following workflow: - -1. The ``Message Broker`` executes the onNewData callback and provides the new data -2. The data is placed in a thread-safe queue and exists from the callback -3. The worker thread wakes up, retrieves the data from the queue and -4. The worker thread publishes the retrieved data to the `input_ptp_data <#input-ptp-data>`_ topic -5. if there was no data for some timeout, the worker shall published the empty data to the `input_ptp_data <#input-ptp-data>`_ topic. - -This separation of control flows ensures that slow or blocking operations in the PTP stack communication do not affect the responsiveness of time data processing in the ``TimeDaemon``. - -The execution workflow is represented in the following sequence diagram: - -.. raw:: html - -
- -.. uml:: _assets/ctrlflow/ctrlflow_workflow_seq.puml - :alt: Execution workflow - -.. raw:: html - -
- -PTP Machine SW component -^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``PTP Machine`` component shall retrieve all needed information from the ptp stack (ex ``ptpd``) and provide it to the ``Message Broker`` for routing. -All communication with the ptp stack ight use ``devctl`` calls, which take some time, thus these calls shall be done in the dedicated thread. - -Component requirements -'''''''''''''''''''''' - -The ``PTP Machine`` has the following requirements: - -- The ``PTP Machine`` shall retrieve the latest time information from the PTP stack (e.g., ``ptpd``) -- The ``PTP Machine`` shall publish retrieved time information to the ``Message Broker`` using the defined topic -- The ``PTP Machine`` shall format data according to the ``PtpTimeInfo`` structure required by downstream components -- The ``PTP Machine`` shall retrieve time information at a consistent rate to maintain time synchronization -- The ``PTP Machine`` shall maintain consistent publishing rates for time data even when experiencing delays in PTP stack communication. -- The ``PTP Machine`` shall support exchangeability with different PTP stack implementations - -Class view -'''''''''' - -The Class Diagram is presented below. - -.. raw:: html - -
- -.. uml:: _assets/ptp_machine/ptp_machine_class.puml - :alt: Class Diagram - -.. raw:: html - -
- -As long as it wraps the particular communication with the ptp stack, the implementations should be easily exchangeable with another one in case of stack change. - -Component initialization -''''''''''''''''''''''''' - -During initialization the ``PTP Machine`` shall initialize the ptp stack to be able to communicate with it. - -The initialization workflow is described below. - -.. raw:: html - -
- -.. uml:: _assets/ptp_machine/ptp_machine_init_seq.puml - :alt: Initialization workflow - -.. raw:: html - -
- -Publish new data -'''''''''''''''' - -After ``PTP Machine`` collects new data from the ptp stack, the component shall publish it to the ``Message Broker`` as `raw-ptp-data <#raw-ptp-data>`_. - -The publish workflow is described below. - -.. raw:: html - -
- -.. uml:: _assets/ptp_machine/ptp_machine_get_new_data_seq.puml - :alt: Publish workflow - -.. raw:: html - -
- -Verification Machine SW component -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``Verification Machine`` component is responsible for validating and qualifying the time information received from the ``PTP Machine``. It applies various validation rules to ensure the time data meets quality requirements before distribution to applications. - -The component implements a pipeline pattern where each stage performs a specific validation and adds appropriate qualifiers to the time data. This modular design allows for easy extension with additional validation steps. - -Component requirements -'''''''''''''''''''''' - -The ``Verification Machine`` has the following requirements: - -- The ``Verification Machine`` shall validate and qualify time information received from the PTP Machine -- The ``Verification Machine`` shall validate if the time base is synchronized state -- The ``Verification Machine`` shall validate if the time base is in timeout state -- The ``Verification Machine`` shall validate timestamp for time jumps based on local clock -- The ``Verification Machine`` shall subscribe to the `input_ptp_data <#input-ptp-data>`_ topic via the ``Message Broker`` -- The ``Verification Machine`` shall publish verified time data to the ``Message Broker`` using the `verified-ptp-data <#verified-ptp-data>`_ topic -- The ``Verification Machine`` shall support extensibility to add new validation stages in the pipeline - -Class view -'''''''''' - -The Class Diagram is presented below. - -.. raw:: html - -
- -.. uml:: _assets/ver_machine/ver_class.puml - :alt: Class Diagram - -.. raw:: html - -
- -Component initialization -''''''''''''''''''''''''' - -During initialization, the ``Verification Machine`` performs the following steps: - -1. Set up the validation pipeline by creating and connecting validation stages - -The component shall be subscribed by the ``Application`` to the `input_ptp_data <#input-ptp-data>`_ topic of the ``MessageBroker`` - -The initialization workflow is represented in the following sequence diagram: - -.. raw:: html - -
- -.. uml:: _assets/ver_machine/ver_init_seq.puml - :alt: Initialization workflow - -.. raw:: html - -
- -Data verification workflow -''''''''''''''''''''''''''' - -When the ``Verification Machine`` receives new PTP data, it processes it through the validation pipeline: - -.. raw:: html - -
- -.. uml:: _assets/ver_machine/ver_verification_seq.puml - :alt: Validation pipeline - -.. raw:: html - -
- -IPC Machine SW component -^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``IPC Machine`` component shall get the `verified-ptp-data <#verified-ptp-data>`_ from the ``Verification Machine`` and provide it to the ``VehicleClock`` backend (see :doc:`score::time — Unified Clock Interface <../time/index>`) through a custom shared memory channel. - -The component provides two sub components: publisher and receiver to be deployed on the TimeDaemon and Application sides accordingly. - -Component requirements -'''''''''''''''''''''' - -The ``IPC Machine`` has the following requirements: - -- The ``IPC Machine`` shall provide verified time data to the ``VehicleClock`` backend component through a custom shared memory channel -- The ``IPC Machine`` shall create and initialize the IPC -- The ``IPC Machine`` shall support multiple client applications accessing the same time data -- The ``IPC Machine`` shall subscribe to the `verified_ptp_data <#verified-ptp-data>`_ topic via the ``Message Broker`` - -Class view -'''''''''' - -The Class Diagram is presented below. - -.. raw:: html - -
- -.. uml:: _assets/ipc/ipc_class.puml - :alt: Class Diagram - -.. raw:: html - -
- -Component initialization -''''''''''''''''''''''''' - -Initialization is divided to two parts: - -1. Initialization on the TimeDaemon side -2. Initialization on the Application side - -Important thing, the shared memory IPC publisher shall be created and offered by the ``TimeDaemon`` before the Application side subscriber can connect. The Application shall retry until the service is found. - -The main workflow is described below. - -.. raw:: html - -
- -.. uml:: _assets/ipc/ipc_init_seq.puml - :alt: Main workflow - -.. raw:: html - -
- -The component shall be subscribed during initialization by the ``Application`` on the `verified-ptp-data <#verified-ptp-data>`_ updates from the ``Message Broker`` - -Publish new data -'''''''''''''''' - -When ``IPC Machine`` receives the new `verified-ptp-data <#verified-ptp-data>`_ from Message Broker, it shall serialize data and write it to shared memory. - -As long as there are different use cases by using it, like: - -1. Get current Vehicle time -2. Get data for diagnostics - -All ``PtpTimeInfo`` data (or almost all) shall be published to the subscribed applications. - -The publish workflow is described below. - -.. raw:: html - -
- -.. uml:: _assets/ipc/ipc_publish_seq.puml - :alt: Publish workflow - -.. raw:: html - -
- -Receive data -'''''''''''' - -From Application side the receiver shall read from shared memory via the IPC receiver component and provide the data to the caller. - -The receive workflow is described below. - -.. raw:: html - -
- -.. uml:: _assets/ipc/ipc_receive_seq.puml - :alt: Receive workflow - -.. raw:: html - -
- -VehicleClock SW component -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -``VehicleClock`` (``score::time::Clock``) is the client-side API through which -applications access vehicle time. Its ``td_impl`` backend connects to the ``IPC Machine`` receiver -to receive the time data published by the ``TimeDaemon``. - -For the full API description, test patterns, and Bazel dependencies, see -:doc:`score::time — Unified Clock Interface <../time/index>`. - -Component requirements -'''''''''''''''''''''' - -The ``VehicleClock`` has the following requirements: - -- The ``VehicleClock`` backend shall expose vehicle time and its synchronization status to applications -- The ``VehicleClock`` backend shall retrieve time data from the ``IPC Machine`` receiver component -- The ``VehicleClock`` backend shall adjust vehicle time with local clock to provide accurate timestamps -- The ``VehicleClock`` backend shall support fast and low-latency time access via the ``Now()`` method - -Class view -'''''''''' - -The Class Diagram is presented below. - -.. raw:: html - -
- -.. uml:: _assets/mw/mw_class.puml - :alt: Class Diagram - -.. raw:: html - -
- -Receive data -'''''''''''' - -In case of receiving data, the ``Application`` shall just call ``VehicleClock::GetInstance().Now()`` (see :doc:`score::time <../time/index>`) and it shall return the latest published Vehicle Time, which is already adjusted with local clock. - -To do so, in the ``VehicleClock`` ``td_impl`` backend there is a thread, who polls for new data the ``IPCMachine::receiver`` and put the data to the process-internal shared buffer (memory), from where it is being read on ``VehicleClock::GetInstance().Now()`` call. - -The main workflow is described below. - -.. raw:: html - -
- -.. uml:: _assets/mw/mw_time_receive_seq.puml - :alt: Receive data workflow - -.. raw:: html - -
- -This design guarantees very low latency of the executing the ``VehicleClock::GetInstance().Now()`` function but brings additional efforts for the thread, memory buffer, synchronizing and so on. - -Receive data (simplified) -'''''''''''''''''''''''''' - -As an alternative design, the receiving concept could be simplified and ``VehicleClock::GetInstance().Now()`` could directly invoke the ``IPCMachine::receiver`` call, adjust the ``Vehicle time`` and return it to the ``Application``. - -The design is represented below. - -.. raw:: html - -
- -.. uml:: _assets/mw/mw_time_receive_simple_seq.puml - :alt: Receive data (simplified) workflow - -.. raw:: html - -
- -In this case, there will be no need for additional thread, shared buffer and synchronization, but the ``VehicleClock::GetInstance().Now()`` call will take longer. To decide which approach to use, additional performance tests shall be conducted. - -Deployment -'''''''''' - -The ``td_impl`` backend of ``VehicleClock`` can be placed in parallel to other backends, like the stub implementation, and can be selected by Bazel ``select()``. This eases the integration process. - -Logging configuration -~~~~~~~~~~~~~~~~~~~~~ - -The daemon should have the following logging contexts: - -.. list-table:: Logging Contexts - :header-rows: 1 - :widths: 30 20 50 - - * - component - - App/Context ID - - Comments - * - TimeDaemon - - TDON - - **T**\ ime\ **D**\ aem\ **ON** - * - Application - - TDAP - - **T**\ ime\ **D**\ aemon **AP**\ plication - * - MessageBroker - - TDMB - - **T**\ ime\ **D**\ aemon **M**\ essage\ **B**\ roker - * - ControlFlowDivider - - TDCD - - **T**\ ime\ **D**\ aemon **C**\ ontrolFlow\ **D**\ ivider - * - PTPMachine - - TDPM - - **T**\ ime\ **D**\ aemon **P**\ TP\ **M**\ achine - * - VerificationMachine - - TDVM - - **T**\ ime\ **D**\ aemon **V**\ erification\ **M**\ achine - * - IPCMachine::receiver - - TDIR - - **T**\ ime\ **D**\ aemon **I**\ PCMachine::\ **R**\ eceiver - * - IPCMachine::publisher - - TDIP - - **T**\ ime\ **D**\ aemon **I**\ PCMachine::\ **P**\ ublisher - -Variability -~~~~~~~~~~~ - -Configuration files -^^^^^^^^^^^^^^^^^^^ - -The ``TimeDaemon`` uses structured configuration files to enable customization of its runtime behavior. These data could be configured: - -1. Component-specific Configuration: - - a. Each component can have dedicated configuration sections - b. Parameters such as update rates, timeouts, and thresholds can be specified - -2. Topic Configuration: - - a. Topics for the ``Message Broker`` can be defined in configuration - b. Publisher and subscriber relationships can be specified externally - c. Component roles (publisher/subscriber) can be assigned through configuration - -3. File Format and Structure: The configuration files use JSON format for readability and easy parsing: - -.. code-block:: json - - { - "message_broker": { - "topics": [ - { - "name": "raw_ptp_data", - "publishers": ["PtpMachine"], - "subscribers": ["ControlFlowDivider"] - }, - { - "name": "input_ptp_data", - "publishers": ["ControlFlowDivider"], - "subscribers": ["VerificationMachine"] - }, - { - "name": "verified_ptp_data", - "publishers": ["VerificationMachine"], - "subscribers": ["IPCMachine"] - } - ] - }, - "ptp_machine": { - "update_interval_ms": 50, - "ptp_stack_type": "ptp", - "ptp_stack_parameters": { - "device": "/dev/ptp0" - } - }, - "control_flow_divider": { - "timeout_ms": 500, - "publishing_rate_ms": 100 - }, - "verification_machine": { - "validation_stages": ["synchronization", "timejumps", "timeout"], - "timejumps_parameters": { - "max_backward_jump_ns": 100000 - }, - "timeout_parameters": { - "threshold_ns": 100000 - } - }, - "ipc_machine": { - "shared_memory_name": "vehicle_time", - "shared_memory_size": 4096 - } - } - -Scalability -^^^^^^^^^^^ - -The ``TimeDaemon``'s architecture supports scalability in the following ways: - -Component Extensibility: -'''''''''''''''''''''''' - -1. New machine components can be added by implementing the ``BaseMachine`` interface -2. Additional validation stages can be plugged into the ``VerificationMachine`` pipeline -3. Alternative IPC mechanisms or communication with ptp stack can be implemented by alternative the ``IPCMachine`` or ``PTPMachine`` implementation - -Example based on Qualified Vehicle Time integration -''''''''''''''''''''''''''''''''''''''''''''''''''' - -The ``Qualified Vehicle Time`` integration extends the standard ``TimeDaemon`` architecture with: - -1. A ``Qualified Vehicle Time`` component that performs additional time qualification and provide new topics: ``qualified_ptp_data`` and ``diagnostic_sct_data`` -2. A dedicated IPC channel for SCT diagnostic data -3. A ``score::time::qvt`` library for diagnostic applications - -.. raw:: html - -
- -.. uml:: _assets/examples/qvt/qvt_deployment.puml - :alt: Deployment view - -.. raw:: html - -
- -The ``Qualified Vehicle Time`` component is integrated into the existing processing pipeline: - -1. It subscribes to the `verified_ptp_data <#verified-ptp-data>`_ topic from the ``VerificationMachine`` -2. It processes and qualifies the time data with additional QVT-specific checks -3. It publishes two types of data: - - a. Qualified time data to the standard IPC Machine towards clients interested in the qualified Vehicle Time - b. Diagnostic data to a dedicated QVT IPC channel towards Diagnostic and Central Validator notifications - -The extended data flow with Qualified Vehicle Time integration is shown below: - -.. raw:: html - -
- -.. uml:: _assets/examples/qvt/qvt_data_control_flow.puml - :alt: Data flow - -.. raw:: html - -
- -Example based on Absolute Time integration -'''''''''''''''''''''''''''''''''''''''''' - -Another example of the ``TimeDaemon`` extension is the integration of an ``Absolute Time`` source, such as GNSS, to provide absolute time information alongside the relative Vehicle Time from PTP. - -The ``Absolute Time`` integration extends the standard ``TimeDaemon`` architecture with: - -1. An ``SDatMachine`` component that retrieves absolute time from GNSS via SOMEIP or other sources and provide new topics: ``absolute_time_data`` -2. A dedicated verification stage in the ``VerificationMachine`` for Absolute Time qualification -3. A dedicated IPC channel for Absolute Time data -4. A ``score::time::abs`` library for applications requiring absolute time on Clients side. - -The way how it is integrated is presented below. - -.. raw:: html - -
- -.. uml:: _assets/examples/abs_time/abs_time_deployment.puml - :alt: Data flow - -.. raw:: html - -
- - -The control and data flow with Absolute Time integration is shown below. - -.. raw:: html - -
- -.. uml:: _assets/examples/abs_time/abs_time_data_control_flow.puml - :alt: Data flow - -.. raw:: html - -
- -Using in test environment -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Using in ITF -^^^^^^^^^^^^ - -Normal behavior is expected. - -Using in Component Tests on the host -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Overview -'''''''' - -The ``TimeDaemon`` can be utilized in the ``Component Tests`` environment to enable comprehensive testing of time-dependent components without relying on physical PTP hardware. -This approach allows test cases to manipulate time values and synchronization states to validate application behavior under various timing conditions. - -For the Component tests the ``PtpMachine::PtpEngine`` library is the only one platform-dependent. -Thus the ``TimeDaemon`` components remain largely unchanged except for the ``PTPMachine`` component, which is replaced with an test-specific implementation that can be controlled via test cases -This component shall: - -1. simulate "normal" ``PTPMachine`` behavior -2. have the communication channel to the test case and react on the manipulations - -Next steps: plugin system -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``TimeDaemon`` could be extended with a flexible plugin system that enables dynamic component loading, configuration, subscription and extension without requiring code changes or recompilation. - -Plugin Architecture -^^^^^^^^^^^^^^^^^^^ - -The plugin system is structured around the following key elements: - -1. ``Component Registry``: A central registry that maintains information about available component implementations -2. ``Component Factory``: Creates component instances based on configuration -3. ``Plugin Manager``: Loads and initializes plugins at runtime -4. ``Configuration-Driven Assembly``: Components and their relationships defined in configuration files - -Component Creation Process -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -During ``TimeDaemon`` initialization: - -1. The ``Plugin Manager`` loads all specified plugins from configured directories or bazel targets -2. Each plugin registers its component factories with the registry -3. The ``Application`` reads the component configuration -4. For each component in the configuration: - - a. The appropriate factory is retrieved from the registry - b. The component is created with its specified parameters - c. Components are connected based on the ``MessageBroker`` topic configuration - -ASIL-B qualification -~~~~~~~~~~~~~~~~~~~~~ - -Clean separation of concerns allows the ``VehicleClock`` ``td_impl`` backend as well as ``TimeDaemon`` to be qualified according to ASIL-B requirements following ISO 26262 standard. diff --git a/docs/features/time_daemon/_assets/app/app_class.puml b/score/time_daemon/docs/detailed_design/_assets/app/app_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/app/app_class.puml rename to score/time_daemon/docs/detailed_design/_assets/app/app_class.puml diff --git a/docs/features/time_daemon/_assets/app/app_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/app/app_init_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/app/app_init_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/app/app_init_seq.puml diff --git a/docs/features/time_daemon/_assets/app/app_workflow_seq.puml b/score/time_daemon/docs/detailed_design/_assets/app/app_workflow_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/app/app_workflow_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/app/app_workflow_seq.puml diff --git a/docs/features/time_daemon/_assets/ctrlflow/ctrlflow_class.puml b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/ctrlflow/ctrlflow_class.puml rename to score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_class.puml diff --git a/docs/features/time_daemon/_assets/ctrlflow/ctrlflow_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_init_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ctrlflow/ctrlflow_init_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_init_seq.puml diff --git a/docs/features/time_daemon/_assets/ctrlflow/ctrlflow_workflow_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_workflow_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ctrlflow/ctrlflow_workflow_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_workflow_seq.puml diff --git a/docs/features/time_daemon/_assets/dd_class.puml b/score/time_daemon/docs/detailed_design/_assets/dd_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/dd_class.puml rename to score/time_daemon/docs/detailed_design/_assets/dd_class.puml diff --git a/docs/features/time_daemon/_assets/dd_data_control_flow.puml b/score/time_daemon/docs/detailed_design/_assets/dd_data_control_flow.puml similarity index 100% rename from docs/features/time_daemon/_assets/dd_data_control_flow.puml rename to score/time_daemon/docs/detailed_design/_assets/dd_data_control_flow.puml diff --git a/docs/features/time_daemon/_assets/dd_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/dd_deployment.puml similarity index 100% rename from docs/features/time_daemon/_assets/dd_deployment.puml rename to score/time_daemon/docs/detailed_design/_assets/dd_deployment.puml diff --git a/docs/features/time_daemon/_assets/examples/abs_time/abs_time_data_control_flow.puml b/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_data_control_flow.puml similarity index 100% rename from docs/features/time_daemon/_assets/examples/abs_time/abs_time_data_control_flow.puml rename to score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_data_control_flow.puml diff --git a/docs/features/time_daemon/_assets/examples/abs_time/abs_time_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_deployment.puml similarity index 100% rename from docs/features/time_daemon/_assets/examples/abs_time/abs_time_deployment.puml rename to score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_deployment.puml diff --git a/docs/features/time_daemon/_assets/examples/qvt/qvt_data_control_flow.puml b/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_data_control_flow.puml similarity index 100% rename from docs/features/time_daemon/_assets/examples/qvt/qvt_data_control_flow.puml rename to score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_data_control_flow.puml diff --git a/docs/features/time_daemon/_assets/examples/qvt/qvt_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_deployment.puml similarity index 100% rename from docs/features/time_daemon/_assets/examples/qvt/qvt_deployment.puml rename to score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_deployment.puml diff --git a/docs/features/time_daemon/_assets/ipc/ipc_class.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/ipc/ipc_class.puml rename to score/time_daemon/docs/detailed_design/_assets/ipc/ipc_class.puml diff --git a/docs/features/time_daemon/_assets/ipc/ipc_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_init_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ipc/ipc_init_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ipc/ipc_init_seq.puml diff --git a/docs/features/time_daemon/_assets/ipc/ipc_publish_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_publish_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ipc/ipc_publish_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ipc/ipc_publish_seq.puml diff --git a/docs/features/time_daemon/_assets/ipc/ipc_receive_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_receive_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ipc/ipc_receive_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ipc/ipc_receive_seq.puml diff --git a/docs/features/time_daemon/_assets/msg_broker/msg_broker_class.puml b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/msg_broker/msg_broker_class.puml rename to score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_class.puml diff --git a/docs/features/time_daemon/_assets/msg_broker/msg_broker_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_init_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/msg_broker/msg_broker_init_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_init_seq.puml diff --git a/docs/features/time_daemon/_assets/msg_broker/msg_broker_workflow_seq.puml b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_workflow_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/msg_broker/msg_broker_workflow_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_workflow_seq.puml diff --git a/docs/features/time_daemon/_assets/mw/mw_class.puml b/score/time_daemon/docs/detailed_design/_assets/mw/mw_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/mw/mw_class.puml rename to score/time_daemon/docs/detailed_design/_assets/mw/mw_class.puml diff --git a/docs/features/time_daemon/_assets/mw/mw_time_receive_seq.puml b/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/mw/mw_time_receive_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_seq.puml diff --git a/docs/features/time_daemon/_assets/mw/mw_time_receive_simple_seq.puml b/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_simple_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/mw/mw_time_receive_simple_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_simple_seq.puml diff --git a/docs/features/time_daemon/_assets/ptp_machine/ptp_machine_class.puml b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/ptp_machine/ptp_machine_class.puml rename to score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_class.puml diff --git a/docs/features/time_daemon/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml diff --git a/docs/features/time_daemon/_assets/ptp_machine/ptp_machine_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_init_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ptp_machine/ptp_machine_init_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_init_seq.puml diff --git a/docs/features/time_daemon/_assets/sad_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/sad_deployment.puml similarity index 100% rename from docs/features/time_daemon/_assets/sad_deployment.puml rename to score/time_daemon/docs/detailed_design/_assets/sad_deployment.puml diff --git a/docs/features/time_daemon/_assets/ver_machine/ver_class.puml b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_class.puml similarity index 100% rename from docs/features/time_daemon/_assets/ver_machine/ver_class.puml rename to score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_class.puml diff --git a/docs/features/time_daemon/_assets/ver_machine/ver_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_init_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ver_machine/ver_init_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_init_seq.puml diff --git a/docs/features/time_daemon/_assets/ver_machine/ver_verification_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_verification_seq.puml similarity index 100% rename from docs/features/time_daemon/_assets/ver_machine/ver_verification_seq.puml rename to score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_verification_seq.puml diff --git a/score/time_daemon/docs/detailed_design/detailed_design.rst b/score/time_daemon/docs/detailed_design/detailed_design.rst deleted file mode 100644 index e5507dab..00000000 --- a/score/time_daemon/docs/detailed_design/detailed_design.rst +++ /dev/null @@ -1,96 +0,0 @@ -.. - # ******************************************************************************* - # Copyright (c) 2026 Contributors to the Eclipse Foundation - # - # See the NOTICE file(s) distributed with this work for additional - # information regarding copyright ownership. - # - # This program and the accompanying materials are made available under the - # terms of the Apache License Version 2.0 which is available at - # https://www.apache.org/licenses/LICENSE-2.0 - # - # SPDX-License-Identifier: Apache-2.0 - # ******************************************************************************* - -.. _time_daemon_detailed_design: - -Time Daemon Detailed Design -=========================== - -.. document:: Time Daemon Detailed Design - :id: doc__time_daemon_detailed_design - :status: draft - :version: 1 - :safety: ASIL_B - :security: NO - :realizes: wp__sw_implementation - :tags: time_daemon - -.. note:: - Work in progress: structure, titles, and needs IDs only. Content and req/comp/feat traceability links to follow in later PRs. - -.. attention:: - The above directive must be updated according to your Component. - - - Adjust ``status`` to be ``valid`` - - Adjust ``safety`` and ``tags`` according to your needs - -Detailed Design for Time Daemon -=============================== - -Description ------------ - -| Design Decisions - For the documentation of the decision the :need:`gd_temp__change_decision_record` can be used. -| Design Constraints - -Example: - - - component is split into two units unit1 and unit2 based on single responsibility principle. - - unit2 is injected to unit1 one via dependency injection for testability. - -Rationale Behind Decomposition into Units -****************************************** -| mandatory: a motivation for the decomposition into one or more units. - -.. note:: Reason for split into multiple units could be- - - Based on design principles like SOLID,DRY etc - - Based on design pattern's etc. - -Static Diagrams for Unit Interactions -------------------------------------- - -A static view provides an overview of the units and their relationships using -UML 2.0 notations (e.g. class diagrams, component diagrams). Use ``.. uml::`` -or ``.. image::`` directives to include the diagram. - -.. uml:: dd_example_ex_sta.puml - -Dynamic Diagrams for Unit Interactions (optional) --------------------------------------------------- - -A dynamic view illustrates how the units within a component interact over their -interfaces to fulfill a specific use case or functionality. It is optional when the -component's behaviour is straightforward and can be understood from the static view -and interface documentation alone. - -Use standard UML behavioural diagrams (sequence diagrams, state machine diagrams) -with ``.. uml::`` or ``.. image::`` directives. - -.. uml:: dd_example_ex_dyn.puml - -Units within the Component --------------------------- - -The relationship between a unit and its parent component is established implicitly -through the file path. Each component has its own directory, and units residing -within that directory belong to it. The unit's attributes and behaviour are documented -in the source code itself. A separate static diagram per unit is not required. - -Interface documentation of a software unit is part of the source code (e.g. public -API headers, trait definitions, or documented function signatures). - -Example: - -- unit1: implements the main logic (see source code for details) -- unit2: injected into unit1 via dependency injection for testability diff --git a/score/time_daemon/docs/detailed_design/index.rst b/score/time_daemon/docs/detailed_design/index.rst index c695047f..7716c102 100644 --- a/score/time_daemon/docs/detailed_design/index.rst +++ b/score/time_daemon/docs/detailed_design/index.rst @@ -14,29 +14,943 @@ .. _time_daemon_detailed_design_index: -Detailed Design -############### +.. document:: Time Daemon Detailed Design + :id: doc__time_daemon_detailed_design + :status: draft + :version: 1 + :safety: ASIL_B + :security: YES + :realizes: wp__sw_implementation + :tags: time_daemon -.. note:: - Work in progress: page structure only, content to follow in later PRs. +Concept for TimeDaemon +======================= -.. attention:: +.. contents:: Table of Contents + :depth: 3 + :local: - The detailed design document is optional and should be created if the design of the component is complex and cannot be easily understood from the architecture documentation and interface documentation alone. - But the inspection checklist for the implementation is mandatory. +TimeDaemon concept +------------------- +Use Cases +~~~~~~~~~ -Detail design example ---------------------- +TimeDaemon is the non Autosar adaptive process who is intended to get the Vehicle Time from the ptp slave daemon (ptpd or any other), verify and validate the timepoints and distribute time information across the clients. + +More precisely we can specify the following use cases for the time daemon: + +1. Providing current Vehicle time to different applications +2. Setting the synchronization qualifier (aka Synchronized, Timeout, so on) +3. Providing needed information for diagnostics +4. Providing needed information for addition verification, ex SafeCarTime + +The raw architectural diagram is represented below. + +.. raw:: html + +
+ +.. uml:: _assets/sad_deployment.puml + :alt: Raw architectural diagram + +.. raw:: html + +
+ +Components decomposition +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The design consists of several sw components: + +1. :doc:`Application ` +2. :doc:`Message Broker ` +3. :doc:`ControlFlowDivider ` +4. :doc:`PTP Machine ` +5. :doc:`Verification Machine ` +6. :doc:`IPC Machine ` +7. :doc:`VehicleClock (score::time) ` + +Deployment view +~~~~~~~~~~~~~~~ + +The design deployment is represented on the following diagram: + +.. raw:: html + +
+ +.. uml:: _assets/dd_deployment.puml + :alt: Deployment View + +.. raw:: html + +
+ +Class view +~~~~~~~~~~ + +Main classes and components are presented on this diagram: + +.. raw:: html + +
+ +.. uml:: _assets/dd_class.puml + :alt: Class View + :width: 100% + :align: center + +.. raw:: html + +
+ +Data and control flow +~~~~~~~~~~~~~~~~~~~~~ + +The Data and Control flow are presented in the following diagram: + +.. raw:: html + +
+ +.. uml:: _assets/dd_data_control_flow.puml + :alt: Data and Control flow View + +.. raw:: html + +
+ +On this view you could see several "workers" scopes: + +1. PTP retrieving scope +2. PTPTimeInfo handling scope +3. PTPTimeInfo receiving on Application side scope + +Each control flow is implemented with the dedicated thread or process and is independent form another ones. + +Control flows +^^^^^^^^^^^^^ + +PTP retrieving scope +'''''''''''''''''''' + +This control flow is responsible for the: + +1. retrieve the latest information from the ptp stack and +2. provide it to the ``PTPTimeInfo handling`` control flow + +PTPTimeInfo handling scope +''''''''''''''''''''''''''' + +This control flow is responsible for the: + +1. Validate the time information, provided by the ``PTP retrieving`` workflow and +2. publish it to the ``Applications`` via some IPC + +PTPTimeInfo receiving on Application side scope +'''''''''''''''''''''''''''''''''''''''''''''''' + +This control flow is responsible for the: + +1. Propagate the time information from the ``PTPTimeInfo handling`` to the business logic of the applications. + +Data types or events +^^^^^^^^^^^^^^^^^^^^ + +There are also several data types, which components are communicating to each other: + +.. _raw_ptp_data: + +Raw ptp data +'''''''''''' + +``raw_ptp_data`` is the data, which is provided by ``PTPMachine`` component and is just the raw data from ptp stack. is handled in the "PTP retrieving scope" + +.. _input_ptp_data: + +Input ptp data +'''''''''''''' + +``input_ptp_data`` is the same data as :ref:`raw_ptp_data` but which is handled already in "PTPTimeInfo handling scope" + +.. _verified_ptp_data: + +Verified ptp data +''''''''''''''''' + +``verified_ptp_data`` is the :ref:`input_ptp_data` which was verified according to the business logic and updated accordingly. This data should be published to the Applications. + +SW Components decomposition +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The design consists of several internal units: + +Application unit +======================== + +The ``Application`` component is the main entry point for the ``TimeDaemon``. It is responsible for orchestrating the overall lifecycle and initialization of all daemon components. + +The ``TimebaseHandler`` component is an timebase-specific logic implementation. There might be several handlers available in the ``Application`` per amount of timebases supported. This separation allows for different timebase implementations while maintaining a consistent application structure. + +Implementation Requirements +'''''''''''''''''''''' + +The ``Application`` has the following requirements: + +- The ``Application`` shall implement the ``Initialize()`` method to create and initialize all daemon components +- The ``Application`` shall implement the ``Run()`` method to start all components and wait for termination +- The ``Application`` shall connect components to the ``MessageBroker`` by setting up all required subscriptions during initialization stage +- The ``Application`` shall support extension for different timebases. + +Class view +'''''''''' + +The Class Diagram is presented below: + +.. raw:: html + +
+ +.. uml:: _assets/app/app_class.puml + :alt: Class Diagram + +.. raw:: html + +
+ +Initialization flow +''''''''''''''''''' + +During initialization, the ``Application`` uses the ``MachineFactory`` to create, configure and subscribe all components in a specific order: + +- Create the ``MessageBroker`` first, as other components depend on it +- Create ProactiveMachines (``PtpMachine``, ``ControlFlowDivider``) that drive system behavior + + - Initialize each component + - Set up MessageBroker subscriptions to component notifications + - Set up component subscriptions to MessageBroker topics + +- Create ReactiveMachines (``VerificationMachine``, ``IPCMachine``) that respond to events + + - Initialize each component + - Set up MessageBroker subscriptions to component notifications + - Set up component subscriptions to MessageBroker topics + +The initialization workflow is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/app/app_init_seq.puml + :alt: Initialization workflow + +.. raw:: html + +
+ +Execution and shutdown flow +'''''''''''''''''''''''''''' + +During execution, the ``Application``: + +- Starts all ``ProactiveMachines`` in the correct order +- Monitors the stop token for termination requests +- When termination is requested, stops all ``ProactiveMachines`` in reverse order + +The execution and shutdown workflow is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/app/app_workflow_seq.puml + :alt: Execution workflow + +.. raw:: html + +
+ + + +Message Broker unit +=========================== + +The ``Message Broker`` component is the central communication hub that implements the Publish-Subscribe pattern within the ``TimeDaemon``. It enables decoupled communication between components by managing topics and distributing messages to interested subscribers. + +The component maintains a registry of topics and their subscribers, delivering messages to all registered subscribers when a component publishes to a topic. This decoupling allows components to evolve independently without direct dependencies on each other. + +Implementation Requirements +'''''''''''''''''''''' + +The ``Message Broker`` has the following requirements: + +- The ``Message Broker`` shall maintain a registry of topics and their subscribers +- The ``Message Broker`` shall allow components to subscribe to topics of interest +- The ``Message Broker`` shall distribute messages to all subscribers when a topic is published to + +Class view +'''''''''' + +The Class Diagram is presented below: + +.. raw:: html + +
+ +.. uml:: _assets/msg_broker/msg_broker_class.puml + :alt: Class Diagram + +.. raw:: html + +
+ +Initialization flow +''''''''''''''''''' + +During initialization, all machine objects, see ``BaseMachine``, the ``Application`` component needs to subscribe machines to ``Message Broker`` to the topics of interest. + +The initialization workflow is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/msg_broker/msg_broker_init_seq.puml + :alt: Initialization workflow + +.. raw:: html + +
+ +Message flow +'''''''''''' + +The message flow through the ``Message Broker`` is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/msg_broker/msg_broker_workflow_seq.puml + :alt: Message DiagramFlow + +.. raw:: html + +
+ +Concurrency aspects +''''''''''''''''''' + +The ``Message Broker`` doesn't provide any synchronization between the publish-callback invoking processes. +Moreover, the callback invoke will happened in the scope of the thread, where the ``publish`` method is called. +To separate the control flows, the :doc:`ControlFlowDivider ` shall be used + +Scalability +''''''''''' + +The ``Message Broker`` can be extended to support configuration-driven subscriptions, where topic relationships are defined in configuration files rather than hardcoded. + + + +ControlFlowDivider unit +=============================== + +The ``ControlFlowDivider`` component is responsible for separating control (execution) flows within the ``TimeDaemon`` and providing the execution control flow for the data processing. It contains dedicated threads where data is published to the ``Message Broker``, ensuring that blocking operations in one component do not affect the execution of other components and data missing is not affecting the data analysis in processing pipeline. + +This component acts as a crucial intermediary that maintains the responsiveness of the system by decoupling the execution contexts of different operations, particularly between the PTP data retrieval and the time data processing pipelines. + +Implementation Requirements +'''''''''''''''''''''' + +The ``ControlFlowDivider`` has the following requirements: + +- The ``ControlFlowDivider`` shall provide separate execution threads for different control flows +- The ``ControlFlowDivider`` shall isolate components from execution time variations in other components +- The ``ControlFlowDivider`` shall maintain consistent data publishing rates to the subscribers +- The ``ControlFlowDivider`` shall push the last received data to the subscribers if there is no new data for some time with the predefined rate, to avoid data missing in the processing pipeline +- The ``ControlFlowDivider`` shall enable periodic processing of the pipeline through consistent event generation +- The ``ControlFlowDivider`` shall buffer incoming data from fast producers + +Class view +'''''''''' + +The Class Diagram is presented below: + +.. raw:: html + +
+ +.. uml:: _assets/ctrlflow/ctrlflow_class.puml + :alt: Class Diagram + +.. raw:: html + +
+ +Initialization flow +''''''''''''''''''' + +During initialization, the ``ControlFlowDivider`` performs the following steps: + +- Initialize internal data structures (queue, mutex, condition variable) +- Create a worker thread to process data independently +- Start the worker thread which enters a waiting state + +The initialization workflow is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/ctrlflow/ctrlflow_init_seq.puml + :alt: Initialization workflow + +.. raw:: html + +
+ +Message flow +'''''''''''' + +When the ``ControlFlowDivider`` receives new data from the ``PTP Machine`` via the ``Message Broker``, it processes it through the following workflow: + +1. The ``Message Broker`` executes the onNewData callback and provides the new data +2. The data is placed in a thread-safe queue and exists from the callback +3. The worker thread wakes up, retrieves the data from the queue and +4. The worker thread publishes the retrieved data to the :ref:`input_ptp_data` topic +5. if there was no data for some timeout, the worker shall published the empty data to the :ref:`input_ptp_data` topic. + +This separation of control flows ensures that slow or blocking operations in the PTP stack communication do not affect the responsiveness of time data processing in the ``TimeDaemon``. + +The execution workflow is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/ctrlflow/ctrlflow_workflow_seq.puml + :alt: Execution workflow + +.. raw:: html + +
+ + + +PTP Machine unit +======================== + +The ``PTP Machine`` component shall retrieve all needed information from the ptp stack (ex ``ptpd``) and provide it to the ``Message Broker`` for routing. +All communication with the ptp stack ight use ``devctl`` calls, which take some time, thus these calls shall be done in the dedicated thread. + +Implementation Requirements +'''''''''''''''''''''' + +The ``PTP Machine`` has the following requirements: + +- The ``PTP Machine`` shall retrieve the latest time information from the PTP stack (e.g., ``ptpd``) +- The ``PTP Machine`` shall publish retrieved time information to the ``Message Broker`` using the defined topic +- The ``PTP Machine`` shall format data according to the ``PtpTimeInfo`` structure required by downstream components +- The ``PTP Machine`` shall retrieve time information at a consistent rate to maintain time synchronization +- The ``PTP Machine`` shall maintain consistent publishing rates for time data even when experiencing delays in PTP stack communication. +- The ``PTP Machine`` shall support exchangeability with different PTP stack implementations + +Class view +'''''''''' + +The Class Diagram is presented below. -An example of documenting detailed design can be found in: +.. raw:: html - .. toctree:: +
- detailed_design_example +.. uml:: _assets/ptp_machine/ptp_machine_class.puml + :alt: Class Diagram + +.. raw:: html + +
+ +As long as it wraps the particular communication with the ptp stack, the implementations should be easily exchangeable with another one in case of stack change. + +Component initialization +''''''''''''''''''''''''' + +During initialization the ``PTP Machine`` shall initialize the ptp stack to be able to communicate with it. + +The initialization workflow is described below. + +.. raw:: html + +
+ +.. uml:: _assets/ptp_machine/ptp_machine_init_seq.puml + :alt: Initialization workflow + +.. raw:: html + +
+ +Publish new data +'''''''''''''''' + +After ``PTP Machine`` collects new data from the ptp stack, the component shall publish it to the ``Message Broker`` as :ref:`raw_ptp_data`. + +The publish workflow is described below. + +.. raw:: html + +
+ +.. uml:: _assets/ptp_machine/ptp_machine_get_new_data_seq.puml + :alt: Publish workflow + +.. raw:: html + +
+ + + +Verification Machine unit +================================= + +The ``Verification Machine`` component is responsible for validating and qualifying the time information received from the ``PTP Machine``. It applies various validation rules to ensure the time data meets quality requirements before distribution to applications. + +The component implements a pipeline pattern where each stage performs a specific validation and adds appropriate qualifiers to the time data. This modular design allows for easy extension with additional validation steps. + +Implementation Requirements +'''''''''''''''''''''' + +The ``Verification Machine`` has the following requirements: + +- The ``Verification Machine`` shall validate and qualify time information received from the PTP Machine +- The ``Verification Machine`` shall validate if the time base is synchronized state +- The ``Verification Machine`` shall validate if the time base is in timeout state +- The ``Verification Machine`` shall validate timestamp for time jumps based on local clock +- The ``Verification Machine`` shall subscribe to the :ref:`input_ptp_data` topic via the ``Message Broker`` +- The ``Verification Machine`` shall publish verified time data to the ``Message Broker`` using the :ref:`verified_ptp_data` topic +- The ``Verification Machine`` shall support extensibility to add new validation stages in the pipeline + +Class view +'''''''''' + +The Class Diagram is presented below. + +.. raw:: html + +
+ +.. uml:: _assets/ver_machine/ver_class.puml + :alt: Class Diagram + +.. raw:: html + +
+ +Component initialization +''''''''''''''''''''''''' + +During initialization, the ``Verification Machine`` performs the following steps: + +1. Set up the validation pipeline by creating and connecting validation stages + +The component shall be subscribed by the ``Application`` to the :ref:`input_ptp_data` topic of the ``MessageBroker`` + +The initialization workflow is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/ver_machine/ver_init_seq.puml + :alt: Initialization workflow + +.. raw:: html + +
+ +Data verification workflow +''''''''''''''''''''''''''' + +When the ``Verification Machine`` receives new PTP data, it processes it through the validation pipeline: + +.. raw:: html + +
+ +.. uml:: _assets/ver_machine/ver_verification_seq.puml + :alt: Validation pipeline + +.. raw:: html + +
+ + + +IPC Machine unit +======================== + +The ``IPC Machine`` component shall get the :ref:`verified_ptp_data` from the ``Verification Machine`` and provide it to the ``VehicleClock`` backend (see :doc:`score::time — Unified Clock Interface <../time/index>`) through a custom shared memory channel. + +The component provides two sub components: publisher and receiver to be deployed on the TimeDaemon and Application sides accordingly. + +Implementation Requirements +'''''''''''''''''''''' + +The ``IPC Machine`` has the following requirements: + +- The ``IPC Machine`` shall provide verified time data to the ``VehicleClock`` backend component through a custom shared memory channel +- The ``IPC Machine`` shall create and initialize the IPC +- The ``IPC Machine`` shall support multiple client applications accessing the same time data +- The ``IPC Machine`` shall subscribe to the :ref:`verified_ptp_data` topic via the ``Message Broker`` + +Class view +'''''''''' + +The Class Diagram is presented below. + +.. raw:: html + +
+ +.. uml:: _assets/ipc/ipc_class.puml + :alt: Class Diagram + +.. raw:: html + +
+ +Component initialization +''''''''''''''''''''''''' + +Initialization is divided to two parts: + +1. Initialization on the TimeDaemon side +2. Initialization on the Application side + +Important thing, the shared memory IPC publisher shall be created and offered by the ``TimeDaemon`` before the Application side subscriber can connect. The Application shall retry until the service is found. + +The main workflow is described below. + +.. raw:: html + +
+ +.. uml:: _assets/ipc/ipc_init_seq.puml + :alt: Main workflow + +.. raw:: html + +
+ +The component shall be subscribed during initialization by the ``Application`` on the :ref:`verified_ptp_data` updates from the ``Message Broker`` + +Publish new data +'''''''''''''''' + +When ``IPC Machine`` receives the new :ref:`verified_ptp_data` from Message Broker, it shall serialize data and write it to shared memory. + +As long as there are different use cases by using it, like: + +1. Get current Vehicle time +2. Get data for diagnostics + +All ``PtpTimeInfo`` data (or almost all) shall be published to the subscribed applications. + +The publish workflow is described below. + +.. raw:: html + +
+ +.. uml:: _assets/ipc/ipc_publish_seq.puml + :alt: Publish workflow + +.. raw:: html + +
+ +Receive data +'''''''''''' + +From Application side the receiver shall read from shared memory via the IPC receiver component and provide the data to the caller. + +The receive workflow is described below. + +.. raw:: html + +
+ +.. uml:: _assets/ipc/ipc_receive_seq.puml + :alt: Receive workflow + +.. raw:: html + +
+ + + +Logging configuration +~~~~~~~~~~~~~~~~~~~~~ + +The daemon should have the following logging contexts: + +.. list-table:: Logging Contexts + :header-rows: 1 + :widths: 30 20 50 + + * - component + - App/Context ID + - Comments + * - TimeDaemon + - TDON + - **T**\ ime\ **D**\ aem\ **ON** + * - Application + - TDAP + - **T**\ ime\ **D**\ aemon **AP**\ plication + * - MessageBroker + - TDMB + - **T**\ ime\ **D**\ aemon **M**\ essage\ **B**\ roker + * - ControlFlowDivider + - TDCD + - **T**\ ime\ **D**\ aemon **C**\ ontrolFlow\ **D**\ ivider + * - PTPMachine + - TDPM + - **T**\ ime\ **D**\ aemon **P**\ TP\ **M**\ achine + * - VerificationMachine + - TDVM + - **T**\ ime\ **D**\ aemon **V**\ erification\ **M**\ achine + * - IPCMachine::receiver + - TDIR + - **T**\ ime\ **D**\ aemon **I**\ PCMachine::\ **R**\ eceiver + * - IPCMachine::publisher + - TDIP + - **T**\ ime\ **D**\ aemon **I**\ PCMachine::\ **P**\ ublisher + +Variability +~~~~~~~~~~~ + +Configuration files +^^^^^^^^^^^^^^^^^^^ + +The ``TimeDaemon`` uses structured configuration files to enable customization of its runtime behavior. These data could be configured: + +1. Component-specific Configuration: + + a. Each component can have dedicated configuration sections + b. Parameters such as update rates, timeouts, and thresholds can be specified + +2. Topic Configuration: + + a. Topics for the ``Message Broker`` can be defined in configuration + b. Publisher and subscriber relationships can be specified externally + c. Component roles (publisher/subscriber) can be assigned through configuration + +3. File Format and Structure: The configuration files use JSON format for readability and easy parsing: + +.. code-block:: json + + { + "message_broker": { + "topics": [ + { + "name": "raw_ptp_data", + "publishers": ["PtpMachine"], + "subscribers": ["ControlFlowDivider"] + }, + { + "name": "input_ptp_data", + "publishers": ["ControlFlowDivider"], + "subscribers": ["VerificationMachine"] + }, + { + "name": "verified_ptp_data", + "publishers": ["VerificationMachine"], + "subscribers": ["IPCMachine"] + } + ] + }, + "ptp_machine": { + "update_interval_ms": 50, + "ptp_stack_type": "ptp", + "ptp_stack_parameters": { + "device": "/dev/ptp0" + } + }, + "control_flow_divider": { + "timeout_ms": 500, + "publishing_rate_ms": 100 + }, + "verification_machine": { + "validation_stages": ["synchronization", "timejumps", "timeout"], + "timejumps_parameters": { + "max_backward_jump_ns": 100000 + }, + "timeout_parameters": { + "threshold_ns": 100000 + } + }, + "ipc_machine": { + "shared_memory_name": "vehicle_time", + "shared_memory_size": 4096 + } + } + +Scalability +^^^^^^^^^^^ + +The ``TimeDaemon``'s architecture supports scalability in the following ways: + +Component Extensibility: +'''''''''''''''''''''''' + +1. New machine components can be added by implementing the ``BaseMachine`` interface +2. Additional validation stages can be plugged into the ``VerificationMachine`` pipeline +3. Alternative IPC mechanisms or communication with ptp stack can be implemented by alternative the ``IPCMachine`` or ``PTPMachine`` implementation + +Example based on Qualified Vehicle Time integration +''''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``Qualified Vehicle Time`` integration extends the standard ``TimeDaemon`` architecture with: + +1. A ``Qualified Vehicle Time`` component that performs additional time qualification and provide new topics: ``qualified_ptp_data`` and ``diagnostic_sct_data`` +2. A dedicated IPC channel for SCT diagnostic data +3. A ``score::time::qvt`` library for diagnostic applications + +.. raw:: html + +
+ +.. uml:: _assets/examples/qvt/qvt_deployment.puml + :alt: Deployment view + +.. raw:: html + +
+ +The ``Qualified Vehicle Time`` component is integrated into the existing processing pipeline: + +1. It subscribes to the :ref:`verified_ptp_data` topic from the ``VerificationMachine`` +2. It processes and qualifies the time data with additional QVT-specific checks +3. It publishes two types of data: + + a. Qualified time data to the standard IPC Machine towards clients interested in the qualified Vehicle Time + b. Diagnostic data to a dedicated QVT IPC channel towards Diagnostic and Central Validator notifications + +The extended data flow with Qualified Vehicle Time integration is shown below: + +.. raw:: html + +
+ +.. uml:: _assets/examples/qvt/qvt_data_control_flow.puml + :alt: Data flow + +.. raw:: html + +
+ +Example based on Absolute Time integration +'''''''''''''''''''''''''''''''''''''''''' + +Another example of the ``TimeDaemon`` extension is the integration of an ``Absolute Time`` source, such as GNSS, to provide absolute time information alongside the relative Vehicle Time from PTP. + +The ``Absolute Time`` integration extends the standard ``TimeDaemon`` architecture with: + +1. An ``SDatMachine`` component that retrieves absolute time from GNSS via SOMEIP or other sources and provide new topics: ``absolute_time_data`` +2. A dedicated verification stage in the ``VerificationMachine`` for Absolute Time qualification +3. A dedicated IPC channel for Absolute Time data +4. A ``score::time::abs`` library for applications requiring absolute time on Clients side. + +The way how it is integrated is presented below. + +.. raw:: html + +
+ +.. uml:: _assets/examples/abs_time/abs_time_deployment.puml + :alt: Data flow + +.. raw:: html + +
+ + +The control and data flow with Absolute Time integration is shown below. + +.. raw:: html + +
+ +.. uml:: _assets/examples/abs_time/abs_time_data_control_flow.puml + :alt: Data flow + +.. raw:: html + +
+ +Using in test environment +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Using in ITF +^^^^^^^^^^^^ + +Normal behavior is expected. + +Using in Component Tests on the host +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Overview +'''''''' + +The ``TimeDaemon`` can be utilized in the ``Component Tests`` environment to enable comprehensive testing of time-dependent components without relying on physical PTP hardware. +This approach allows test cases to manipulate time values and synchronization states to validate application behavior under various timing conditions. + +For the Component tests the ``PtpMachine::PtpEngine`` library is the only one platform-dependent. +Thus the ``TimeDaemon`` components remain largely unchanged except for the ``PTPMachine`` component, which is replaced with an test-specific implementation that can be controlled via test cases +This component shall: + +1. simulate "normal" ``PTPMachine`` behavior +2. have the communication channel to the test case and react on the manipulations + +Next steps: plugin system +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``TimeDaemon`` could be extended with a flexible plugin system that enables dynamic component loading, configuration, subscription and extension without requiring code changes or recompilation. + +Plugin Architecture +^^^^^^^^^^^^^^^^^^^ + +The plugin system is structured around the following key elements: + +1. ``Component Registry``: A central registry that maintains information about available component implementations +2. ``Component Factory``: Creates component instances based on configuration +3. ``Plugin Manager``: Loads and initializes plugins at runtime +4. ``Configuration-Driven Assembly``: Components and their relationships defined in configuration files + +Component Creation Process +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +During ``TimeDaemon`` initialization: + +1. The ``Plugin Manager`` loads all specified plugins from configured directories or bazel targets +2. Each plugin registers its component factories with the registry +3. The ``Application`` reads the component configuration +4. For each component in the configuration: + + a. The appropriate factory is retrieved from the registry + b. The component is created with its specified parameters + c. Components are connected based on the ``MessageBroker`` topic configuration + +ASIL-B qualification +~~~~~~~~~~~~~~~~~~~~~ + +Clean separation of concerns allows the ``VehicleClock`` ``td_impl`` backend as well as ``TimeDaemon`` to be qualified according to ASIL-B requirements following ISO 26262 standard. Inspection Checklist --------------------- +--------------------- The checklist for verification of the detailed design and code can be found here: From 2d7c517c0027a484fcece159b25da3c32b0b3a27 Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Fri, 14 Aug 2026 10:21:38 +0100 Subject: [PATCH 2/5] docs: update DD layout --- .../docs/detailed_design/index.rst | 101 +++++++++--------- 1 file changed, 53 insertions(+), 48 deletions(-) diff --git a/score/time_daemon/docs/detailed_design/index.rst b/score/time_daemon/docs/detailed_design/index.rst index 7716c102..e2062ec2 100644 --- a/score/time_daemon/docs/detailed_design/index.rst +++ b/score/time_daemon/docs/detailed_design/index.rst @@ -14,6 +14,9 @@ .. _time_daemon_detailed_design_index: +Time Daemon Detailed Design +=========================== + .. document:: Time Daemon Detailed Design :id: doc__time_daemon_detailed_design :status: draft @@ -23,15 +26,8 @@ :realizes: wp__sw_implementation :tags: time_daemon -Concept for TimeDaemon -======================= - -.. contents:: Table of Contents - :depth: 3 - :local: - -TimeDaemon concept -------------------- +Description +----------- Use Cases ~~~~~~~~~ @@ -58,57 +54,66 @@ The raw architectural diagram is represented below. -Components decomposition -~~~~~~~~~~~~~~~~~~~~~~~~~ +Rationale Behind Decomposition into Units +------------------------------------------ -The design consists of several sw components: +TimeDaemon is decomposed into six implementation units following SOLID principles +(Single Responsibility, Open/Closed) and design patterns (Publish-Subscribe, State Machines): -1. :doc:`Application ` -2. :doc:`Message Broker ` -3. :doc:`ControlFlowDivider ` -4. :doc:`PTP Machine ` -5. :doc:`Verification Machine ` -6. :doc:`IPC Machine ` -7. :doc:`VehicleClock (score::time) ` +1. **Application** — Orchestrates initialization and lifecycle of all daemon components +2. **Message Broker** — Central publish-subscribe hub for decoupled inter-unit communication +3. **ControlFlowDivider** — Separates execution threads to prevent blocking and maintain data flow consistency +4. **PTP Machine** — Retrieves raw time data from PTP stack at consistent rates +5. **Verification Machine** — Validates and qualifies time data (sync status, jump detection, timeout) +6. **IPC Machine** — Exports qualified time snapshots to client applications via shared-memory interface -Deployment view -~~~~~~~~~~~~~~~ +This separation enables independent testing, reusable implementations (e.g., different PTP stacks), +and clear responsibility boundaries critical for ASIL_B safety qualification. + +Static Diagrams for Unit Interactions +-------------------------------------- -The design deployment is represented on the following diagram: +Class View +~~~~~~~~~~ + +Main classes and unit relationships are presented on this diagram: .. raw:: html
-.. uml:: _assets/dd_deployment.puml - :alt: Deployment View +.. uml:: _assets/dd_class.puml + :alt: Class View + :width: 100% + :align: center .. raw:: html
-Class view -~~~~~~~~~~ +Deployment View +~~~~~~~~~~~~~~~ -Main classes and components are presented on this diagram: +The design deployment and process architecture is represented on this diagram: .. raw:: html
-.. uml:: _assets/dd_class.puml - :alt: Class View - :width: 100% - :align: center +.. uml:: _assets/dd_deployment.puml + :alt: Deployment View .. raw:: html
-Data and control flow +Dynamic Diagrams for Unit Interactions +--------------------------------------- + +Data and Control Flow ~~~~~~~~~~~~~~~~~~~~~ -The Data and Control flow are presented in the following diagram: +The data and control flow between units is presented in the following diagram: .. raw:: html @@ -181,13 +186,13 @@ Verified ptp data ``verified_ptp_data`` is the :ref:`input_ptp_data` which was verified according to the business logic and updated accordingly. This data should be published to the Applications. -SW Components decomposition -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Units within Time Daemon +------------------------- -The design consists of several internal units: +The following units comprise TimeDaemon's internal implementation: -Application unit -======================== +Application Unit +~~~~~~~~~~~~~~~~ The ``Application`` component is the main entry point for the ``TimeDaemon``. It is responsible for orchestrating the overall lifecycle and initialization of all daemon components. @@ -274,8 +279,8 @@ The execution and shutdown workflow is represented in the following sequence dia -Message Broker unit -=========================== +Message Broker Unit +~~~~~~~~~~~~~~~~~~~ The ``Message Broker`` component is the central communication hub that implements the Publish-Subscribe pattern within the ``TimeDaemon``. It enables decoupled communication between components by managing topics and distributing messages to interested subscribers. @@ -354,8 +359,8 @@ The ``Message Broker`` can be extended to support configuration-driven subscript -ControlFlowDivider unit -=============================== +ControlFlowDivider Unit +~~~~~~~~~~~~~~~~~~~~~~~ The ``ControlFlowDivider`` component is responsible for separating control (execution) flows within the ``TimeDaemon`` and providing the execution control flow for the data processing. It contains dedicated threads where data is published to the ``Message Broker``, ensuring that blocking operations in one component do not affect the execution of other components and data missing is not affecting the data analysis in processing pipeline. @@ -439,8 +444,8 @@ The execution workflow is represented in the following sequence diagram: -PTP Machine unit -======================== +PTP Machine Unit +~~~~~~~~~~~~~~~~ The ``PTP Machine`` component shall retrieve all needed information from the ptp stack (ex ``ptpd``) and provide it to the ``Message Broker`` for routing. All communication with the ptp stack ight use ``devctl`` calls, which take some time, thus these calls shall be done in the dedicated thread. @@ -513,8 +518,8 @@ The publish workflow is described below. -Verification Machine unit -================================= +Verification Machine Unit +~~~~~~~~~~~~~~~~~~~~~~~~~== The ``Verification Machine`` component is responsible for validating and qualifying the time information received from the ``PTP Machine``. It applies various validation rules to ensure the time data meets quality requirements before distribution to applications. @@ -589,8 +594,8 @@ When the ``Verification Machine`` receives new PTP data, it processes it through -IPC Machine unit -======================== +IPC Machine Unit +~~~~~~~~~~~~~~~~ The ``IPC Machine`` component shall get the :ref:`verified_ptp_data` from the ``Verification Machine`` and provide it to the ``VehicleClock`` backend (see :doc:`score::time — Unified Clock Interface <../time/index>`) through a custom shared memory channel. From 2a3ddbcbcfb6c0b436864aa332113278ac99e34e Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Fri, 14 Aug 2026 14:13:04 +0100 Subject: [PATCH 3/5] docs: remove time_daemon index toctree entry --- docs/features/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/features/index.rst b/docs/features/index.rst index db95ddb0..15bb44a1 100644 --- a/docs/features/index.rst +++ b/docs/features/index.rst @@ -20,6 +20,5 @@ Features :caption: Features: time/index - time_daemon/index time_slave/index test_cases From 11834f87e0a552a3d4f89dec1242db9f163a12b7 Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Fri, 14 Aug 2026 16:57:31 +0100 Subject: [PATCH 4/5] docs: populate time_daemon dd with ShmPTPEngine from time_slave dd --- .../shm_ptp_engine/shm_ptp_engine_class.puml | 105 ++++++++++++++++ .../shm_ptp_engine_init_seq.puml | 82 +++++++++++++ .../shm_ptp_engine_read_seq.puml | 73 +++++++++++ .../docs/detailed_design/index.rst | 116 +++++++++++++++++- 4 files changed, 375 insertions(+), 1 deletion(-) create mode 100644 score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml create mode 100644 score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml create mode 100644 score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml diff --git a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml new file mode 100644 index 00000000..1b5486c6 --- /dev/null +++ b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml @@ -0,0 +1,105 @@ +@startuml shm_ptp_engine_class_diagram +!theme plain + +title ShmPTPEngine: Class Diagram + +legend top left + |= Color |= Description | + | <#Beige> | Base classes / data types | + | <#Wheat> | PTPMachine / ShmPTPEngine | + | <#LightPink> | libTSClient IPC | +endlegend + +package "score::td" { + class "GPTPShmMachine" as real_machine #Wheat { + type alias for PTPMachine + -- + Constructed via CreateGPTPShmMachine() + } +} + +package "score::td (base classes)" { + abstract class "BaseMachine" as base_machine #Beige { + + GetName() : string + + Init() : bool + } + + abstract class "ProactiveMachine" as proactive_machine #Beige { + + Start() : void + + Stop() : void + } + + abstract class "PeriodicMachine" as periodic_machine #Beige { + # PeriodicTask() : void + } + + abstract class "Producer" as producer #Beige { + + SetPublishCallback(cb) : void + # Publish(data : T) : void + } + + class "PTPMachine" as ptp_machine #Wheat { + - engine_ : PTPEngine + + Init() : bool + + SetPublishCallback(cb) : void + # PeriodicTask() : void + } + + base_machine <|-- proactive_machine + proactive_machine <|-- periodic_machine + periodic_machine <|-- ptp_machine + producer <|.. ptp_machine +} + +package "score::td::details" { + class ShmPTPEngine #Wheat { + - ipc_name_ : string + - receiver_ : GptpIpcReceiver + - initialized_ : bool + + ShmPTPEngine(ipc_name : string) + + Initialize() : bool + + Deinitialize() : bool + + ReadPTPSnapshot(info : PtpTimeInfo&) : bool + } +} + +package "score::ts::details" { + class GptpIpcReceiver #LightPink { + + Init(name : string) : bool + + Receive() : optional + + Close() : void + } +} + +package "Data Types" { + class GptpIpcData #Beige { + + ptp_assumed_time : chrono::nanoseconds + + local_time : chrono::nanoseconds + + rate_deviation : double + + status : GptpIpcStatus + + sync_fup_data : GptpIpcSyncFupData + + pdelay_data : GptpIpcPDelayData + } + + class PtpTimeInfo #Beige { + + ptp_assumed_time + + local_time + + rate_deviation + + status + + sync_fup_data + + pdelay_data + } +} + +ptp_machine *-- ShmPTPEngine : PTPEngine = ShmPTPEngine +ShmPTPEngine *-- GptpIpcReceiver +ShmPTPEngine ..> GptpIpcData : reads +ShmPTPEngine ..> PtpTimeInfo : produces +real_machine --|> ptp_machine : alias + +note right of ShmPTPEngine + Maps GptpIpcData → PtpTimeInfo + on every ReadPTPSnapshot() call. +end note + +@enduml diff --git a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml new file mode 100644 index 00000000..1a3d2f62 --- /dev/null +++ b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml @@ -0,0 +1,82 @@ +@startuml shm_ptp_engine_init_seq +!theme plain + +title ShmPTPEngine: Initialization Sequence + +hide footbox +autonumber "[00]" + +legend top left + |= Color |= Description | + | <#LightCyan> | TimeDaemon | + | <#Wheat> | GPTPShmMachine | + | <#LightPink> | libTSClient IPC | +endlegend + +participant "TimeBaseHandler" as tb #LightCyan +participant "GPTPShmMachine\n(PTPMachine)" as machine #Wheat +participant "ShmPTPEngine" as engine #Wheat +participant "GptpIpcReceiver" as receiver #LightPink +participant "MessageBroker" as broker #LightCyan + +== Construction == + +tb -> machine ** : CreateGPTPShmMachine("shm", "/gptp_ptp_info") +activate tb +activate machine +machine -> engine ** : ShmPTPEngine("/gptp_ptp_info") +engine -> receiver ** : GptpIpcReceiver() +machine --> tb +deactivate machine +deactivate tb + +== Initialization == + +tb -> machine : Init() +activate tb +activate machine +machine -> engine : Initialize() +activate engine +engine -> receiver : Init("/gptp_ptp_info") +activate receiver +note right of receiver + shm_open(O_RDONLY) + mmap(PROT_READ) + verify magic == 0x47505450 +end note +receiver --> engine : true / false +deactivate receiver +engine --> machine +deactivate engine +machine --> tb +deactivate machine +deactivate tb + +== Setup Producer == + +tb -> broker : subscribe machine to "raw_ptp_data" topic +activate tb +activate broker +broker -> machine : SetPublishCallback(broker::OnNewData) +activate machine +machine --> broker +deactivate machine +broker --> tb +deactivate broker +deactivate tb + +== Start Periodic Operation == + +tb -> machine : Start() +activate tb +activate machine +machine -> machine : start periodic thread +note right + Begin periodic IPC reads + from shared memory +end note +machine --> tb +deactivate machine +deactivate tb + +@enduml diff --git a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml new file mode 100644 index 00000000..0a6a9142 --- /dev/null +++ b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml @@ -0,0 +1,73 @@ +@startuml shm_ptp_engine_read_seq +!theme plain + +title ShmPTPEngine: Periodic Read and Publish Workflow + +hide footbox +autonumber "[00]" + +legend top left + |= Color |= Description | + | <#Wheat> | GPTPShmMachine | + | <#LightPink> | libTSClient IPC | + | <#LightCyan> | Shared Memory | + | <#PaleTurquoise> | MessageBroker | + | <#LightBlue> | ControlFlowDivider | +endlegend + +participant "PTPMachine\n(PeriodicTask)" as machine #Wheat +participant "ShmPTPEngine" as engine #Wheat +participant "GptpIpcReceiver" as receiver #LightPink +participant "SharedMemory\n(GptpIpcRegion)" as shm #LightCyan +participant "MessageBroker" as broker #PaleTurquoise +participant "ControlFlowDivider" as cfd #LightBlue + +loop periodic (e.g., every 50 ms) + activate machine + machine -> machine : PeriodicTask() + + machine -> engine : ReadPTPSnapshot(info) + activate engine + engine -> receiver : Receive() + activate receiver + receiver -> shm : seqlock read (up to 20 retries) + activate shm + note right of shm + 1. read seq1 (acquire, must be even) + 2. memcpy GptpIpcData + 3. fence, read seq_confirm + seq + 4. verify seq1 == seq2 == seq3 + end note + shm --> receiver : GptpIpcData or contention + deactivate shm + receiver --> engine : optional + deactivate receiver + + alt data available + engine -> engine : map GptpIpcData → PtpTimeInfo + note right + status, ptp_assumed_time, + local_time, rate_deviation, + sync_fup_data, pdelay_data + end note + engine --> machine : true (PtpTimeInfo filled) + else no data (nullopt) + engine --> machine : false + end + deactivate engine + + alt ReadPTPSnapshot returned true + machine -> machine : Publish(PtpTimeInfo) + machine -> broker : publish_callback_(PtpTimeInfo) + activate broker + broker -> cfd : subscription.callback_(PtpTimeInfo) + activate cfd + cfd --> broker + deactivate cfd + broker --> machine + deactivate broker + end + deactivate machine +end + +@enduml diff --git a/score/time_daemon/docs/detailed_design/index.rst b/score/time_daemon/docs/detailed_design/index.rst index e2062ec2..762ad52e 100644 --- a/score/time_daemon/docs/detailed_design/index.rst +++ b/score/time_daemon/docs/detailed_design/index.rst @@ -12,7 +12,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -.. _time_daemon_detailed_design_index: +.. _time_daemon_detailed_design: Time Daemon Detailed Design =========================== @@ -516,6 +516,117 @@ The publish workflow is described below. +ShmPTPEngine Unit +~~~~~~~~~~~~~~~~~ + +The ``ShmPTPEngine`` component (in ``score::td::details``) is a ``PTP Machine`` implementation that reads ``GptpIpcData`` from the shared memory channel written by TimeSlave and converts it into the ``PtpTimeInfo`` structure expected by the TimeDaemon pipeline. + +It is instantiated as ``GPTPShmMachine`` — a type alias for ``PTPMachine`` — which connects ``ShmPTPEngine`` to the TimeDaemon's internal ``MessageBroker``. + +Implementation Requirements +''''''''''''''''''''''''''' + +The ``ShmPTPEngine`` has the following requirements: + +- The ``ShmPTPEngine`` shall call ``GptpIpcReceiver::Init(ipc_name)`` during ``Initialize()`` to open the shared memory channel +- The ``ShmPTPEngine`` shall call ``GptpIpcReceiver::Receive()`` in ``ReadPTPSnapshot()`` to fetch the latest ``GptpIpcData`` +- The ``ShmPTPEngine`` shall map all fields of ``GptpIpcData`` to the corresponding fields of ``PtpTimeInfo`` (status flags, Sync/FollowUp data, peer-delay data, time references) +- The ``ShmPTPEngine`` shall call ``GptpIpcReceiver::Close()`` during ``Deinitialize()`` +- The ``ShmPTPEngine`` shall be instantiatable with a configurable IPC channel name (default: ``/gptp_ptp_info``) + +Class View +'''''''''' + +The Class Diagram is presented below: + +.. raw:: html + +
+ +.. uml:: _assets/shm_ptp_engine/shm_ptp_engine_class.puml + :alt: Class Diagram + +.. raw:: html + +
+ +Initialization +'''''''''''''' + +During initialization the ``ShmPTPEngine`` shall open the shared memory channel to be able to read from it. + +The initialization workflow is represented in the following sequence diagram: + +.. raw:: html + +
+ +.. uml:: _assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml + :alt: Initialization workflow + +.. raw:: html + +
+ +Read PTP Snapshot +''''''''''''''''' + +After ``ShmPTPEngine`` reads the latest ``GptpIpcData`` from shared memory, it maps it to ``PtpTimeInfo`` and publishes via the ``MessageBroker``. + +The periodic read and publish workflow is described below: + +.. raw:: html + +
+ +.. uml:: _assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml + :alt: Periodic read and publish workflow + +.. raw:: html + +
+ +Data Mapping +'''''''''''' + +``ShmPTPEngine::ReadPTPSnapshot()`` performs a field-by-field mapping from ``GptpIpcData`` to ``PtpTimeInfo``: + +.. list-table:: GptpIpcData → PtpTimeInfo Mapping + :header-rows: 1 + :widths: 50 50 + + * - ``GptpIpcData`` field + - ``PtpTimeInfo`` field + * - ``ptp_assumed_time`` + - ``ptp_assumed_time`` + * - ``local_time`` + - ``local_time`` (wrapped in ``ReferenceClock::time_point``) + * - ``rate_deviation`` + - ``rate_deviation`` + * - ``status.is_synchronized`` + - ``status.is_synchronized`` + * - ``status.is_timeout`` + - ``status.is_timeout`` + * - ``status.is_time_jump_future`` + - ``status.is_time_jump_future`` + * - ``status.is_time_jump_past`` + - ``status.is_time_jump_past`` + * - ``status.is_correct`` + - ``status.is_correct`` + * - ``sync_fup_data.*`` (9 fields) + - ``sync_fup_data.*`` (direct copy) + * - ``pdelay_data.*`` (12 fields) + - ``pdelay_data.*`` (direct copy) + +Factory +''''''' + +``CreateGPTPShmMachine(name, ipc_name)`` is a convenience factory function in ``score::td`` that creates a configured ``GPTPShmMachine`` (``shared_ptr``) backed by ``ShmPTPEngine``: + +.. code-block:: cpp + + auto machine = CreateGPTPShmMachine("shm", "/gptp_ptp_info"); + Verification Machine Unit @@ -724,6 +835,9 @@ The daemon should have the following logging contexts: * - PTPMachine - TDPM - **T**\ ime\ **D**\ aemon **P**\ TP\ **M**\ achine + * - ShmPTPEngine + - GPTP + - **GPTP** Shm adapter (Initialize / ReadPTPSnapshot) * - VerificationMachine - TDVM - **T**\ ime\ **D**\ aemon **V**\ erification\ **M**\ achine From c428bcdb77eba5d8c85b3498f5cac5e575770d19 Mon Sep 17 00:00:00 2001 From: Ryan Steel Date: Mon, 17 Aug 2026 16:20:34 +0100 Subject: [PATCH 5/5] chore: fix copyright --- .../docs/detailed_design/_assets/app/app_class.puml | 13 +++++++++++++ .../detailed_design/_assets/app/app_init_seq.puml | 13 +++++++++++++ .../_assets/app/app_workflow_seq.puml | 13 +++++++++++++ .../_assets/ctrlflow/ctrlflow_class.puml | 13 +++++++++++++ .../_assets/ctrlflow/ctrlflow_init_seq.puml | 13 +++++++++++++ .../_assets/ctrlflow/ctrlflow_workflow_seq.puml | 13 +++++++++++++ .../docs/detailed_design/_assets/dd_class.puml | 13 +++++++++++++ .../_assets/dd_data_control_flow.puml | 13 +++++++++++++ .../docs/detailed_design/_assets/dd_deployment.puml | 13 +++++++++++++ .../abs_time/abs_time_data_control_flow.puml | 13 +++++++++++++ .../examples/abs_time/abs_time_deployment.puml | 13 +++++++++++++ .../_assets/examples/qvt/qvt_data_control_flow.puml | 13 +++++++++++++ .../_assets/examples/qvt/qvt_deployment.puml | 13 +++++++++++++ .../docs/detailed_design/_assets/ipc/ipc_class.puml | 13 +++++++++++++ .../detailed_design/_assets/ipc/ipc_init_seq.puml | 13 +++++++++++++ .../_assets/ipc/ipc_publish_seq.puml | 13 +++++++++++++ .../_assets/ipc/ipc_receive_seq.puml | 13 +++++++++++++ .../_assets/msg_broker/msg_broker_class.puml | 13 +++++++++++++ .../_assets/msg_broker/msg_broker_init_seq.puml | 13 +++++++++++++ .../_assets/msg_broker/msg_broker_workflow_seq.puml | 13 +++++++++++++ .../docs/detailed_design/_assets/mw/mw_class.puml | 13 +++++++++++++ .../_assets/mw/mw_time_receive_seq.puml | 13 +++++++++++++ .../_assets/mw/mw_time_receive_simple_seq.puml | 13 +++++++++++++ .../_assets/ptp_machine/ptp_machine_class.puml | 13 +++++++++++++ .../ptp_machine/ptp_machine_get_new_data_seq.puml | 13 +++++++++++++ .../_assets/ptp_machine/ptp_machine_init_seq.puml | 13 +++++++++++++ .../detailed_design/_assets/sad_deployment.puml | 13 +++++++++++++ .../shm_ptp_engine/shm_ptp_engine_class.puml | 13 +++++++++++++ .../shm_ptp_engine/shm_ptp_engine_init_seq.puml | 13 +++++++++++++ .../shm_ptp_engine/shm_ptp_engine_read_seq.puml | 13 +++++++++++++ .../_assets/ver_machine/ver_class.puml | 13 +++++++++++++ .../_assets/ver_machine/ver_init_seq.puml | 13 +++++++++++++ .../_assets/ver_machine/ver_verification_seq.puml | 13 +++++++++++++ 33 files changed, 429 insertions(+) diff --git a/score/time_daemon/docs/detailed_design/_assets/app/app_class.puml b/score/time_daemon/docs/detailed_design/_assets/app/app_class.puml index 81e37bf7..c5845bb8 100644 --- a/score/time_daemon/docs/detailed_design/_assets/app/app_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/app/app_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml application_class_diagram title Application: Class Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/app/app_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/app/app_init_seq.puml index ca562357..6c577df3 100644 --- a/score/time_daemon/docs/detailed_design/_assets/app/app_init_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/app/app_init_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml app_init_seq_diagram title Application: Initialization Sequence diff --git a/score/time_daemon/docs/detailed_design/_assets/app/app_workflow_seq.puml b/score/time_daemon/docs/detailed_design/_assets/app/app_workflow_seq.puml index 78c9b92d..f4aac652 100644 --- a/score/time_daemon/docs/detailed_design/_assets/app/app_workflow_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/app/app_workflow_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml app_init_seq_diagram title Application: Initialization Sequence diff --git a/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_class.puml b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_class.puml index 01d701a5..78edc70e 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml control_flow_divider_class_diagram title ControlFlowDivider: Class Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_init_seq.puml index fac9a77d..84bb93f8 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_init_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_init_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ctrlflow_init_seq_diagram title ControlFlowDivider: Initialization Sequence diff --git a/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_workflow_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_workflow_seq.puml index 715eaec2..d8deb743 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_workflow_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ctrlflow/ctrlflow_workflow_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml control_flow_divider_workflow title ControlFlowDivider: Main Workflow diff --git a/score/time_daemon/docs/detailed_design/_assets/dd_class.puml b/score/time_daemon/docs/detailed_design/_assets/dd_class.puml index e2b2d035..f104eee9 100644 --- a/score/time_daemon/docs/detailed_design/_assets/dd_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/dd_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml dd_class_diagram title TimeDaemon: Class Diagram Overview diff --git a/score/time_daemon/docs/detailed_design/_assets/dd_data_control_flow.puml b/score/time_daemon/docs/detailed_design/_assets/dd_data_control_flow.puml index b4eed8f1..0a566e72 100644 --- a/score/time_daemon/docs/detailed_design/_assets/dd_data_control_flow.puml +++ b/score/time_daemon/docs/detailed_design/_assets/dd_data_control_flow.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml dd_data_control_flow_diagram title TimeDaemon: Data and Control Flow diff --git a/score/time_daemon/docs/detailed_design/_assets/dd_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/dd_deployment.puml index 82b2fc66..8e86f845 100644 --- a/score/time_daemon/docs/detailed_design/_assets/dd_deployment.puml +++ b/score/time_daemon/docs/detailed_design/_assets/dd_deployment.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml dd_deployment_diagram title Deployment view diff --git a/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_data_control_flow.puml b/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_data_control_flow.puml index 9f05781c..10a2b19d 100644 --- a/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_data_control_flow.puml +++ b/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_data_control_flow.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml dd_data_control_flow_diagram title VehicleTimeDaemon: Multi-Timebase Data Flow diff --git a/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_deployment.puml index ff5c38be..6ce14249 100644 --- a/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_deployment.puml +++ b/score/time_daemon/docs/detailed_design/_assets/examples/abs_time/abs_time_deployment.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml dd_deployment_diagram title Deployment view diff --git a/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_data_control_flow.puml b/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_data_control_flow.puml index 8e30bea1..2b088090 100644 --- a/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_data_control_flow.puml +++ b/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_data_control_flow.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml dd_data_control_flow_diagram title VehicleTimeDaemon: Data and Control Flow diff --git a/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_deployment.puml index 897853d2..b659d8a9 100644 --- a/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_deployment.puml +++ b/score/time_daemon/docs/detailed_design/_assets/examples/qvt/qvt_deployment.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml dd_deployment_diagram title Deployment view diff --git a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_class.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_class.puml index 0b19cf97..b84830e6 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ipc_class_diagram title IPC: Class Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_init_seq.puml index 48d3c3e4..8662325d 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_init_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_init_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ipc_init_seq_diagram title IPC Machine: Initialization diff --git a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_publish_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_publish_seq.puml index db37a02e..07bba532 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_publish_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_publish_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ipc_publish_seq_diagram title IPC Machine: Publishing new TimeInfo data diff --git a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_receive_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_receive_seq.puml index 5d4b8745..b2380464 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_receive_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ipc/ipc_receive_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ipc_receive_seq_diagram title IPC Machine: Receiving new TimeInfo data diff --git a/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_class.puml b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_class.puml index 516ba856..3da05552 100644 --- a/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml message_broker_class_diagram title MessageBroker: Class Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_init_seq.puml index ac401cd3..6e11d5c2 100644 --- a/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_init_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_init_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml message_broker_initialization_sequence_diagram title MessageBroker: Initialization Sequence diff --git a/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_workflow_seq.puml b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_workflow_seq.puml index 8ab97dcd..d09aec46 100644 --- a/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_workflow_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/msg_broker/msg_broker_workflow_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml message_broker_workflow_sequence_diagram title Message Broker: Workflow Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/mw/mw_class.puml b/score/time_daemon/docs/detailed_design/_assets/mw/mw_class.puml index ce117773..f87bc4bb 100644 --- a/score/time_daemon/docs/detailed_design/_assets/mw/mw_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/mw/mw_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml mw_time_svt_class_diagram title mw::time::svt: Class Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_seq.puml b/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_seq.puml index 01ca54b6..da3824a6 100644 --- a/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml mw_time_receive_seq_diagram title mw::time::svt: Providing new Vehicle Time to Applications diff --git a/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_simple_seq.puml b/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_simple_seq.puml index ca27df74..84752234 100644 --- a/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_simple_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/mw/mw_time_receive_simple_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml mw_time_receive_simple_seq_diagram title mw::time::svt: Providing new Vehicle Time to Applications (simplified) diff --git a/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_class.puml b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_class.puml index 49b3f2c1..28e2d5da 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ptp_machine_class_diagram title PTPMachine: Class Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml index 64e48d09..24d1ff3e 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_get_new_data_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ptp_machine_data_publishing title PTPMachine: Periodic Data Publishing Workflow diff --git a/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_init_seq.puml index 619602f7..a10df131 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_init_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ptp_machine/ptp_machine_init_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml ptp_machine_initialization title PTPMachine: Initialization Sequence diff --git a/score/time_daemon/docs/detailed_design/_assets/sad_deployment.puml b/score/time_daemon/docs/detailed_design/_assets/sad_deployment.puml index 3b0da92b..33611c32 100644 --- a/score/time_daemon/docs/detailed_design/_assets/sad_deployment.puml +++ b/score/time_daemon/docs/detailed_design/_assets/sad_deployment.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml sad_deployment_diagram title Deployment view diff --git a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml index 1b5486c6..76b8ac8c 100644 --- a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml shm_ptp_engine_class_diagram !theme plain diff --git a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml index 1a3d2f62..869223ad 100644 --- a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_init_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml shm_ptp_engine_init_seq !theme plain diff --git a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml index 0a6a9142..319fcabf 100644 --- a/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/shm_ptp_engine/shm_ptp_engine_read_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml shm_ptp_engine_read_seq !theme plain diff --git a/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_class.puml b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_class.puml index 299b6f47..180a91d9 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_class.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_class.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml verification_machine_class_diagram title VerificationMachine: Class Diagram diff --git a/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_init_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_init_seq.puml index 9e4a0bce..c0a5f21d 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_init_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_init_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml verification_machine_init_sequence_diagram title VerificationMachine: Initialization Sequence diff --git a/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_verification_seq.puml b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_verification_seq.puml index 09f5c4ba..dcacb2e7 100644 --- a/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_verification_seq.puml +++ b/score/time_daemon/docs/detailed_design/_assets/ver_machine/ver_verification_seq.puml @@ -1,3 +1,16 @@ +' ******************************************************************************* +' Copyright (c) 2026 Contributors to the Eclipse Foundation +' +' See the NOTICE file(s) distributed with this work for additional +' information regarding copyright ownership. +' +' This program and the accompanying materials are made available under the +' terms of the Apache License Version 2.0 which is available at +' https://www.apache.org/licenses/LICENSE-2.0 +' +' SPDX-License-Identifier: Apache-2.0 +' ******************************************************************************* + @startuml verification_machine_verification_sequence_diagram title VerificationMachine: Validation Workflow