DEENESPTFRRUARHIKOZHNL

class ara::diag::Condition

[SWS_DM_00711] Upstream: RS_Diag_04192

class Condition final {...};

DiagnosticConditionInterface.

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

User GuideAI-GENERATED

Reports vehicle- and system-related enabling states to Diagnostic Management for evaluating diagnostic conditions.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 40db6d76454c Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Reports vehicle- and system-related enabling states to Diagnostic Management for evaluating diagnostic conditions.

The class ara::diag::Condition provides the interface DiagnosticConditionInterface with which adaptive applications report environmental and enabling conditions to Diagnostic Management ([SWS_DM_00712]). The Diagnostic Server evaluates these states to selectively control the execution of standardized diagnostic functions or clearing procedures in the vehicle (AUTOSAR_AP_SWS_Diagnostics §7.3.2.5.5 “Condition checks”). Instances are tied to a port prototype and are neither copyable nor movable. In concurrent use, the query and set operations require external synchronization because they are not thread-safe.

Context

The class ara::diag::Condition represents the programming interface for diagnostic conditions (DiagnosticConditionInterface) in the AUTOSAR Adaptive Platform ([SWS_DM_00712]). In vehicle diagnostic systems, certain diagnostic functions or UDS services may only be executed if the vehicle is in a defined environmental state—such as when the vehicle is stationary with a speed of zero (AUTOSAR_AP_SWS_Diagnostics §7.3.2.5.5 “Condition checks”). In accordance with [SWS_DM_00111], the Diagnostic Server performs corresponding environmental checks when ISO 14229-1 prescribes service-specific condition checks, and responds with a configured Negative Response Code (NRC) if they are not satisfied.

Within the application architecture, ara::diag::Condition acts as a link between the adaptive application and Diagnostic Management (DM). An application instantiates the condition object via a port linked in the model either via an DiagnosticEnableConditionPortMapping or an DiagnosticClearConditionPortMapping ([SWS_DM_00712]). Interpretation: This port mapping defines whether the reported state serves as an enabling condition for regular diagnostic routines or as a criterion for clearing diagnostic data. Question (open) The object thus encapsulates state transmission to the Diagnostic Server, which evaluates the conditions for incoming diagnostic requests ([SWS_DM_00111]).

diag_condition_kontext app Anwendungssoftware cond ara::diag::Condition app->cond SetCondition / GetCondition dm Diagnostic Management cond->dm Zustandsabgleich

Context diagram: Integration of ara::diag::Condition between application software and Diagnostic Management. Sources: [SWS_DM_00712], [SWS_DM_00111], AUTOSAR_AP_SWS_Diagnostics §7.3.2.5.5 “Condition checks”

Lifecycle

Creation of an ara::diag::Condition object is performed explicitly by passing an ara::core::InstanceSpecifier to the constructor ([SWS_DM_00712]). This identifier references the modeled port prototype of the application. The constructor is declared as noexcept and guarantees exception safety as well as thread safety ([SWS_DM_00712]).

Regarding ownership semantics, the class is designed as a strict single instance: both the copy constructor ([SWS_DM_01625]) and the copy assignment operator ([SWS_DM_01623]) are deleted (=delete). Likewise, the move constructor ([SWS_DM_01626]) and the move assignment operator ([SWS_DM_01624]) are deleted. A condition object can neither be copied nor moved, ensuring a fixed 1:1 association with the respective port.

During normal operation, the methods SetCondition ([SWS_DM_00715]) and GetCondition ([SWS_DM_00714]) are specified as not thread-safe. In case of parallel access from multiple threads, the calling application must ensure external synchronization. The lifecycle concludes with the destructor ~Condition() ([SWS_DM_00713]), which is noexcept and exception-safe, but likewise not thread-safe.

Usage Path

The typical usage path comprises initialization, recurrent updating of the state, and querying the condition:

  1. Initialization: The application instantiates ara::diag::Condition by specifying the matching ara::core::InstanceSpecifier ([SWS_DM_00712]) for connection to the model configuration.
  2. Set state: When the decisive vehicle or system state changes, the application updates the condition via SetCondition(condition) ([SWS_DM_00715]). The call confirms acceptance with an ara::core::Result<void>.
  3. Query state: To verify the current state, the application calls GetCondition() ([SWS_DM_00714]). The result is provided asynchronously via an ara::core::Future<ConditionType>.
  4. Server processing: Interpretation: The Diagnostic Server internally accesses the stored state to verify pending diagnostic requests ([SWS_DM_00111]). Question Q-bbf48f735ef80e33 (open)
  5. Termination: Upon termination of the component, the object is released via the destructor ([SWS_DM_00713]).
Typischer Nutzungspfad von ara::diag::ConditionApplicationConditionDiagnostic ManagementCondition(specifier)Port-Bindung registrierenSetCondition(condition)Bedingungszustand aktualisierenResult<void>GetCondition()Future<ConditionType>~Condition()

Sequence diagram: Typical call sequence for initializing, updating, and querying a diagnostic condition. Sources: [SWS_DM_00712], [SWS_DM_00715], [SWS_DM_00714], [SWS_DM_00713]

Error Scenarios

Error states can occur during object instantiation as well as during runtime:

  • Constructor violations: During creation ([SWS_DM_00712]), the framework validates the configuration against the software model. Possible violations include:
    • InstanceSpecifierMappingIntegrityViolation: The identifier cannot be resolved in the model or does not reference a PortPrototype ([SWS_DM_00712]).
    • PortInterfaceMappingViolation: Although the PortPrototype is typed by DiagnosticConditionInterface, it is referenced neither by an DiagnosticEnableConditionPortMapping nor by an DiagnosticClearConditionPortMapping ([SWS_DM_00712]).
    • ProcessMappingViolation: No matching modeled process exists at runtime for the instance reference ([SWS_DM_00712]).
    • InstanceSpecifierAlreadyInUseViolation: The identifier is already used by another instance within the same process ([SWS_DM_00712]).
  • Failure of diagnostic core services: GetCondition() ([SWS_DM_00714]) can fail with the error DiagErrc::kServiceNotAvailable via the returned ara::core::Future if basic functionalities of Diagnostic Management are temporarily unreachable.
  • Error-free state storage: No standardized error codes are defined for SetCondition() ([SWS_DM_00715]); the function reports success directly via an empty ara::core::Result<void>.

This text was generated by an AI. All technical statements are based exclusively on the AUTOSAR R25-11 specifications.

Member map

Constructors and destructor

2

Operators

1

Class diagram

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

G nara__diag__Condition778 Condition + Condition() + operator=() + ~Condition() + GetCondition() + SetCondition()

Detail view

Select an entry in the outline.

Constructors and destructor

Condition function 3

Constructor of Condition Class.

Overloads Condition 3
explicit Condition (const ara::core::InstanceSpecifier &specifier) noexcept; SWS_DM_00712
Condition (Condition &)=delete; SWS_DM_01625
Condition (Condition &&) noexcept=delete; SWS_DM_01626
~Condition function

Destructor of class Condition .

~Condition () noexcept;

Methods

GetCondition function

Get current condition.

ara::core::Future< ConditionType > GetCondition () noexcept;
SetCondition function

Set condition.

ara::core::Result< void > SetCondition (ConditionType condition) noexcept;

Operators

operator= function 2

Condition shall be a single not assignable instance.

Overloads = 2
Condition & operator= (Condition &)=delete; SWS_DM_01623
Condition & operator= (Condition &&)=delete; SWS_DM_01624

Method documentation

function Condition [SWS_DM_00712] Upstream: RS_AP_00137, RS_Diag_04192, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

explicit Condition (const ara::core::InstanceSpecifier &specifier) noexcept;

Constructor of Condition Class.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)InstanceSpeci- InstanceSpecifier either cannot be resolved in the model in the fierMappingIn- context of your executable, or it refers to a model element other tegrityViolation than a PortPrototype. PortInterfaceMap- A PortPrototype that is typed by a pingViolation DiagnosticConditionInterface needs either to be referenced by a DiagnosticEnableConditionPortMapping or a DiagnosticClearConditionPortMapping. ProcessMappingVio- Matching InstanceRef exists, but no matching (modelled) Process lation found that matches the (runtime) process. InstanceSpecifier- Violation message that is sent in case a constructor in the ara AlreadyInUseViola- framework was called with an InstanceSpecifier already in use in tion this process.

Parameter (in)

ParameterBeschreibung
specifierInstanceSpecifier to a PortPrototype of a DiagnosticConditionInterface.

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

Record
AUTOSAR/AP/record/SWS_DM_00712
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00712@rel:R25-11#b888c242
Content hash
b888c242
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00712
Status: valid/unmigrated Version: rel:R25-11#7b668fd5 Versionshistorie & Revisions (1 transition, 8 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_00712@rel:R25-11#7b668fd5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b888c2422026-09-30
  • R19-11rel:R19-11#174e087a2026-10-14
  • R20-11rel:R20-11#a3c343192026-10-14
  • R21-11rel:R21-11#a3c343192026-10-14
  • R22-11rel:R22-11#39f9faa92026-10-14
  • R23-11rel:R23-11#90311ab32026-10-14
  • R24-11rel:R24-11#abbd838c2026-10-14
  • R25-11rel:R25-11#7b668fd52026-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

function Condition [SWS_DM_01625] Upstream: RS_AP_00147

Condition (Condition &)=delete;

Condition shall be a single not copy-able instance.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01625
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01625@rel:R25-11#ca5f204e
Content hash
ca5f204e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01625
Status: valid/unmigrated Version: rel:R25-11#beec4163 Versionshistorie & Revisions (1 transition, 4 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_01625@rel:R25-11#beec4163
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#ca5f204e2026-09-30
  • R23-11rel:R23-11#01e7045c2026-10-14
  • R24-11rel:R24-11#c44ce0db2026-10-14
  • R25-11rel:R25-11#beec41632026-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

function Condition [SWS_DM_01626] Upstream: RS_AP_00147

Condition (Condition &&) noexcept=delete;

Move constructor of Condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01626
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01626@rel:R25-11#ac9f36c8
Content hash
ac9f36c8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01626
Status: valid/unmigrated Version: rel:R25-11#ca51f3d8 Versionshistorie & Revisions (1 transition, 4 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_01626@rel:R25-11#ca51f3d8
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#ac9f36c82026-09-30
  • R23-11rel:R23-11#a312623b2026-10-14
  • R24-11rel:R24-11#ca51f3d82026-10-14
  • R25-11rel:R25-11#ca51f3d82026-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

function GetCondition [SWS_DM_00714] Upstream: RS_AP_00139, RS_Diag_04192

ara::core::Future< ConditionType > GetCondition () noexcept;

Get current condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Future<ConditionType >the current condition

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_00714
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00714@rel:R25-11#9ee1c93d
Content hash
9ee1c93d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00714
Status: valid/unmigrated Version: rel:R25-11#cff60f5e Versionshistorie & Revisions (1 transition, 8 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_00714@rel:R25-11#cff60f5e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9ee1c93d2026-09-30
  • R19-11rel:R19-11#dfa0a5692026-10-14
  • R20-11rel:R20-11#c75637cb2026-10-14
  • R21-11rel:R21-11#68ca7fb32026-10-14
  • R22-11rel:R22-11#95e6fb892026-10-14
  • R23-11rel:R23-11#941e11c02026-10-14
  • R24-11rel:R24-11#6ceaf9c22026-10-14
  • R25-11rel:R25-11#cff60f5e2026-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

function SetCondition [SWS_DM_00715] Upstream: RS_AP_00139, RS_Diag_04192

ara::core::Result< void > SetCondition (ConditionType condition) noexcept;

Set condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
conditioncurrent condition

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns void.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_DM_00715
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00715@rel:R25-11#8b477408
Content hash
8b477408
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00715
Status: valid/unmigrated Version: rel:R25-11#334a5f3b Versionshistorie & Revisions (1 transition, 8 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_00715@rel:R25-11#334a5f3b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8b4774082026-09-30
  • R19-11rel:R19-11#a92f5c212026-10-14
  • R20-11rel:R20-11#05dc5cfa2026-10-14
  • R21-11rel:R21-11#05dc5cfa2026-10-14
  • R22-11rel:R22-11#4eee24142026-10-14
  • R23-11rel:R23-11#63e48b532026-10-14
  • R24-11rel:R24-11#69cd75ef2026-10-14
  • R25-11rel:R25-11#334a5f3b2026-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

function operator= [SWS_DM_01623] Upstream: RS_AP_00147

Condition & operator= (Condition &)=delete;

Condition shall be a single not assignable instance.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01623
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01623@rel:R25-11#ceedce91
Content hash
ceedce91
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01623
Status: valid/unmigrated Version: rel:R25-11#fc39b2c9 Versionshistorie & Revisions (1 transition, 4 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_01623@rel:R25-11#fc39b2c9
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#ceedce912026-09-30
  • R23-11rel:R23-11#da53ca842026-10-14
  • R24-11rel:R24-11#fc39b2c92026-10-14
  • R25-11rel:R25-11#fc39b2c92026-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

function operator= [SWS_DM_01624] Upstream: RS_AP_00147

Condition & operator= (Condition &&)=delete;

Move assignment operator of Condition.

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition

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

Record
AUTOSAR/AP/record/SWS_DM_01624
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01624@rel:R25-11#08f5a51a
Content hash
08f5a51a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01624
Status: valid/unmigrated Version: rel:R25-11#cd68da4f Versionshistorie & Revisions (1 transition, 4 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_01624@rel:R25-11#cd68da4f
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#08f5a51a2026-09-30
  • R23-11rel:R23-11#c22af3482026-10-14
  • R24-11rel:R24-11#cd68da4f2026-10-14
  • R25-11rel:R25-11#cd68da4f2026-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

function ~Condition [SWS_DM_00713] Upstream: RS_AP_00134, RS_Diag_04192

~Condition () noexcept;

Destructor of class Condition .

Header-Datei#include "ara/diag/condition.h"
Scopeclass ara::diag::Condition
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_00713
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00713@rel:R25-11#70f2dd25
Content hash
70f2dd25
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00713
Status: valid/unmigrated Version: rel:R25-11#a0b1a1c6 Versionshistorie & Revisions (1 transition, 8 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_00713@rel:R25-11#a0b1a1c6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#70f2dd252026-09-30
  • R19-11rel:R19-11#0982897b2026-10-14
  • R20-11rel:R20-11#842e2f302026-10-14
  • R21-11rel:R21-11#842e2f302026-10-14
  • R22-11rel:R22-11#45e9fe152026-10-14
  • R23-11rel:R23-11#c0cf50322026-10-14
  • R24-11rel:R24-11#a0b1a1c62026-10-14
  • R25-11rel:R25-11#a0b1a1c62026-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