Defines the time limits for time-based debouncing of diagnostic events during monitor initialization.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: beb974918ec8ProvenanceOpen 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”.
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:
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].
Timer initialization: The DM starts the debouncing service and initializes the event-internal timer with the value zero [SWS_DM_00085].
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].
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].
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].
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].
gemini-3.8-flash-low· 2026-10-13 · German original