You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **time client**, as part of score::time feature, shall synchronize the local clock with an external **time host** using the PTP protocol (IEEE 802.1AS).
27
+
28
+
.. feat_req:: score::time metadata
29
+
:id: feat_req__time__time_metadata
30
+
:reqtype: Functional
31
+
:security: NO
32
+
:safety: QM
33
+
:satisfies:
34
+
:status: valid
35
+
36
+
The score::time shall get the current synchronized time and its metadata from the **time host**.
37
+
38
+
.. feat_req:: score::time validation
39
+
:id: feat_req__time__time_validataion
40
+
:reqtype: Functional
41
+
:security: NO
42
+
:safety: QM
43
+
:satisfies:
44
+
:status: valid
45
+
46
+
The score::time shall validate the current synchronized time, which was received from the **time host** and reflect the validation results in the time point status accordingly.
47
+
48
+
Validation of the current synchronized time includes:
49
+
* checking the time point for loss of synchronization
50
+
* checking the time point for monotonicity
51
+
* checking the time point for instability, like time jumps to the past or to the future
52
+
53
+
.. feat_req:: score::time multiple applications
54
+
:id: feat_req__time__multiple_applications
55
+
:reqtype: Functional
56
+
:security: NO
57
+
:safety: QM
58
+
:satisfies:
59
+
:status: valid
60
+
61
+
The score::time feature shall provide a mechanism to access (read only) to the synchronized time and its status across multiple applications within one ECU.
62
+
63
+
.. feat_req:: score::time efficiency
64
+
:id: feat_req__time__client_efficiency
65
+
:reqtype: Functional
66
+
:security: NO
67
+
:safety: QM
68
+
:satisfies:
69
+
:status: valid
70
+
71
+
The score::time feature shall provide an access to the synchronized time and its status, see feat_req__time__multiple_applications, in an efficient way without any additional overhead, like kernel calls, Resource manager involvement and so on.
72
+
*Use case:* frequent access to the current synchronized time and its metadata by multiple clients within one ECU.
73
+
74
+
75
+
.. feat_req:: score::time synchronization process metadata
76
+
:id: feat_req__time__sync_process_metadata
77
+
:reqtype: Functional
78
+
:security: NO
79
+
:safety: QM
80
+
:satisfies:
81
+
:status: valid
82
+
83
+
The score::time feature shall provide a mechanism to access (read only) to the internal state of the synchronization process, see **Synchronization process metadata**, across multiple applications within one ECU.
84
+
85
+
.. feat_req:: score::time synchronization stat logging
86
+
:id: feat_req__time__sync_stat_logging
87
+
:reqtype: Functional
88
+
:security: NO
89
+
:safety: QM
90
+
:satisfies:
91
+
:status: valid
92
+
93
+
The score::time shall provide a mechanism to log the internal state of the synchronization process, see **Synchronization process metadata**, to be able to debug and diagnose the time synchronization process.
94
+
*Use case:* Debugging and diagnostics of the time synchronization process.
The score::time feature shall support synchronization with external time sources, such as GPS, based on SOME/IP messages.
108
+
109
+
.. feat_req:: score::time external synchronization status
110
+
:id: feat_req__time__external_sync_status
111
+
:reqtype: Functional
112
+
:security: NO
113
+
:safety: QM
114
+
:satisfies:
115
+
:status: valid
116
+
117
+
The score::time shall maintain the current synchronized time and its synchronization status, to be able to provide the latest values by clients request.
118
+
119
+
.. feat_req:: score::time external synchronization time
120
+
:id: feat_req__time__external_sync_time
121
+
:reqtype: Functional
122
+
:security: NO
123
+
:safety: QM
124
+
:satisfies:
125
+
:status: valid
126
+
127
+
The score::time feature shall provide a mechanism to access (read only) the current synchronized time from external time sources and its synchronization status.
128
+
129
+
.. feat_req:: score::time external synchronization status log
130
+
:id: feat_req__time__external_sync_status_log
131
+
:reqtype: Functional
132
+
:security: NO
133
+
:safety: QM
134
+
:satisfies:
135
+
:status: valid
136
+
137
+
The score::time feature shall provide a mechanism to log the internal state of the external time synchronization process, to be able to debug and diagnose the synchronization process.
138
+
139
+
140
+
High precision Clock
141
+
^^^^^^^^^^^^^^^^^^^^
142
+
143
+
.. feat_req:: score::time high precision clock
144
+
:id: feat_req__time__high_precision_clock
145
+
:reqtype: Functional
146
+
:security: NO
147
+
:safety: QM
148
+
:satisfies:
149
+
:status: valid
150
+
151
+
The score::time feature shall provide a mechanism to access (read only) the high precision clock in nanoseconds precision.
152
+
*Use case:* such clocks might be used for time-critical applications, such as audio/video streaming, event logging, and diagnostics.
153
+
154
+
155
+
Monotonic Clock
156
+
^^^^^^^^^^^^^^^
157
+
158
+
.. feat_req:: score::time monotonic clock
159
+
:id: feat_req__time__monotonic_clock
160
+
:reqtype: Functional
161
+
:security: NO
162
+
:safety: QM
163
+
:satisfies:
164
+
:status: valid
165
+
166
+
The score::time feature shall provide a mechanism to access (read only) to monotonic, not adjustable clock value, which is mapped from the known OS or HW clock.
Copy file name to clipboardExpand all lines: docs/features/time/index.rst
+16-51Lines changed: 16 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,13 @@ Time
24
24
:tags: time, feature_request, change_management
25
25
26
26
27
-
.. .. toctree::
28
-
.. :hidden:
27
+
.. toctree::
28
+
:maxdepth:1
29
+
:glob:
30
+
:titlesonly:
31
+
:hidden:
29
32
30
-
.. requirements.rst
33
+
docs/**/index
31
34
32
35
33
36
Feature flag
@@ -142,71 +145,32 @@ In-Vehicle Time Synchronization
142
145
143
146
Definitions:
144
147
145
-
**Time Slave**
148
+
**Time client**
146
149
An actor that runs on the system and is responsible for
147
150
148
-
* synchronizing the local clock with an external Time Master using the PTP protocol (IEEE 802.1AS).
151
+
* synchronizing the local clock with an external *time host* using the PTP protocol (IEEE 802.1AS).
149
152
* providing the synchronization meta information to the clients, including score::time feature. Where meta information includes, but not limited to synchronization status (synchronized, not synchronized, unstable), time difference to the external time source, last synchronization time, current time point of the local clock and so on.
150
153
151
154
**Synchronization process metadata**
152
-
Data which is provided by the **Time Slave** and includes the current synchronized time, synchronization status, rate correction, and so on, which are the output or intermediate artifacts of the synchronization process.
155
+
Data which is provided by the **time client** and includes the current synchronized time, synchronization status, rate correction, and so on, which are the output or intermediate artifacts of the synchronization process.
153
156
154
-
Requirements:
155
-
156
-
* REQ_0001: the **Time Slave**, as part of score::time feature, shall synchronize the local clock with an external **Time Master** using the PTP protocol (IEEE 802.1AS).
157
-
* REQ_0002: the score::time shall get the current synchronized time and its metadata from the **Time Slave**.
158
-
* REQ_0003: the score::time shall maintain the current synchronized time, its synchronization status and **Synchronization process metadata**, to be able to provide the latest values by clients request.
159
-
* REQ_0004: the score::time shall validate the current synchronized time, which was received from the **Time Slave** and reflect the validation results in the time point status accordingly.
160
-
Validation of the current synchronized time includes:
161
-
162
-
* checking the time point for loss of synchronization
163
-
* checking the time point for monotonicity
164
-
* checking the time point for instability, like time jumps to the past or to the future
165
-
166
-
* REQ_0005: the score::time feature shall provide a mechanism to access (read only) to the synchronized time and its status across multiple applications within one ECU.
167
-
* REQ_0006: the score::time feature shall provide an access to the synchronized time and its status, see REQ_0005, in an efficient way without any additional overhead, like kernel calls, Resource manager involvement and so on.
168
-
*Use case:* frequent access to the current synchronized time and its metadata by multiple clients within one ECU.
169
-
* REQ_0007: the score::time feature shall provide a mechanism to access (read only) to the internal state of the synchronization process, see **Synchronization process metadata**, across multiple applications within one ECU.
170
-
* REQ_0008: the score::time shall provide a mechanism to log the internal state of the synchronization process, see **Synchronization process metadata**, to be able to debug and diagnose the time synchronization process.
171
-
*Use case:* Debugging and diagnostics of the time synchronization process.
172
-
173
-
The diagram above illustrates the data flow and interactions between the Time Slave, score::time middleware, and client applications within an ECU during PTP-based time synchronization.
157
+
The diagram bellow illustrates the data flow and interactions between the Time client, score::time middleware, and client applications within an ECU during PTP-based time synchronization.
174
158
175
159
.. uml:: data_flow.puml
176
-
:caption: Data flow between Time Slave, score::time, and clients
160
+
:caption: Data flow between time client, score::time, and clients
177
161
178
162
Where
179
163
180
-
* The **Time Slave** (gPTP stack) communicates with an external Time Master to maintain accurate time synchronization using the PTP protocol.
181
-
* The **Time base provider** periodically reads the synchronized time from the Time Slave, validates it, and writes the results (including status flags and timestamps) into some shared resource towards **score::time** middleware. Different IPC mechanisms can be used for to provide actual synchronized time and its metadata to **Time base provider**, like:
164
+
* The **time client** (gPTP stack) communicates with an external time host to maintain accurate time synchronization using the PTP protocol.
165
+
* The **Time base provider** periodically reads the synchronized time from the Time client, validates it, and writes the results (including status flags and timestamps) into some shared resource towards **score::time** middleware. Different IPC mechanisms can be used for to provide actual synchronized time and its metadata to **Time base provider**, like:
182
166
183
-
* shared memory, then the **Time Slave** writes the synchronized time and its metadata into the shared memory, which is then read by the **Time base provider** middleware.
167
+
* shared memory, then the **time client** writes the synchronized time and its metadata into the shared memory, which is then read by the **Time base provider** middleware.
184
168
* **Time base provider** polls for current EMAC value with ``devctl`` calls.
185
169
* other IPC methods.
186
170
187
171
* The **score::time** middleware accesses this shared resource to obtain the latest synchronized time and its metadata, adjusting the time as needed based on the local clock by requests from client applications.
188
172
* This architecture ensures efficient, low-overhead distribution of synchronized time and its status to multiple applications within the ECU, supporting both real-time and diagnostic use cases.
189
173
190
-
External Time Synchronization
191
-
-----------------------------
192
-
193
-
* REQ_0010: the score::time feature shall support synchronization with external time sources, such as GPS, based on SOME/IP messages.
194
-
* REQ_0011: the score::time shall maintain the current synchronized time and its synchronization status, to be able to provide the latest values by clients request.
195
-
* REQ_0012: the score::time feature shall provide a mechanism to access (read only) the current synchronized time from external time sources and its synchronization status.
196
-
* REQ_0013: the score::time feature shall provide a mechanism to log the internal state of the external time synchronization process, to be able to debug and diagnose the synchronization process.
197
-
198
-
High precision Clock
199
-
--------------------
200
-
201
-
* REQ_0014: the score::time feature shall provide a mechanism to access (read only) the high precision clock in nanoseconds precision.
202
-
*Use case:* such clocks might be used for time-critical applications, such as audio/video streaming, event logging, and diagnostics.
203
-
204
-
Monotonic Clock
205
-
---------------
206
-
207
-
* REQ_0015: the score::time feature shall provide a mechanism to access (read only) to monotonic, not adjustable clock value, which is mapped from the known OS or HW clock.
0 commit comments