Integration Guide#
This guide is intended for system integrators who are responsible for deploying and configuring the time module services on an ECU.
System Services#
The S-CORE time module consists of two essential system services that must be running for the client library to function:
time_slave: The PTP slave process that communicates with the network master clock.time_daemon: The daemon that processes the data from thetime_slaveand provides it to client applications.
These two processes must be managed by the system’s service manager (e.g., systemd on Linux, or a launch script on QNX).
Runtime Requirements#
Operating System Privileges#
The time_slave process requires elevated privileges to access raw network sockets and control the hardware clock. It is strongly recommended not to run this process as the root user. Instead, grant the required Linux Capabilities to the executable:
sudo setcap cap_net_admin,cap_net_raw,cap_sys_time+eip /path/to/your/time_slave
cap_net_admin: For network interface configuration.cap_net_raw: For the use of raw sockets to listen to PTP traffic.cap_sys_time: For adjusting the system’s hardware clock.
Network Configuration#
The network interface used for PTP communication must be provided to the
time_slavevia the-i, --interface <name>command-line argument.The ECU must have network connectivity to the PTP Grandmaster clock on this interface.
Build-Time Dependencies (Bazel)#
For an application to successfully link against the score::time client library, its cc_binary or cc_library target in the BUILD file must include the vehicle_time dependencies.
Please refer to the Bazel Build Setup section in the examples documentation for a detailed explanation of the required deps.