SNIP_CLASSIC_OS_SECTION_8_4_19_GetElapsedValue
Wortlaut
8.4.19 GetElapsedValue
[SWS_Os_00392] Definition of API function GetElapsedValue ⌈
Service Name
GetElapsedValue
Syntax
StatusType GetElapsedValue (
CounterType CounterID,
TickRefType Value,
TickRefType ElapsedValue
)
Service ID [hex]
0x11
Sync/Async
Synchronous
Reentrancy
Reentrant
Parameters (in)
CounterID
The Counter to be read
Parameters (inout)
Value
in: the previously read tick value of the counter out: the current
tick value of the counter
▽
△
Parameters (out)
ElapsedValue
The difference to the previous read value
Return value
StatusType
E_OK: No errors
E_OS_ID (only in EXTENDED status): The CounterID was not
valid
E_OS_VALUE (only in EXTENDED status): The given Value was
not valid
Description
This service gets the number of ticks between the current tick value and a previously read tick
value.
Available via
Os.h
⌋
[SWS_Os_00381]
Upstream requirements: SRS_BSW_00323
⌈If the input parameter <CounterID> in a call of GetElapsedValue is not valid
GetElapsedValue shall return E_OS_ID.⌋
[SWS_Os_00391]
Upstream requirements: SRS_BSW_00323
⌈If the <Value> in a call of GetElapsedValue is larger than the max allowed value of
the <CounterID>, GetElapsedValue shall return E_OS_VALUE.⌋
[SWS_Os_00382] ⌈If the input parameters in a call of GetElapsedValue are valid,
GetElapsedValue shall return the number of elapsed ticks since the given <Value>
value via <ElapsedValue> and shall return E_OK.⌋
[SWS_Os_00460] ⌈GetElapsedValue shall return the current tick value of the
Counter in the <Value> parameter.⌋
[SWS_Os_00533] ⌈Caveats of GetElapsedValue:If the timer already passed the
<Value> value a second (or multiple) time, the result returned is wrong. The reason is
that the service can not detect such a relative overflow.⌋
[SWS_Os_00534]
Upstream requirements: SRS_Os_11016
⌈Availability of GetElapsedValue: Available in all Scalability Classes.⌋
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Cited verbatim in the snippet (deterministic citation).
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_OS.pdf |
|---|---|
| Dokumentseite | Seite 192 |
| Ziel-Modul | os (classic) |
| Ziel-Anforderung | SWS_Os_00786 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |