Configures thresholds, step sizes, and jump values for counter-based debouncing of monitors.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 60957358c6ecProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Configures thresholds, step sizes, and jump values for counter-based debouncing of monitors.
The struct ara::diag::CounterBased defines the thresholds, step sizes, and jump parameters for counter-based debouncing of diagnostic events [SWS_DM_00538]. It is instantiated by the application and passed to the constructor of ara::diag::Monitor to define the criteria for failed and passed qualification [SWS_DM_00549]. Diagnostic Management uses these parameters for counter updates, provided that no overriding debouncing data is stored in the Diagnostic Extract (DEXT).
Context
The struct ara::diag::CounterBased represents the configuration parameters for counter-based debouncing of diagnostic events [SWS_DM_00538] according to the specification of the AUTOSAR Adaptive Platform SWS Diagnostics §7.3.4.1.5.1 “Counter-based debouncing”. Within the diagnostic subsystem, it serves the exchange of debouncing parameters between the using monitor implementation and Diagnostic Management (DM).
Interaction occurs essentially via four interface partners:
The diagnostic application instantiates and populates CounterBased with event threshold values.
The Diagnostic Extract (DEXT) defines upstream debouncing parameters; if matching parameters exist in the DEXT, they have mandatory precedence and the values passed via the constructor are ignored by the DM [SWS_DM_01099].
As a C++ data structure (struct) SWS Diagnostics §8.41.2 “Struct: CounterBased”, CounterBased is created as a pure value container by the using software component on the stack or heap. Its lifecycle is typically restricted to the configuration and initialization phase prior to the creation of ara::diag::Monitor.
After the attributes have been defined, the struct is passed by value to the constructor of Monitor[SWS_DM_00549]. The struct itself holds no internal dynamic state and has no state machine; ongoing counter management is solely the responsibility of Diagnostic Management. Since CounterBased is designed as a passive data structure and has no internal synchronization mechanisms, configuration is, according to interpretation, to be performed thread-locally or synchronized prior to passing it to the monitor.
Usage Path
Typical usage is divided into the definition of the debouncing parameters, passing them to the monitor, and counter evaluation at runtime:
The application creates an instance of CounterBased and sets the limit values: failedThreshold for failed qualification [SWS_DM_00621] as well as passedThreshold for passed recognition [SWS_DM_00622].
The step sizes are defined via failedStepsize for reported failed states [SWS_DM_00623] and passedStepsize for passed reports [SWS_DM_00624].
Optionally, jump adjustments are configured: jumping to a minimum failed value is activated via useJumpToFailed[SWS_DM_00627] and failedJumpValue[SWS_DM_00625]. Analogously, useJumpToPassed[SWS_DM_00628] and passedJumpValue[SWS_DM_00626] control jumps toward the passed state.
The populated struct is passed to the constructor of Monitor[SWS_DM_00549]. If no DEXT definitions are present, the DM uses these values [SWS_DM_01101].
When the counter reaches failedThreshold, the DM classifies the event as kFinallyDefective[SWS_DM_00024]. The corresponding applies to passed reports by means of passedStepsize[SWS_DM_00876].
When using CounterBased, several boundary conditions and precedence rules must be observed:
DEXT precedence conflict: If debouncing parameters are present in the DEXT, the DM completely ignores the parameters defined in CounterBased[SWS_DM_01099]. A misconfiguration arises when application developers expect a dynamic parameter change via the constructor even though static DEXT values are active.
Missing DEXT values: If no information is available in the DEXT, the DM strictly depends on the constructor providing a valid CounterBased instance [SWS_DM_01101].
Threshold exceedance: If the internal debouncing counter rises above the threshold failedThreshold due to the addition of failedStepsize, the DM resets the counter exactly to this threshold and qualifies the defect [SWS_DM_00024], [SWS_DM_00875].
Conditional jump logic: If useJumpToFailed is set, the jump to failedJumpValue is performed only if the counter value before incrementation is strictly less than failedJumpValue[SWS_DM_00022]. For useJumpToPassed, it analogously holds that the counter must be greater than passedJumpValue[SWS_DM_00023].
This guide is based on the AUTOSAR Adaptive Platform R25-11 specification and summarizes the requirements for counter-based debouncing.
gemini-3.8-flash-low· 2026-10-13 · German original