TimeDaemon Documentation#

This documentation describes the TimeDaemon and the score::time module.

Overview#

TimeDaemon is a non-AUTOSAR adaptive process designed to provide synchronized vehicle time to client applications. It supports multiple time bases including in-vehicle synchronized time (PTP - Precision Time Protocol) and external synchronized time (absolute time base). The daemon retrieves time information from the respective time sources, verifies and validates the timepoints, and distributes this time information across multiple clients through efficient IPC mechanisms.

The main responsibilities of TimeDaemon include:

  • Providing current Vehicle time to different applications

  • Setting synchronization qualifiers (e.g., Synchronized, Timeout, etc.)

  • Providing diagnostic information for system monitoring

  • Supporting additional verification mechanisms such as QualifiedVehicleTime (QVT) for safety-critical applications

For a detailed concept and architectural design, please refer to the TimeDaemon Concept Documentation.

Project Layout#

The module template includes the following top-level structure:

  • src/: Main C++/Rust sources

  • tests/: Unit and integration tests

  • examples/: Usage examples

  • docs/: Documentation using docs-as-code

  • .github/workflows/: CI/CD pipelines

Quick Start#

To build the module:

bazel build //src/...

To run tests:

bazel test //tests/...

To build the documentation:

bazel run //:docs

Configuration#

The project_config.bzl file defines metadata used by Bazel macros.

Example:

PROJECT_CONFIG = {
    "asil_level": "QM",
    "source_code": ["cpp", "rust"]
}

This enables conditional behavior (e.g., choosing clang-tidy for C++ or clippy for Rust).