DEENESPTFRRUARHIKOZHNL

struct ara::diag::TimeBased

[SWS_DM_00539] Upstream: RS_Diag_04225

struct TimeBased {...};

Represents the parameters for time-based debouncing.

Header-Datei#include "ara/diag/monitor_types.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

User GuideAI-GENERATED

Defines the time limits for time-based debouncing of diagnostic events during monitor initialization.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: beb974918ec8 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Defines the time limits for time-based debouncing of diagnostic events during monitor initialization.

The data structure ara::diag::TimeBased is used to configure time-based debouncing for diagnostic events [SWS_DM_00539]. It passes the threshold values in milliseconds to the constructor of ara::diag::Monitor, after the expiration of which an event is classified as passed or failed. Diagnostic Management starts and controls the internal debouncing timer based on these thresholds upon incoming status reports. Persistent storage of the internal counter value across resets is not supported for time-based debouncing algorithms AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.5.2 “Time-based debouncing”.

Context

The C++ structure ara::diag::TimeBased defines the configuration parameters for the time-based debouncing of diagnostic events in the Diagnostic Management of the AUTOSAR Adaptive Platform [SWS_DM_00539]. It encapsulates the two durations in milliseconds that are decisive for the status transitions of a diagnostic event: failedMs as the failed threshold [SWS_DM_00629] and passedMs as the passed threshold [SWS_DM_00630].

In the overall system, the structure connects three essential components: the diagnosing application function, the class ara::diag::Monitor, and the Diagnostic Management (DM) [SWS_DM_00550]. The application instantiates the structure to specify event-specific debouncing times and passes it to the constructor of the diagnostic monitor [SWS_DM_00550]. The DM then activates the time-based debouncing algorithm for this event [SWS_DM_00015] and calculates the event status bit kTestFailed based on the internal timer and the configured thresholds AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.5.2 “Time-based debouncing”.

TimeBasedContext Anwendung Anwendung TimeBased TimeBased Anwendung->TimeBased erzeugt Monitor Monitor Anwendung->Monitor instanziiert TimeBased->Monitor konfiguriert DM DM Monitor->DM meldet Aktionen

Context diagram: Interplay between application, ara::diag::TimeBased, ara::diag::Monitor, and Diagnostic Management. Sources: [SWS_DM_00539], [SWS_DM_00550], [SWS_DM_00015]

Lifecycle

As a simple data container without dynamic resources, ara::diag::TimeBased has a straightforward lifecycle [SWS_DM_00539]. The structure is typically created locally on the stack or in static memory by the application, initialized with the target times, and passed by value to the constructor of ara::diag::Monitor [SWS_DM_00550] (AUTOSAR_AP_SWS_Diagnostics §8.40.1.1.2.3 “Monitor”).

Interpretation: By passing by value, the parameters are copied during monitor creation so that the original TimeBased object can be safely discarded after the constructor call finishes. Question (open) From this point on, the DM manages the dynamic state of the debouncing timer independently and initially sets its value to 0 at system start-up [SWS_DM_00085]. Since TimeBased features no internal synchronization mechanisms, concurrent write accesses to a shared instance must be prevented on the application side.

Usage Path

Typical usage is structured into the following steps:

  1. Parameterization and initialization: The application instantiates ara::diag::TimeBased, sets failedMs [SWS_DM_00629] as well as passedMs [SWS_DM_00630], and passes the structure to the constructor of ara::diag::Monitor [SWS_DM_00550].
  2. Timer initialization: The DM starts the debouncing service and initializes the event-internal timer with the value zero [SWS_DM_00085].
  3. Reporting pre-test results: If the monitor detects a fault-free condition, it calls ReportMonitorAction with kPrepassed. The DM starts the timer towards the passed state [SWS_DM_00878] and continuously updates the Fault Detection Counter (FDC) [SWS_DM_00030].
  4. Qualification: If the timer reaches the threshold passedMs, the DM qualifies the event as kFinallyHealed [SWS_DM_00878]. If the monitor reports kFailed instead, the timer is set directly to failedMs and the event is processed as kFinallyDefective [SWS_DM_00033].
  5. Freezing and resuming: Via ReportMonitorAction(kFreezeDebouncing), debouncing can be paused if required [SWS_DM_00880] and resumed from the frozen counter value upon new actions (kPrepassed or kPrefailed) [SWS_DM_00038].
Sequence of time-based debouncingApplicationMonitorDMMonitor(specifier, notifier, timeBased)Aktivierung Entprellung & Timer-Init (0)ReportMonitorAction(kPrepassed)Start Timer Richtung kFinallyHealedTimer erreicht passedMsEvent als kFinallyHealed qualifiziertoptDebounce einfrierenReportMonitorAction(kFreezeDebouncing)Timer einfrierenReportMonitorAction(kPrepassed)Resume timer with frozen valueoptDirekter FehlerReportMonitorAction(kFailed)Set timer to failedMs & kFinallyDefective

Sequence diagram: Interplay between application, monitor, and DM during time-based debouncing. Sources: [SWS_DM_00550], [SWS_DM_00085], [SWS_DM_00878], [SWS_DM_00033], [SWS_DM_00880], [SWS_DM_00038]

Error Scenarios

When using time-based debouncing, functional preconditions and postconditions apply:

  • Conditional timer start: Upon reporting of kPrepassed, the DM starts the timer towards kFinallyHealed only if it is not already running in this direction and the event is not already considered passed [SWS_DM_00878].
  • Shortened fault qualification: If kFailed or kPassed is reported directly, the DM immediately sets the debouncing timer to the respective threshold and completes qualification without delay [SWS_DM_00033], [SWS_DM_00036].
  • Exclusivity of freezing: The action kFreezeDebouncing is supported by the DM exclusively for events with time-based debouncing [SWS_DM_00880].
  • No persistence of the counter: Storing the debouncing counter value across reset and start-up cycles (debounceCounterStorage) is not intended for time-based debouncings AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.5.2 “Time-based debouncing”; the timer is reset to zero on every start-up [SWS_DM_00085].

This guide is based on the AUTOSAR Adaptive Platform R25-11 specification and summarizes the requirements for the ara::diag::TimeBased structure.

UML class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__TimeBased382 «struct» TimeBased + failedMs + passedMs

Constants

failedMs variable

time until failed in (ms)

std::uint32_t failedMs;
passedMs variable

time until passed in (ms)

std::uint32_t passedMs;

Documentation of constants / variables

variable failedMs [SWS_DM_00629] Upstream: RS_Diag_04225

std::uint32_t failedMs;

time until failed in (ms)

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::TimeBased
SymbolfailedMs
Typstd::uint32_t

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00629
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00629@rel:R25-11#8525d65b
Content hash
8525d65b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00629
Status: valid/unmigrated Version: rel:R25-11#b234c6d7 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00629@rel:R25-11#b234c6d7
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#8525d65b2026-09-30
  • R20-11rel:R20-11#447b3a6c2026-10-14
  • R21-11rel:R21-11#deb8168b2026-10-14
  • R22-11rel:R22-11#c639f78a2026-10-14
  • R23-11rel:R23-11#bbcf28342026-10-14
  • R24-11rel:R24-11#b234c6d72026-10-14
  • R25-11rel:R25-11#b234c6d72026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

variable passedMs [SWS_DM_00630] Upstream: RS_Diag_04225

std::uint32_t passedMs;

time until passed in (ms)

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::TimeBased
SymbolpassedMs
Typstd::uint32_t

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00630
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00630@rel:R25-11#7291fe1e
Content hash
7291fe1e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00630
Status: valid/unmigrated Version: rel:R25-11#6fd0c00c Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00630@rel:R25-11#6fd0c00c
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#7291fe1e2026-09-30
  • R20-11rel:R20-11#3097b5012026-10-14
  • R21-11rel:R21-11#5ff8b1572026-10-14
  • R22-11rel:R22-11#5132f5a52026-10-14
  • R23-11rel:R23-11#6fd0c00c2026-10-14
  • R24-11rel:R24-11#6fd0c00c2026-10-14
  • R25-11rel:R25-11#6fd0c00c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill