CLASSIC
Modul: wdgm
Rolle: constitutive
Konfidenz: 95%
SNIP_CLASSIC_WDGM_SECTION_7_2_2_2_Deadline_Supervision_Algorithm
Wortlaut
7.2.2.2 Deadline Supervision Algorithm
For each Deadline Start Checkpoints (i.e. Checkpoint referenced by WdgMDeadlineStartRef), Watchdog Manager has a timestamp variable storing the time when that Checkpoint has been reached. A timestamp variable for Deadline Supervision is obtained by reading OS tick. For each Supervised Entity, an OS counter is configured. An OS counter can be shared between Supervised Entities, or a separate OS counter can be used for each Supervised Entity (implementation-specific). In case OS-Applications/partitioning is used and a counter is shared across Supervised Entities belonging to different OS-applications, then the list of allowed OS-Applications to access the counter needs to be configured (OsCounterAccessingApplication).
[SWS_WdgM_CONSTR_06513] ⌈For each Supervised Entity, an OS counter shall be configured (see WdgMOSCounter, [ECUC_WdgM_00361]) if at least one Deadline Supervision is configured for the Supervised Entity in any of the Watchdog Manager Modes.⌋
[SWS_WdgM_CONSTR_06514] ⌈The OS counters for each Supervised Entity shall be configured to be accessible from the OsApplication which contains the Supervised Entity.⌋
[SWS_WdgM_CONSTR_06515] ⌈The OS counters for each Supervised Entity shall be configured to be also accessible from the OsApplication which calls WdgM_MainFunction, if WdgMEnableTimeoutDetection is set to true.⌋
[SWS_WdgM_00373] Upstream requirements: RS_HM_09235
⌈To determine the timestamp and to compute the timestamp differences, the function WdgM_CheckpointReached (for detection of both early arrivals and delays) and the function WdgM_MainFunction (for detection of timeouts) shall use OS function GetElapsedValue, using as 1st parameter the CounterID that is configured for the Supervised Entity (see WdgMOSCounter, [ECUC_WdgM_00361])⌋ The timestamps are in ticks. However, the Watchdog deadline configuration is in seconds. The scaling between ticks and seconds is configured in OS.
[SWS_WdgM_00374] Upstream requirements: RS_HM_09235
⌈For scaling of timestamp difference to the limit values (WdgMDeadlineMin and WdgMDeadlineMax) (see [SWS_WdgM_00294], the function WdgM_CheckpointReached (for detection of early arrivals and delays) and the function WdgM_ MainFunction (for detection of timeouts) shall use OsSecondsPerTick configuration parameter.⌋ During the initialization, all the timestamps of Deadline Start Checkpoints (i.e. Checkpoint referenced by WdgMDeadlineStartRef) are cleared – set to 0.
[SWS_WdgM_00298] Upstream requirements: SRS_BSW_00101
⌈The function WdgM_Init shall for all Deadline Start Checkpoints set their timestamps to 0.⌋ When a Deadline Start Checkpoint (i.e. Checkpoint referenced by WdgMDeadlineStartRef) is reached, a Supervised Entity invokes the function WdgM_ CheckpointReached, which results with the execution of Deadline Supervision.
[SWS_WdgM_00228] ⌈When the Deadline Start Checkpoint is reached and this Checkpoint is referenced in the active Mode, then the function WdgM_CheckpointReached shall record the current timestamp under the timestamp of the reached Deadline Start Checkpoint. The current timestamp shall be used as the reference for examining the time of the corresponding Deadline End Checkpoint.⌋ The function WdgM_CheckpointReached shall determine the current timestamp by invoking the OS functions ()
[SWS_WdgM_00228] means that the timestamp of the reached Deadline Start Checkpoint is overwritten by the current timestamp, regardless of the value (just before the overwriting) of the reached Deadline Start Checkpoint. Moreover,
[SWS_WdgM_00228] means that it is not considered as an error by Deadline Supervision if a given Deadline Start Checkpoint is reached several times without reaching the corresponding Deadline End Checkpoint (each time the timestamp is just updated).
[SWS_WdgM_00229] ⌈When the Deadline End Checkpoint is reached and this Checkpoint is referenced in the active Mode, and timestamp of the corresponding Deadline Start Checkpoint is <>0, then the function WdgM_CheckpointReached shall measure the time difference between current timestamp and the corresponding Deadline Start Checkpoint timestamp. Then, the function shall clear (i.e. set to 0) the timestamp of the corresponding Deadline Start Checkpoint.⌋
[SWS_WdgM_00354] ⌈When the Deadline End Checkpoint is reached and this Checkpoint is referenced in the active Mode, and timestamp of the corresponding Deadline Start Checkpoint is =0, then the function WdgM_CheckpointReached shall exit with success (without measuring the time difference).⌋
[SWS_WdgM_00354] means that it is not considered as an error by Deadline Supervision if a given Deadline End Checkpoint is reached several times in a sequence.
[SWS_WdgM_00294] ⌈If the measured time difference (see [SWS_WdgM_00229]) is not within the minimum and the maximum limits (that is, the time difference is either less than WdgMDeadlineMin or greater than WdgMDeadlineMax), then the function WdgM_CheckpointReached shall define the result of Deadline Supervision for this Supervised Entity as incorrect. Otherwise, it shall be defined as correct.⌋ Note: If the maximum limit (WdgMDeadlineMax) is configured with value ’INF’, it is not necessary to check whether time difference is greater than the limit.
[SWS_WdgM_00299] ⌈For any reported Checkpoint that is neither a Deadline Start Checkpoint nor a Deadline End Checkpoint, the function WdgM_CheckpointReached [SWS_WdgM_00263] shall ignore this Checkpoint and not update the result of the Deadline Supervision for the Supervised Entity.⌋
[SWS_WdgM_00403] Upstream requirements: RS_HM_09235
⌈If Deadline Timeout detection is enabled [i.e. WdgMEnableTimeoutDetection
[ECUC_WdgM_00363] is set to ’true’] then, for all Deadline Supervisions configured in the active mode, if timestamp of the corresponding Deadline Start Checkpoint is <>0 (i.e. if the Start Checkpoint is reported but corresponding End Checkpoint is not yet reported), then the function WdgM_MainFunction shall measure the time difference between current timestamp and the corresponding Deadline Start Checkpoint timestamp. If the measured time difference exceeds (is greater than) maximum limit (WdgMDeadlineMax), then the function WdgM_MainFunction shall define the result of Deadline Supervision for the Supervised Entity as incorrect.⌋ Note: With this, it is possible to detect error in case Deadline End Checkpoint is never reached (timeout detection part of Deadline Supervision).
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_WatchdogManager.pdf |
|---|---|
| Dokumentseite | Seite 46 |
| Ziel-Modul | wdgm (classic) |
| Ziel-Anforderung | SWS_WdgM_CONSTR_06515 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |