Skip to content

Commit ded56a1

Browse files
committed
reqmgmt: Rework Timer requirements
Merge requirements when possible Rename status to number of times expired Fixes #65 Signed-off-by: Stephane Parenti <[email protected]>
1 parent 09d20ea commit ded56a1

File tree

1 file changed

+33
-161
lines changed

1 file changed

+33
-161
lines changed

docs/software_requirements/timers.sdoc

Lines changed: 33 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ UID: ZEP-SRS-4-1
1515
STATUS: Draft
1616
TYPE: Functional
1717
COMPONENT: Timers
18-
TITLE: Timer definition at run time
18+
TITLE: Timer definition at compile time
1919
STATEMENT: >>>
20-
The Zephyr RTOS shall provide a mechanism to define and initialize timers at run time.
20+
The Zephyr RTOS shall provide a mechanism to define and statically (i.e. compile time) initialize timers.
2121
<<<
2222
RELATIONS:
2323
- TYPE: Parent
@@ -28,9 +28,9 @@ UID: ZEP-SRS-4-2
2828
STATUS: Draft
2929
TYPE: Functional
3030
COMPONENT: Timers
31-
TITLE: Timer definition at compile time
31+
TITLE: Timer expiry function
3232
STATEMENT: >>>
33-
The Zephyr RTOS shall provide a mechanism to define and static initialize timers (compile time).
33+
When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when the timer expires.
3434
<<<
3535
RELATIONS:
3636
- TYPE: Parent
@@ -39,11 +39,11 @@ RELATIONS:
3939
[REQUIREMENT]
4040
UID: ZEP-SRS-4-3
4141
STATUS: Draft
42-
TYPE: Non-Functional
42+
TYPE: Functional
4343
COMPONENT: Timers
44-
TITLE: Timer status
44+
TITLE: Timer stop function
4545
STATEMENT: >>>
46-
A Zephyr RTOS timer shall have a status which indicates the expiration of the timer.
46+
When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when a running timer is stopped.
4747
<<<
4848
RELATIONS:
4949
- TYPE: Parent
@@ -54,9 +54,9 @@ UID: ZEP-SRS-4-4
5454
STATUS: Draft
5555
TYPE: Functional
5656
COMPONENT: Timers
57-
TITLE: Timer period
57+
TITLE: Timer definition at run time
5858
STATEMENT: >>>
59-
A Zephyr RTOS timer shall support repeated expiration of the timer given by a timer-specific time period.
59+
The Zephyr RTOS shall provide a mechanism to define and initialize timers at run time.
6060
<<<
6161
RELATIONS:
6262
- TYPE: Parent
@@ -67,9 +67,9 @@ UID: ZEP-SRS-4-5
6767
STATUS: Draft
6868
TYPE: Functional
6969
COMPONENT: Timers
70-
TITLE: Timer duration
70+
TITLE: Timer start
7171
STATEMENT: >>>
72-
A Zephyr RTOS timer shall have a duration which indicates when the timer expires for the first time.
72+
The Zephyr RTOS shall provide a mechanism to start a timer for a specific duration and periodicity.
7373
<<<
7474
RELATIONS:
7575
- TYPE: Parent
@@ -80,9 +80,9 @@ UID: ZEP-SRS-4-6
8080
STATUS: Draft
8181
TYPE: Functional
8282
COMPONENT: Timers
83-
TITLE: Timer expiry function
83+
TITLE: Timer stop
8484
STATEMENT: >>>
85-
A Zephyr RTOS timer shall support a user-settable expiry function that gets called whenever the timer expires.
85+
The Zephyr RTOS shall provide a mechanism to stop a running timer.
8686
<<<
8787
RELATIONS:
8888
- TYPE: Parent
@@ -91,11 +91,11 @@ RELATIONS:
9191
[REQUIREMENT]
9292
UID: ZEP-SRS-4-7
9393
STATUS: Draft
94-
TYPE: Functional
94+
TYPE: Non-Functional
9595
COMPONENT: Timers
96-
TITLE: Timer stop function
96+
TITLE: Timer status
9797
STATEMENT: >>>
98-
A Zephyr RTOS timer shall support a user-settable stop function that gets called when the timer is stopped while running.
98+
The Zephyr RTOS shall provide a mechanism to read the number of times a timer has expired and then reset this number to 0.
9999
<<<
100100
RELATIONS:
101101
- TYPE: Parent
@@ -104,11 +104,11 @@ RELATIONS:
104104
[REQUIREMENT]
105105
UID: ZEP-SRS-4-8
106106
STATUS: Draft
107-
TYPE: Functional
107+
TYPE: Non-Functional
108108
COMPONENT: Timers
109-
TITLE: Initialialization with expiry function
109+
TITLE: Timer status reinitialization
110110
STATEMENT: >>>
111-
When initializing a Zephyr RTOS timer, the expiry function a timer can have shall be settable.
111+
When a timer is initialized, started or synchronized to a thread, the Zephyr RTOS shall reset the timer number of times it has expired to 0.
112112
<<<
113113
RELATIONS:
114114
- TYPE: Parent
@@ -119,9 +119,11 @@ UID: ZEP-SRS-4-9
119119
STATUS: Draft
120120
TYPE: Functional
121121
COMPONENT: Timers
122-
TITLE: Initialialization with stop function
122+
TITLE: Timer thread synchronization
123123
STATEMENT: >>>
124-
When initializing a Zephyr RTOS timer, the stop function a timer can have shall be settable.
124+
The Zephyr RTOS shall provide a mechanism to synchronize a thread to a timer and then block the thread execution until any of the following conditions is satisfied:
125+
- The timer is stopped
126+
- The timer number of times it has expired is superior to 0
125127
<<<
126128
RELATIONS:
127129
- TYPE: Parent
@@ -132,9 +134,9 @@ UID: ZEP-SRS-4-10
132134
STATUS: Draft
133135
TYPE: Functional
134136
COMPONENT: Timers
135-
TITLE: Timer start
137+
TITLE: Timer next expiration time in system ticks
136138
STATEMENT: >>>
137-
The Zephyr RTOS shall provide a mechanism to start a defined and initialized timer.
139+
The Zephyr RTOS shall provide a mechanism to get a timer's next expiration time in system ticks.
138140
<<<
139141
RELATIONS:
140142
- TYPE: Parent
@@ -145,9 +147,9 @@ UID: ZEP-SRS-4-11
145147
STATUS: Draft
146148
TYPE: Functional
147149
COMPONENT: Timers
148-
TITLE: Start timer status reset
150+
TITLE: Timer remaining time until expiration in system ticks
149151
STATEMENT: >>>
150-
Whenever a not running timer is started the timer's status shall be reset to zero.
152+
The Zephyr RTOS shall provide a mechanism to get a timer's remaining time until its next expiry in system ticks.
151153
<<<
152154
RELATIONS:
153155
- TYPE: Parent
@@ -158,124 +160,7 @@ UID: ZEP-SRS-4-12
158160
STATUS: Draft
159161
TYPE: Functional
160162
COMPONENT: Timers
161-
TITLE: Start timer counting values
162-
STATEMENT: >>>
163-
Whenever a Zephyr RTOS timer is started, the timer shall start running with the duration and period values provided during timer initialization.
164-
<<<
165-
RELATIONS:
166-
- TYPE: Parent
167-
VALUE: ZEP-SYRS-18
168-
169-
[REQUIREMENT]
170-
UID: ZEP-SRS-4-13
171-
STATUS: Draft
172-
TYPE: Functional
173-
COMPONENT: Timers
174-
TITLE: Timer stop
175-
STATEMENT: >>>
176-
A Zephyr RTOS timer that is running shall be stoppable
177-
<<<
178-
RELATIONS:
179-
- TYPE: Parent
180-
VALUE: ZEP-SYRS-18
181-
182-
[REQUIREMENT]
183-
UID: ZEP-SRS-4-14
184-
STATUS: Draft
185-
TYPE: Functional
186-
COMPONENT: Timers
187-
TITLE: Timer status read
188-
STATEMENT: >>>
189-
The Zephyr RTOS shall provide a mechanism to read the number of times a timer that is running has already expired.
190-
<<<
191-
RELATIONS:
192-
- TYPE: Parent
193-
VALUE: ZEP-SYRS-18
194-
195-
[REQUIREMENT]
196-
UID: ZEP-SRS-4-15
197-
STATUS: Draft
198-
TYPE: Functional
199-
COMPONENT: Timers
200-
TITLE: Timer status read reset
201-
STATEMENT: >>>
202-
When the timer is read via the timer status read mechanism, the status shall be reset.
203-
<<<
204-
RELATIONS:
205-
- TYPE: Parent
206-
VALUE: ZEP-SYRS-18
207-
208-
[REQUIREMENT]
209-
UID: ZEP-SRS-4-16
210-
STATUS: Draft
211-
TYPE: Functional
212-
COMPONENT: Timers
213-
TITLE: Timer thread synchronization
214-
STATEMENT: >>>
215-
The Zephyr RTOS shall provide a mechanism to synchronize a thread with a defined and initialized timer.
216-
<<<
217-
RELATIONS:
218-
- TYPE: Parent
219-
VALUE: ZEP-SYRS-18
220-
221-
[REQUIREMENT]
222-
UID: ZEP-SRS-4-17
223-
STATUS: Draft
224-
TYPE: Functional
225-
COMPONENT: Timers
226-
TITLE: Synchronized thread blocks until timer has expired
227-
STATEMENT: >>>
228-
When the thread synchronization mechanism is used, the thread shall be blocked until the timer expires.
229-
<<<
230-
RELATIONS:
231-
- TYPE: Parent
232-
VALUE: ZEP-SYRS-18
233-
234-
[REQUIREMENT]
235-
UID: ZEP-SRS-4-18
236-
STATUS: Draft
237-
TYPE: Functional
238-
COMPONENT: Timers
239-
TITLE: Synchronized thread is unblocked when timer is stopped.
240-
STATEMENT: >>>
241-
When the thread synchronization mechanism is used, the synchronized thread shall be unblocked when the timer is stopped.
242-
<<<
243-
RELATIONS:
244-
- TYPE: Parent
245-
VALUE: ZEP-SYRS-18
246-
247-
[REQUIREMENT]
248-
UID: ZEP-SRS-4-19
249-
STATUS: Draft
250-
TYPE: Functional
251-
COMPONENT: Timers
252-
TITLE: Timer thread synchronization status reset
253-
STATEMENT: >>>
254-
When the thread synchronization mechanism is used, the status of the timer shall be reset.
255-
<<<
256-
RELATIONS:
257-
- TYPE: Parent
258-
VALUE: ZEP-SYRS-18
259-
260-
[REQUIREMENT]
261-
UID: ZEP-SRS-4-20
262-
STATUS: Draft
263-
TYPE: Functional
264-
COMPONENT: Timers
265-
TITLE: Provide timer remaining expiration time in units of system ticks
266-
STATEMENT: >>>
267-
The Zephyr RTOS shall provide a mechanism to get the timer's remaining time until its next expiry in system ticks.
268-
<<<
269-
RELATIONS:
270-
- TYPE: Parent
271-
VALUE: ZEP-SYRS-18
272-
273-
[REQUIREMENT]
274-
UID: ZEP-SRS-4-21
275-
STATUS: Draft
276-
TYPE: Functional
277-
COMPONENT: Timers
278-
TITLE: Provide timer remaining expiration time in milliseconds
163+
TITLE: Timer remaining time until expiration in milliseconds
279164
STATEMENT: >>>
280165
The Zephyr RTOS shall provide a mechanism to get the timer's remaining time until its next expiry in milliseconds.
281166
<<<
@@ -284,33 +169,33 @@ RELATIONS:
284169
VALUE: ZEP-SYRS-18
285170

286171
[REQUIREMENT]
287-
UID: ZEP-SRS-4-22
172+
UID: ZEP-SRS-4-13
288173
STATUS: Draft
289174
TYPE: Functional
290175
COMPONENT: Timers
291176
TITLE: Timer set user data
292177
STATEMENT: >>>
293-
The Zephyr RTOS shall provide a mechanism to set user data to a timer.
178+
The Zephyr RTOS shall support adding user defined data to a timer.
294179
<<<
295180
RELATIONS:
296181
- TYPE: Parent
297182
VALUE: ZEP-SYRS-18
298183

299184
[REQUIREMENT]
300-
UID: ZEP-SRS-4-23
185+
UID: ZEP-SRS-4-14
301186
STATUS: Draft
302187
TYPE: Functional
303188
COMPONENT: Timers
304189
TITLE: Timer get user data
305190
STATEMENT: >>>
306-
The Zephyr RTOS shall provide a mechanism to get user data from a timer.
191+
The Zephyr RTOS shall support retrieving user defined data from a timer.
307192
<<<
308193
RELATIONS:
309194
- TYPE: Parent
310195
VALUE: ZEP-SYRS-18
311196

312197
[REQUIREMENT]
313-
UID: ZEP-SRS-4-24
198+
UID: ZEP-SRS-4-15
314199
STATUS: Draft
315200
TYPE: Functional
316201
COMPONENT: Timers
@@ -321,16 +206,3 @@ When the timer expiry function is defined, it shall be called in the interrupt c
321206
RELATIONS:
322207
- TYPE: Parent
323208
VALUE: ZEP-SYRS-18
324-
325-
[REQUIREMENT]
326-
UID: ZEP-SRS-4-25
327-
STATUS: Draft
328-
TYPE: Functional
329-
COMPONENT: Timers
330-
TITLE: Provide timer next expiration time in units of system ticks
331-
STATEMENT: >>>
332-
The Zephyr RTOS shall provide a mechanism to get the timer's next time of expiration in system ticks.
333-
<<<
334-
RELATIONS:
335-
- TYPE: Parent
336-
VALUE: ZEP-SYRS-18

0 commit comments

Comments
 (0)