|
21 | 21 | :id: doc__time |
22 | 22 | :status: valid |
23 | 23 | :safety: ASIL_B |
24 | | - :realizes: wp__feat_request |
25 | 24 | :tags: time, feature_request, change_management |
26 | 25 |
|
27 | 26 |
|
@@ -75,27 +74,6 @@ Bridging between different network domains (e.g., Ethernet to CAN) is outside th |
75 | 74 | Clocks, Accuracy, and Reading Current Time |
76 | 75 | ------------------------------------------ |
77 | 76 |
|
78 | | -The basic concept of Time is represented by two initial and one derived element: |
79 | | - |
80 | | -*Clocks* are the sources of time. A clock produced a sequence on *Timepoints*, each representing a specific point in time. |
81 | | -Timepoints have an Order, i.e. the relations "equal" and "less than" are defined. Because of this, TimePoints can be substracted, creating a *TimeSpan*. |
82 | | - |
83 | | -The following operations are valid between TimePoints and TimeSpans: |
84 | | - |
85 | | -* Substraction: TimeSpan := TimePoint - TimePoint; TimeSpan := [TimeSpan - TimeSpan] | Negative TimeSpans shall not be allowed, the substraction saturates to zero. |
86 | | -* Addition: TimePoint := TimePoint + TimeSpan; TimeSpan := TimeSpan + TimeSpan |
87 | | -* Multiplication: TimeSpan := Factor * TimeSpan |
88 | | -* Equality: bool := TimePoint == TimePoint; bool := TimeSpan == TimeSpan |
89 | | -* Comparison: bool := TimePoint < TimePoint; bool := TimeSpan < TimeSpan (this includes with equality the less-than-or-equal relation) |
90 | | - |
91 | | -The clock is characterized by main attributes: |
92 | | - |
93 | | -* Frequency: The frequency with which the clock updates the TimePoints it issues. |
94 | | -* Resolution: The accuracy of an individual timepoint. While an ideal clock would have a resolution that is the reciproke of the frequency in reality this may not be the case. |
95 | | -* Monotony: A clock can be monotonous (TP[n+1] >= TP[n] is always maintained), strictly monotonous or not monotonous |
96 | | -* Steady: A steady clock will update in fixed intervals, i.e. each increment is exactly 1/Frequency. For example system clock is neither monotonous nor steady because of summer/winter time and leap seconds. |
97 | | -* Epoch: The TimePoint the clock started ticking. The semantic of the epoch is a documentation property of the clock. Example: Unix system clock has an Epoch value of 0 on 01.01.1970, 00:00:00 UTC. |
98 | | - |
99 | 77 | Modern software environments contain several types of clocks (or time bases), including: |
100 | 78 |
|
101 | 79 | * Local clocks, such as monotonic or steady clocks |
@@ -128,17 +106,37 @@ Sharing a consistent logical timestamp ensures deterministic computations. For i |
128 | 106 | Logical time must be explicitly provided to the tasks within these cause-effect chains, but its availability in background processes or non-time-sensitive tasks is not required. |
129 | 107 |
|
130 | 108 |
|
131 | | - |
132 | | - |
133 | | - |
134 | | - |
135 | 109 | .. Rationale |
136 | 110 | .. ========== |
137 | 111 |
|
138 | 112 |
|
139 | 113 | Specification |
140 | 114 | ============= |
141 | 115 |
|
| 116 | +.. note:: |
| 117 | + From S-CORE workshop regarding Clocks, Accuracy, and Reading Current Time: |
| 118 | + |
| 119 | + The basic concept of Time is represented by two initial and one derived element: |
| 120 | + |
| 121 | + *Clocks* are the sources of time. A clock produced a sequence on *Timepoints*, each representing a specific point in time. |
| 122 | + Timepoints have an Order, i.e. the relations "equal" and "less than" are defined. Because of this, TimePoints can be substracted, creating a *TimeSpan*. |
| 123 | + |
| 124 | + The following operations are valid between TimePoints and TimeSpans: |
| 125 | + |
| 126 | + * Substraction: TimeSpan := TimePoint - TimePoint; TimeSpan := [TimeSpan - TimeSpan] | Negative TimeSpans shall not be allowed, the substraction saturates to zero. |
| 127 | + * Addition: TimePoint := TimePoint + TimeSpan; TimeSpan := TimeSpan + TimeSpan |
| 128 | + * Multiplication: TimeSpan := Factor * TimeSpan |
| 129 | + * Equality: bool := TimePoint == TimePoint; bool := TimeSpan == TimeSpan |
| 130 | + * Comparison: bool := TimePoint < TimePoint; bool := TimeSpan < TimeSpan (this includes with equality the less-than-or-equal relation) |
| 131 | + |
| 132 | + The clock is characterized by main attributes: |
| 133 | + |
| 134 | + * Frequency: The frequency with which the clock updates the TimePoints it issues. |
| 135 | + * Resolution: The accuracy of an individual timepoint. While an ideal clock would have a resolution that is the reciproke of the frequency in reality this may not be the case. |
| 136 | + * Monotony: A clock can be monotonous (TP[n+1] >= TP[n] is always maintained), strictly monotonous or not monotonous |
| 137 | + * Steady: A steady clock will update in fixed intervals, i.e. each increment is exactly 1/Frequency. For example system clock is neither monotonous nor steady because of summer/winter time and leap seconds. |
| 138 | + * Epoch: The TimePoint the clock started ticking. The semantic of the epoch is a documentation property of the clock. Example: Unix system clock has an Epoch value of 0 on 01.01.1970, 00:00:00 UTC. |
| 139 | + |
142 | 140 | In-Vehicle Time Synchronization |
143 | 141 | ------------------------------- |
144 | 142 |
|
@@ -209,6 +207,7 @@ Monotonic Clock |
209 | 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. |
210 | 208 |
|
211 | 209 |
|
| 210 | + |
212 | 211 | .. Backwards Compatibility |
213 | 212 | .. ======================= |
214 | 213 |
|
|
0 commit comments