Skip to content

Commit bffab9a

Browse files
committed
software: Adept and add new timers requirements
Add new timers requirements on the software level Remove the user stories from the existing requirements. Remove obsolete requirements and rephrase existing ones. Signed-off-by: Simon Hein <[email protected]>
1 parent 6c7b682 commit bffab9a

File tree

1 file changed

+302
-9
lines changed

1 file changed

+302
-9
lines changed

docs/software_requirements/timers.sdoc

Lines changed: 302 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ UID: ZEP-SRS-4-1
1010
STATUS: Draft
1111
TYPE: Functional
1212
COMPONENT: Timers
13-
TITLE: Kernel Clock
13+
TITLE: Timer definition at run time
1414
STATEMENT: >>>
15-
The Zephyr RTOS shall provide a interface for checking the current value of the real-time clock.
16-
<<<
17-
USER_STORY: >>>
18-
As a Zephyr RTOS user, I want to be able to track the passed real time in the OS with a dedicated hardware counter and interrupt.
15+
The Zephyr RTOS shall provide a mechanism to define and initialize timers at run time.
1916
<<<
2017
RELATIONS:
2118
- TYPE: Parent
@@ -26,12 +23,308 @@ UID: ZEP-SRS-4-2
2623
STATUS: Draft
2724
TYPE: Functional
2825
COMPONENT: Timers
29-
TITLE: Call functions in interrupt context
26+
TITLE: Timer definition at compile time
27+
STATEMENT: >>>
28+
The Zephyr RTOS shall provide a mechanism to define and static initialize timers (compile time).
29+
<<<
30+
RELATIONS:
31+
- TYPE: Parent
32+
VALUE: ZEP-SYRS-18
33+
34+
[REQUIREMENT]
35+
UID: ZEP-SRS-4-3
36+
STATUS: Draft
37+
TYPE: Non-Functional
38+
COMPONENT: Timers
39+
TITLE: Timer status
40+
STATEMENT: >>>
41+
A Zephyr RTOS timer shall have a status which indicates the expiration of the timer.
42+
<<<
43+
RELATIONS:
44+
- TYPE: Parent
45+
VALUE: ZEP-SYRS-18
46+
47+
[REQUIREMENT]
48+
UID: ZEP-SRS-4-4
49+
STATUS: Draft
50+
TYPE: Functional
51+
COMPONENT: Timers
52+
TITLE: Timer period
53+
STATEMENT: >>>
54+
A Zephyr RTOS timer shall support repeated expiration of the timer given by a timer-specific time period.
55+
<<<
56+
RELATIONS:
57+
- TYPE: Parent
58+
VALUE: ZEP-SYRS-18
59+
60+
[REQUIREMENT]
61+
UID: ZEP-SRS-4-5
62+
STATUS: Draft
63+
TYPE: Functional
64+
COMPONENT: Timers
65+
TITLE: Timer duration
3066
STATEMENT: >>>
31-
The Zephyr RTOS shall provide an interface to schedule user mode call back function triggered by a real time clock value.
67+
A Zephyr RTOS timer shall have a duration which indicates when the timer expires for the first time.
3268
<<<
33-
USER_STORY: >>>
34-
As a Zephyr RTOS user, I want to be able to execute functions in the interrupt context and the interrupt context shall be base on a real-time counter.
69+
RELATIONS:
70+
- TYPE: Parent
71+
VALUE: ZEP-SYRS-18
72+
73+
[REQUIREMENT]
74+
UID: ZEP-SRS-4-6
75+
STATUS: Draft
76+
TYPE: Functional
77+
COMPONENT: Timers
78+
TITLE: Timer expiry function
79+
STATEMENT: >>>
80+
A Zephyr RTOS timer shall support a user-settable expiry function that gets called whenever the timer expires.
81+
<<<
82+
RELATIONS:
83+
- TYPE: Parent
84+
VALUE: ZEP-SYRS-18
85+
86+
[REQUIREMENT]
87+
UID: ZEP-SRS-4-7
88+
STATUS: Draft
89+
TYPE: Functional
90+
COMPONENT: Timers
91+
TITLE: Timer stop function
92+
STATEMENT: >>>
93+
A Zephyr RTOS timer shall support a user-settable stop function that gets called when the timer is stopped while running.
94+
<<<
95+
RELATIONS:
96+
- TYPE: Parent
97+
VALUE: ZEP-SYRS-18
98+
99+
[REQUIREMENT]
100+
UID: ZEP-SRS-4-8
101+
STATUS: Draft
102+
TYPE: Functional
103+
COMPONENT: Timers
104+
TITLE: Initialialization with expiry function
105+
STATEMENT: >>>
106+
When initializing a Zephyr RTOS timer, the expiry function a timer can have shall be settable.
107+
<<<
108+
RELATIONS:
109+
- TYPE: Parent
110+
VALUE: ZEP-SYRS-18
111+
112+
[REQUIREMENT]
113+
UID: ZEP-SRS-4-9
114+
STATUS: Draft
115+
TYPE: Functional
116+
COMPONENT: Timers
117+
TITLE: Initialialization with stop function
118+
STATEMENT: >>>
119+
When initializing a Zephyr RTOS timer, the stop function a timer can have shall be settable.
120+
<<<
121+
RELATIONS:
122+
- TYPE: Parent
123+
VALUE: ZEP-SYRS-18
124+
125+
[REQUIREMENT]
126+
UID: ZEP-SRS-4-10
127+
STATUS: Draft
128+
TYPE: Functional
129+
COMPONENT: Timers
130+
TITLE: Timer start
131+
STATEMENT: >>>
132+
The Zephyr RTOS shall provide a mechanism to start a defined and initialized timer.
133+
<<<
134+
RELATIONS:
135+
- TYPE: Parent
136+
VALUE: ZEP-SYRS-18
137+
138+
[REQUIREMENT]
139+
UID: ZEP-SRS-4-11
140+
STATUS: Draft
141+
TYPE: Functional
142+
COMPONENT: Timers
143+
TITLE: Start timer status reset
144+
STATEMENT: >>>
145+
When a timer is started with the start mechanism the status of the timer is set to zero.
146+
<<<
147+
RELATIONS:
148+
- TYPE: Parent
149+
VALUE: ZEP-SYRS-18
150+
151+
[REQUIREMENT]
152+
UID: ZEP-SRS-4-12
153+
STATUS: Draft
154+
TYPE: Functional
155+
COMPONENT: Timers
156+
TITLE: Start timer counting values
157+
STATEMENT: >>>
158+
When a timer is started with the start mechanism, the timer starts counting with the given persiod and duration values
159+
<<<
160+
RELATIONS:
161+
- TYPE: Parent
162+
VALUE: ZEP-SYRS-18
163+
164+
[REQUIREMENT]
165+
UID: ZEP-SRS-4-13
166+
STATUS: Draft
167+
TYPE: Functional
168+
COMPONENT: Timers
169+
TITLE: Timer stop
170+
STATEMENT: >>>
171+
A Zephyr RTOS timer that is running shall be stoppable
172+
<<<
173+
RELATIONS:
174+
- TYPE: Parent
175+
VALUE: ZEP-SYRS-18
176+
177+
[REQUIREMENT]
178+
UID: ZEP-SRS-4-14
179+
STATUS: Draft
180+
TYPE: Functional
181+
COMPONENT: Timers
182+
TITLE: Timer status read
183+
STATEMENT: >>>
184+
The Zephyr RTOS shall provide a mechanism to read the number of times a timer that is running has already expired.
185+
<<<
186+
RELATIONS:
187+
- TYPE: Parent
188+
VALUE: ZEP-SYRS-18
189+
190+
[REQUIREMENT]
191+
UID: ZEP-SRS-4-15
192+
STATUS: Draft
193+
TYPE: Functional
194+
COMPONENT: Timers
195+
TITLE: Timer status read reset
196+
STATEMENT: >>>
197+
When the timer is read via the timer status read mechanism, the status shall be reset.
198+
<<<
199+
RELATIONS:
200+
- TYPE: Parent
201+
VALUE: ZEP-SYRS-18
202+
203+
[REQUIREMENT]
204+
UID: ZEP-SRS-4-16
205+
STATUS: Draft
206+
TYPE: Functional
207+
COMPONENT: Timers
208+
TITLE: Timer thread synchronization
209+
STATEMENT: >>>
210+
The Zephyr RTOS shall provide a mechanism to synchronize a thread with a defined and initialized timer.
211+
<<<
212+
RELATIONS:
213+
- TYPE: Parent
214+
VALUE: ZEP-SYRS-18
215+
216+
[REQUIREMENT]
217+
UID: ZEP-SRS-4-17
218+
STATUS: Draft
219+
TYPE: Functional
220+
COMPONENT: Timers
221+
TITLE: Synchronized thread blocks until timer has expired
222+
STATEMENT: >>>
223+
When the thread synchronization mechanism is used, the thread shall be blocked until the timer expires.
224+
<<<
225+
RELATIONS:
226+
- TYPE: Parent
227+
VALUE: ZEP-SYRS-18
228+
229+
[REQUIREMENT]
230+
UID: ZEP-SRS-4-18
231+
STATUS: Draft
232+
TYPE: Functional
233+
COMPONENT: Timers
234+
TITLE: Synchronized thread is unblocked when timer is stopped.
235+
STATEMENT: >>>
236+
When the thread synchronization mechanism is used, the synchronized thread shall be unblocked when the timer is stopped.
237+
<<<
238+
RELATIONS:
239+
- TYPE: Parent
240+
VALUE: ZEP-SYRS-18
241+
242+
[REQUIREMENT]
243+
UID: ZEP-SRS-4-19
244+
STATUS: Draft
245+
TYPE: Functional
246+
COMPONENT: Timers
247+
TITLE: Timer thread synchronization status reset
248+
STATEMENT: >>>
249+
When the thread synchronization mechanism is used, the status of the timer shall be reset.
250+
<<<
251+
RELATIONS:
252+
- TYPE: Parent
253+
VALUE: ZEP-SYRS-18
254+
255+
[REQUIREMENT]
256+
UID: ZEP-SRS-4-20
257+
STATUS: Draft
258+
TYPE: Functional
259+
COMPONENT: Timers
260+
TITLE: Provide timer remaining expiration time in units of system ticks
261+
STATEMENT: >>>
262+
The Zephyr RTOS shall provide a mechanism to get the timer's remaining time until its next expiry in system ticks.
263+
<<<
264+
RELATIONS:
265+
- TYPE: Parent
266+
VALUE: ZEP-SYRS-18
267+
268+
[REQUIREMENT]
269+
UID: ZEP-SRS-4-21
270+
STATUS: Draft
271+
TYPE: Functional
272+
COMPONENT: Timers
273+
TITLE: Provide timer remaining expiration time in milliseconds
274+
STATEMENT: >>>
275+
The Zephyr RTOS shall provide a mechanism to get the timer's remaining time until its next expiry in milliseconds.
276+
<<<
277+
RELATIONS:
278+
- TYPE: Parent
279+
VALUE: ZEP-SYRS-18
280+
281+
[REQUIREMENT]
282+
UID: ZEP-SRS-4-22
283+
STATUS: Draft
284+
TYPE: Functional
285+
COMPONENT: Timers
286+
TITLE: Timer set user data
287+
STATEMENT: >>>
288+
The Zephyr RTOS shall provide a mechanism to set user data to a timer.
289+
<<<
290+
RELATIONS:
291+
- TYPE: Parent
292+
VALUE: ZEP-SYRS-18
293+
294+
[REQUIREMENT]
295+
UID: ZEP-SRS-4-23
296+
STATUS: Draft
297+
TYPE: Functional
298+
COMPONENT: Timers
299+
TITLE: Timer get user data
300+
STATEMENT: >>>
301+
The Zephyr RTOS shall provide a mechanism to get user data from a timer.
302+
<<<
303+
RELATIONS:
304+
- TYPE: Parent
305+
VALUE: ZEP-SYRS-18
306+
307+
[REQUIREMENT]
308+
UID: ZEP-SRS-4-24
309+
STATUS: Draft
310+
TYPE: Functional
311+
COMPONENT: Timers
312+
TITLE: Timer expire functions in interrupt context
313+
STATEMENT: >>>
314+
When the timer expiry function is defined, it shall be called in the interrupt context.
315+
<<<
316+
RELATIONS:
317+
- TYPE: Parent
318+
VALUE: ZEP-SYRS-18
319+
320+
[REQUIREMENT]
321+
UID: ZEP-SRS-4-25
322+
STATUS: Draft
323+
TYPE: Functional
324+
COMPONENT: Timers
325+
TITLE: Provide timer next expiration time in units of system ticks
326+
STATEMENT: >>>
327+
The Zephyr RTOS shall provide a mechanism to get the timer's next time of expiration in system ticks.
35328
<<<
36329
RELATIONS:
37330
- TYPE: Parent

0 commit comments

Comments
 (0)