DEENESPTFRRUARHIKOZHNL

struct ara::diag::CounterBased

[SWS_DM_00538] Upstream: RS_Diag_04068

struct CounterBased {...};

Represents the parameters for counter-based debouncing.

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

User GuideAI-GENERATED

Configures thresholds, step sizes, and jump values for counter-based debouncing of monitors.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 60957358c6ec Provenance Open 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:

CounterBasedContext Application Diagnostic Application CounterBased ara::diag::CounterBased Application->CounterBased konfiguriert Monitor ara::diag::Monitor Application->Monitor erzeugt CounterBased->Monitor uebergibt Parameter DM Diagnostic Management Monitor->DM meldet Aktionen DEXT DEXT Konfiguration DEXT->DM konfiguriert vorrangig

Context diagram: Interaction of application, monitor, CounterBased, Diagnostic Management, and DEXT. Sources: [SWS_DM_00538], [SWS_DM_00549], [SWS_DM_01099], [SWS_DM_01101].

Lifecycle

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:

  1. 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].
  2. The step sizes are defined via failedStepsize for reported failed states [SWS_DM_00623] and passedStepsize for passed reports [SWS_DM_00624].
  3. 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.
  4. 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].
  5. At runtime, monitoring reports monitor actions via ReportMonitorAction SWS Diagnostics §7.3.4.1.5.1 “Internal debounce counter incrementation”. In the case of kPrefailed, the DM checks any jump conditions [SWS_DM_00022] and increments the counter by failedStepsize [SWS_DM_00875].
  6. 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].
Initialization and counter-based debouncingApplicationCounterBasedMonitorDiagnostic ManagementUse Case: Parameter configuration and monitor creationSet thresholds, steps, and jump valuesMonitor(specifier, notifier, counterBased)altDEXT-Parameter vorhandenDEXT-Werte nutzen (CounterBased ignoriert)No DEXT parameters availableCounterBased-Werte verwendenUse Case: Laufzeit-EntprellungReportMonitorAction(kPrefailed)Ereignisstatus aktualisierenoptuseJumpToFailed == true && Zaehler < failedJumpValueSet counter to failedJumpValueZaehler um failedStepsize inkrementierenoptZaehler >= failedThresholdLimit counter to failedThresholdStatus kFinallyDefective setzen

Sequence diagram: Sequence from parameter configuration and monitor initialization to counter qualification. Sources: [SWS_DM_00549], [SWS_DM_00875], [SWS_DM_00022], [SWS_DM_00024].

Error Scenarios

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.

Member map

Class diagram

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

G nara__diag__CounterBased25 «struct» CounterBased + failedJumpValue + failedStepsize + failedThreshold + passedJumpValue + passedStepsize + passedThreshold + useJumpToFailed + useJumpToPassed

Detail view

Select an entry in the outline.

Constants

failed to jump value

std::int16_t failedJumpValue;

Stepsize per pre-failed report.

std::uint16_t failedStepsize;

Threshold until qualified failed.

std::int16_t failedThreshold;

passed to jump value

std::int16_t passedJumpValue;

Stepsize per pre-passed report.

std::uint16_t passedStepsize;

Threshold until qualified passed.

std::int16_t passedThreshold;

is jump supported

bool useJumpToFailed;

is jump supported

bool useJumpToPassed;

Documentation of constants / variables

variable failedJumpValue [SWS_DM_00625] Upstream: RS_Diag_04068

std::int16_t failedJumpValue;

failed to jump value

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymbolfailedJumpValue
Typstd::int16_t

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

Record
AUTOSAR/AP/record/SWS_DM_00625
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00625@rel:R25-11#3d8ec970
Content hash
3d8ec970
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00625
Status: valid/unmigrated Version: rel:R25-11#dce9c004 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_00625@rel:R25-11#dce9c004
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#3d8ec9702026-09-30
  • R20-11rel:R20-11#f08528012026-10-14
  • R21-11rel:R21-11#3d8d66772026-10-14
  • R22-11rel:R22-11#4e10bb362026-10-14
  • R23-11rel:R23-11#dce9c0042026-10-14
  • R24-11rel:R24-11#dce9c0042026-10-14
  • R25-11rel:R25-11#dce9c0042026-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 failedStepsize [SWS_DM_00623] Upstream: RS_Diag_04068

std::uint16_t failedStepsize;

Stepsize per pre-failed report.

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymbolfailedStepsize
Typstd::uint16_t

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

Record
AUTOSAR/AP/record/SWS_DM_00623
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00623@rel:R25-11#d4a093e4
Content hash
d4a093e4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00623
Status: valid/unmigrated Version: rel:R25-11#dafec4f4 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_00623@rel:R25-11#dafec4f4
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d4a093e42026-09-30
  • R20-11rel:R20-11#d8c07df52026-10-14
  • R21-11rel:R21-11#00dbada62026-10-14
  • R22-11rel:R22-11#ad00343e2026-10-14
  • R23-11rel:R23-11#dafec4f42026-10-14
  • R24-11rel:R24-11#dafec4f42026-10-14
  • R25-11rel:R25-11#dafec4f42026-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 failedThreshold [SWS_DM_00621] Upstream: RS_Diag_04068

std::int16_t failedThreshold;

Threshold until qualified failed.

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymbolfailedThreshold
Typstd::int16_t

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

Record
AUTOSAR/AP/record/SWS_DM_00621
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00621@rel:R25-11#c3037cc0
Content hash
c3037cc0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00621
Status: valid/unmigrated Version: rel:R25-11#08353fef 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_00621@rel:R25-11#08353fef
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#c3037cc02026-09-30
  • R20-11rel:R20-11#25e7cfaa2026-10-14
  • R21-11rel:R21-11#196f4ac32026-10-14
  • R22-11rel:R22-11#6af287f12026-10-14
  • R23-11rel:R23-11#08353fef2026-10-14
  • R24-11rel:R24-11#08353fef2026-10-14
  • R25-11rel:R25-11#08353fef2026-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 passedJumpValue [SWS_DM_00626] Upstream: RS_Diag_04068

std::int16_t passedJumpValue;

passed to jump value

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymbolpassedJumpValue
Typstd::int16_t

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

Record
AUTOSAR/AP/record/SWS_DM_00626
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00626@rel:R25-11#48fa9fd7
Content hash
48fa9fd7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00626
Status: valid/unmigrated Version: rel:R25-11#ced89aeb 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_00626@rel:R25-11#ced89aeb
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#48fa9fd72026-09-30
  • R20-11rel:R20-11#bca12a352026-10-14
  • R21-11rel:R21-11#ffcfafd22026-10-14
  • R22-11rel:R22-11#06c86bc12026-10-14
  • R23-11rel:R23-11#ced89aeb2026-10-14
  • R24-11rel:R24-11#ced89aeb2026-10-14
  • R25-11rel:R25-11#ced89aeb2026-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 passedStepsize [SWS_DM_00624] Upstream: RS_Diag_04068

std::uint16_t passedStepsize;

Stepsize per pre-passed report.

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymbolpassedStepsize
Typstd::uint16_t

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

Record
AUTOSAR/AP/record/SWS_DM_00624
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00624@rel:R25-11#fe1d6992
Content hash
fe1d6992
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00624
Status: valid/unmigrated Version: rel:R25-11#9a3eeb83 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_00624@rel:R25-11#9a3eeb83
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#fe1d69922026-09-30
  • R20-11rel:R20-11#1453700f2026-10-14
  • R21-11rel:R21-11#c63f63342026-10-14
  • R22-11rel:R22-11#4d2e11a52026-10-14
  • R23-11rel:R23-11#9a3eeb832026-10-14
  • R24-11rel:R24-11#9a3eeb832026-10-14
  • R25-11rel:R25-11#9a3eeb832026-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 passedThreshold [SWS_DM_00622] Upstream: RS_Diag_04068

std::int16_t passedThreshold;

Threshold until qualified passed.

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymbolpassedThreshold
Typstd::int16_t

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

Record
AUTOSAR/AP/record/SWS_DM_00622
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00622@rel:R25-11#ce4c070e
Content hash
ce4c070e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00622
Status: valid/unmigrated Version: rel:R25-11#24f4cdaa 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_00622@rel:R25-11#24f4cdaa
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#ce4c070e2026-09-30
  • R20-11rel:R20-11#a6d5e9c72026-10-14
  • R21-11rel:R21-11#72e5c6f22026-10-14
  • R22-11rel:R22-11#8565f7cc2026-10-14
  • R23-11rel:R23-11#24f4cdaa2026-10-14
  • R24-11rel:R24-11#24f4cdaa2026-10-14
  • R25-11rel:R25-11#24f4cdaa2026-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 useJumpToFailed [SWS_DM_00627] Upstream: RS_Diag_04068

bool useJumpToFailed;

is jump supported

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymboluseJumpToFailed
Typbool

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

Record
AUTOSAR/AP/record/SWS_DM_00627
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00627@rel:R25-11#4e142f5c
Content hash
4e142f5c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00627
Status: valid/unmigrated Version: rel:R25-11#3b6a9b1e 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_00627@rel:R25-11#3b6a9b1e
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#4e142f5c2026-09-30
  • R20-11rel:R20-11#500659252026-10-14
  • R21-11rel:R21-11#b0c513c82026-10-14
  • R22-11rel:R22-11#fa011c9a2026-10-14
  • R23-11rel:R23-11#3b6a9b1e2026-10-14
  • R24-11rel:R24-11#3b6a9b1e2026-10-14
  • R25-11rel:R25-11#3b6a9b1e2026-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 useJumpToPassed [SWS_DM_00628] Upstream: RS_Diag_04068

bool useJumpToPassed;

is jump supported

Header-Datei#include "ara/diag/monitor_types.h"
Scopestruct ara::diag::CounterBased
SymboluseJumpToPassed
Typbool

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

Record
AUTOSAR/AP/record/SWS_DM_00628
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00628@rel:R25-11#2b744445
Content hash
2b744445
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00628
Status: valid/unmigrated Version: rel:R25-11#6b5a1179 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_00628@rel:R25-11#6b5a1179
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#2b7444452026-09-30
  • R20-11rel:R20-11#a21e0a812026-10-14
  • R21-11rel:R21-11#fac6d4792026-10-14
  • R22-11rel:R22-11#a2c3b6d22026-10-14
  • R23-11rel:R23-11#6b5a11792026-10-14
  • R24-11rel:R24-11#6b5a11792026-10-14
  • R25-11rel:R25-11#6b5a11792026-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