Allows setting and querying multiple diagnostic conditions via a common interface using handles.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 2f3f3f7d9426ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Allows setting and querying multiple diagnostic conditions via a common interface using handles.
The class ara::diag::MultipleCondition serves for the bundled querying and updating of multiple diagnostic conditions via a common port interface using numerical handles ([SWS_DM_01730]). Applications instantiate the object via an InstanceSpecifier and control conditions specifically using SetCondition and GetCondition ([SWS_DM_01729]). As an essential constraint, the class is neither copyable nor movable, and its destructor is not thread-safe. In addition, all addressed conditions in the model must be configured consistently via port mappings to avoid initialization and runtime errors.
Context
The class ara::diag::MultipleCondition enables an adaptive application to perform bundled management and modification of multiple diagnostic conditions via a common interface ([SWS_DM_01730]). Functionally and semantically, it provides the same capabilities as individual conditions, but extends the operations with targeted addressing via an identification handle (AUTOSAR_AP_SWS_Diagnostics p. 237). Each managed diagnostic condition (DiagnosticCondition) requires a link via a DiagnosticMultipleConditionPortMapping to an appropriately typed port in the model ([SWS_DM_01727], AUTOSAR_AP_SWS_Diagnostics p. 237). Addressing is performed via the type ConditionHandleType; if no explicit overrideId value is present, Diagnostic Management (DM) assigns ascending numerical values starting from 0x010000 in alphabetical order of the short names ([SWS_DM_01735]).
An instance is created via the constructor MultipleCondition by passing an ara::core::InstanceSpecifier ([SWS_DM_01727]). Creation is thread-safe and declared as noexcept ([SWS_DM_01727]). The object has a strict binding to its local scope: both copy and move operations are deleted; copy constructor ([SWS_DM_02072]), move constructor ([SWS_DM_02071]), copy assignment operator ([SWS_DM_02073]), and move assignment operator ([SWS_DM_02074]) are not available (=delete).
The destructor ~MultipleCondition() is explicitly specified as not thread-safe ([SWS_DM_01737]). The application must therefore ensure that all concurrent accesses to the object have completed before destruction. Conditional thread safety applies to regular method calls ([SWS_DM_01728], [SWS_DM_01729]). Interpretation: Since the constructor signature according to [SWS_DM_01727] does not accept an explicit concurrency parameter, the required ConcurrencyType is presumably determined via the underlying port model in the manifest. Question Q-f29def512a68aae9 (open)
Usage Path
The typical sequence when interacting with diagnostic conditions comprises the following steps:
Initialization: The application instantiates the class by specifying the target port ([SWS_DM_01727]).
Set state: Using SetCondition(conditionHandle, condition), the application transmits a state change for the specified condition and checks the resulting ara::core::Result<void> ([SWS_DM_01729]).
Query state: Via GetCondition(conditionHandle), the current state of the addressed condition is requested asynchronously as ara::core::Future<ConditionType> ([SWS_DM_01728]).
Resource release: When leaving the scope, the destructor tears down the interface in an orderly manner ([SWS_DM_01737]).
When using the class, a distinction must be made between modeling-related construction errors and functional runtime errors:
Construction violations ([SWS_DM_01727]):
If resolving the InstanceSpecifier fails or it does not refer to a PortPrototype, a InstanceSpecifierMappingIntegrityViolation is reported. A PortInterfaceMappingViolation occurs if the port is not typed to a DiagnosticMultipleConditionInterface. If the process lacks the modeled counterpart, a ProcessMappingViolation occurs. If the same InstanceSpecifier is instantiated multiple times in the process, this results in a InstanceSpecifierAlreadyInUseViolation.
Runtime errors in method calls:
If an invalid parameter or an invalid handle is passed to SetCondition ([SWS_DM_01729]) or GetCondition ([SWS_DM_01728]), the methods return the error DiagErrc::kInvalidArgument. If the underlying functionality of Diagnostic Management is temporarily unreachable, GetCondition acknowledges the call with DiagErrc::kServiceNotAvailable ([SWS_DM_01728]).
This guide is based exclusively on the specifications of the AUTOSAR Adaptive Platform R25-11.
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 referenced by a pingViolation DiagnosticMultipleConditionPortMapping needs to be typed by a DiagnosticMultipleConditionInterface. 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)
Parameter
Beschreibung
specifier
InstanceSpecifier to a PortPrototype of a DiagnosticMultipleConditionInterface
Request a governed re-review of this record. The record is not changed immediately.
gemini-3.8-flash-low· 2026-10-13 · German original