Enables monitoring active diagnostic channels as well as controlling diagnostic session and security level.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 1824b6dbecd2ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables monitoring active diagnostic channels as well as controlling diagnostic session and security level.
The class ara::diag::Conversation represents a diagnostic communication channel for monitoring activity status, diagnostic session, and security level as well as for resetting to the default session [SWS_DM_00692][SWS_DM_00701]. Applications obtain instances exclusively as references via static search functions, since custom instantiations as well as copy and move operations are deleted [SWS_DM_02090]. While read status queries can be executed thread-safely, callback registrations and resetting the session require external synchronization.
Context
The class ara::diag::Conversation represents the interface to a communication channel between an external diagnostic tester and the Adaptive Platform SWS Diagnostics §8.2 “Conversation”. It serves as a link between the application and the internal Diagnostic Management (DM) to track and control ongoing diagnostic activities. Through its instances, Adaptive Applications gain insight into the current connection state [SWS_DM_00694], the active diagnostic session [SWS_DM_00696], the security level [SWS_DM_00698], and the identification characteristics of the channel [SWS_DM_00700].
Instances of ara::diag::Conversation are entirely instantiated and managed by the Diagnostic Management daemon. Manual creation, copying, or moving by the application is excluded: both the copy constructor [SWS_DM_02090] and move constructor [SWS_DM_02092] as well as the assignment operators [SWS_DM_02091][SWS_DM_02093] are deleted (=delete). The lifetime of the referenced objects is therefore likely directly tied to the runtime state of the diagnostic subsystem. Question Q-f8deca481d5b76e1 (open)
Access to existing instances occurs exclusively via static query functions. With GetAllConversations(), references to all configured connections can be retrieved [SWS_DM_00782], while GetCurrentActiveConversations() provides a list of all currently active channels whose activity status corresponds to kActive[SWS_DM_00783]. In addition, a specific connection can be resolved via GetConversation(metaInfo) based on the metadata of an ongoing diagnostic request [SWS_DM_00692].
Regarding concurrency, all read accesses to status and identifiers are specified as thread-safe [SWS_DM_00694][SWS_DM_00696][SWS_DM_00698]. Registering notification callbacks and resetting the session, on the other hand, are considered not thread-safe [SWS_DM_00695][SWS_DM_00701] and require application-side synchronization.
Usage Path
A typical use case comprises obtaining the connection, registering notification functions, and selectively monitoring or manipulating the session state:
Obtain reference: For an incoming diagnostic request, the corresponding instance is obtained using GetConversation(metaInfo)[SWS_DM_00692].
Query status: The instantaneous state can be determined synchronously with GetDiagnosticSession()[SWS_DM_00696] or GetDiagnosticSecurityLevel()[SWS_DM_00698]. Using GetDiagnosticSessionShortName()[SWS_DM_00707] and GetDiagnosticSecurityLevelShortName()[SWS_DM_00708], the enums can be resolved into human-readable short identifiers.
Reset session: If logic requires an abort or falling back to the base state, ResetToDefaultSession() resets the channel to the default session [SWS_DM_00701].
Methods of ara::diag::Conversation signal errors via ara::core::Result. If the basic functionality of Diagnostic Management is temporarily unavailable, GetConversation(), GetActivityStatus(), GetDiagnosticSession(), GetDiagnosticSecurityLevel(), and GetConversationIdentifier() fail with error code DiagErrc::kServiceNotAvailable[SWS_DM_00692][SWS_DM_00694][SWS_DM_00696][SWS_DM_00698][SWS_DM_00700]. Calls follow rollback semantics and remain without side effects.
For the string conversion functions GetDiagnosticSessionShortName()[SWS_DM_00707] and GetDiagnosticSecurityLevelShortName()[SWS_DM_00708], passing an unknown or invalid enumeration value results in error DiagErrc::kInvalidArgument. For the notifier registration methods as well as for ResetToDefaultSession(), no standardized error codes are defined in the specification [SWS_DM_00701].
This guide is based exclusively on the AUTOSAR Adaptive specification R25-11.
Register a notifier function which is called if the activity is changed. A consecutive call of this method will overwrite the previous registered notifier.
Register a notifier function which is called if the Session is changed. A consecutive call of this method will overwrite the previous registered notifier.
Register a notifier function which is called if the SecurityLevel is changed. A consecutive call of this method will overwrite the previous registered notifier.
Represents the current active diagnostic SecurityLevel of an active conversation.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: a38bce94acc6ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
Method GetDiagnosticSecurityLevel of class ara::diag::Conversation serves to synchronously determine the currently active security level of a diagnostic conversation (AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.6 “GetDiagnosticSecurityLevel”, [SWS_DM_00698]). It is provided via header #include "ara/diag/conversation.h", takes no parameters, and is declared with the specifier noexcept.
As its return type, the function returns a ara::core::Result<SecurityLevelType>. In the case of success, this object directly contains the enum value of the current security state of the active connection [SWS_DM_00698].
Error Handling and Concurrency
If the query fails, the method returns a ara::core::Result with error code DiagErrc::kServiceNotAvailable[SWS_DM_00698]. This indicates, applying rollback semantics, that essential functions of Diagnostic Management (DM) are not available at the time of the call. Regarding execution safety, GetDiagnosticSecurityLevel is classified as thread-safe and exception-safe [SWS_DM_00698], thus permitting concurrent calls from different threads.
Interaction
Interpretation: A call is typically likely to occur before executing protected diagnostic activities to verify the presence of the required authorization level. Question Q-8c056d4c5199524d (open) For further processing or diagnostic output, the determined SecurityLevelType can be translated into the associated symbolic short name (shortName as ara::core::StringView) via method GetDiagnosticSecurityLevelShortName (AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.7 “GetDiagnosticSecurityLevelShortName”, [SWS_DM_00708]).
This usage note was generated automatically based on the AUTOSAR Adaptive R25-11 specification.
Converts the given diagnostic SecurityLevel into the ShortName.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 384b6d7f7a21ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The synchronous method ara::diag::Conversation::GetDiagnosticSecurityLevelShortName from header ara/diag/conversation.h resolves a passed security level of type SecurityLevelType into the identifier of the configured short name (DiagnosticSecurityLevel.shortName) [SWS_DM_00708]. The call returns the result as ara::core::Result<ara::core::StringView>.
Error handling
In the error case, the function returns error code DiagErrc::kInvalidArgument[SWS_DM_00708]. The Diagnostic Server instance validates the parameter value based on two conditions:
If the locked state kLocked is passed as argument securityLevel, the Diagnostic Server must return kInvalidArgument[SWS_DM_01259].
If the passed value does not correspond to any configured entry after the calculation ((DiagnosticSecurityAccess.requestSeedId + 1) / 2) in DiagnosticContributionSet, the call likewise fails with kInvalidArgument[SWS_DM_01260].
Concurrency and Limitations
The method is declared as noexcept and specified as exception-safe (exception safe) and thread-safe (thread-safe) [SWS_DM_00708]. Due to the specified thread safety, the call is likely to be safe even during concurrent diagnostic activities without application-side mutex synchronization. Question Q-b851a473c2d836b7 (open) Before accessing the referenced string, the application must check whether the ara::core::Result contains an error.
This usage note was generated automatically. All references originate from the specifications of the AUTOSAR Adaptive Platform for release R25-11.
Method to reset the current session to default session.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 040cba85c191ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The method ara::diag::Conversation::ResetToDefaultSession enables an Adaptive Application to explicitly reset a diagnostic conversation to the default session (Default Session) [SWS_DM_00701].
use
The call is performed without parameters on an instance of ara::diag::Conversation via the header file #include "ara/diag/conversation.h"[SWS_DM_00701]. When the method is called, the Diagnostic Server instance first completes the running request and only then switches the diagnostic session of the conversation to the Default Session [SWS_DM_00842].
Error Handling and Concurrency
Return value and errors: The function returns a ara::core::Result<void>[SWS_DM_00701]. No standardized error codes are specified; interpretation: any errors in the Result are likely to reflect vendor-specific problems during job processing by the Diagnostic Server. Question Q-9f780f4ef7991bf4 (open)
Thread safety: The function is exception-safe (noexcept), but specified as not thread-safe (not thread-safe) [SWS_DM_00701]. Concurrent calls on the same conversation object must therefore be coordinated by the calling application.
Interaction
The method supplements the informative nature of the conversation interface with targeted state control AUTOSAR_AP_SWS_Diagnostics §7 “Diagnostic Conversation Interface”. It ensures that existing diagnostic requests are terminated in an orderly manner before the state of the conversation is modified [SWS_DM_00842].
This usage note was generated automatically and is based exclusively on the specification documents of AUTOSAR Adaptive R25-11.
Register a notifier function which is called if the activity is changed. A consecutive call of this method will overwrite the previous registered notifier.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 49e9828acc72ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The method ara::diag::Conversation::SetActivityNotifier serves to register a notification function (notifier) that is called whenever the activity status of the diagnostic conversation changes [SWS_DM_00695]. The declaration is made via header file #include "ara/diag/conversation.h" in the scope of class ara::diag::ConversationAUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.11 “SetActivityNotifier”. A new or consecutive call on the same instance completely overwrites the previously registered notifier [SWS_DM_00695], [SWS_DM_01355].
Error Handling and Concurrency
The return value is typed as ara::core::Result<void> and reports success or an error state; however, the interface specifies no standardized error codes [SWS_DM_00695]. The method is declared as noexcept and exception-safe (exception safe).
With regard to thread safety, the function is classified as not thread-safe (not thread-safe) [SWS_DM_00695]. If access to the same conversation instance occurs from multiple threads, the registration call must be synchronized on the application side.
Interaction in the lifecycle
Instances of the conversation are provided by the Diagnostic Server, where the maximum number of parallel conversations is configured via maxConversations[SWS_DM_00840]. When the lifecycle of a diagnostic conversation ends, the Diagnostic Server sets the activity status to kInactive[SWS_DM_00843]. This is likely intended to signal the end of active diagnostic communication to the registered notifier. Question Q-93c30267eb100ed7 (open)
This text was generated by an AI system and editorially reviewed.
Register a notifier function which is called if the Session is changed. A consecutive call of this method will overwrite the previous registered notifier.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: b40c717f1178ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The function SetDiagnosticSessionNotifier belongs to class ara::diag::Conversation and is provided via the header file #include "ara/diag/conversation.h"[SWS_DM_00697]. It enables applications to register a notifier function that is triggered on every change of the diagnostic session.
As return value, the interface returns a ara::core::Result<void>, which either confirms a successful registration or contains an error object [SWS_DM_00697]. The specification does not define any standardized error codes for this call; occurring errors are therefore likely attributable to implementation-specific validations. Question Q-1ac7eebee90e3c22 (open)
Concurrency and Limitations
Thread safety: The method is specified as not thread-safe (not thread-safe) [SWS_DM_00697]. Concurrent calls for the same conversation instance must therefore be synchronized on the application side.
Exception safety: The function is declared as noexcept and is considered exception-safe (exception safe) [SWS_DM_00697].
Register a notifier function which is called if the SecurityLevel is changed. A consecutive call of this method will overwrite the previous registered notifier.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f0130e1f2bdeProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The method ara::diag::Conversation::SetSecurityLevelNotifier serves to register a callback function that is notified as soon as the security level (SecurityLevel) of the diagnostic conversation changes [SWS_DM_00699]. It is declared via the header ara/diag/conversation.hAUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.13 “SetSecurityLevelNotifier”. It accepts the function to be called notifier as parameter. Calling the method again completely overwrites a previously registered notifier function [SWS_DM_00699].
Semantics and return value
The function is defined as noexcept and specified as exception-safe (exception safe) [SWS_DM_00699]. As return type, it returns ara::core::Result<void>, which returns either no value or an error that occurred [SWS_DM_00699].
Error handling
The specification defines no standardized error codes for SetSecurityLevelNotifier[SWS_DM_00699]. Any errors returned in the ara::core::Result are therefore likely vendor-specific or caused by the underlying platform runtime. Question Q-c8dd53e9d661cc78 (open)
Concurrency and Limitations
Regarding thread safety, the method is explicitly classified as not thread-safe[SWS_DM_00699]. Concurrent accesses to the same instance of ara::diag::Conversation must thus be synchronized by the caller. In addition, the API definition has the status DRAFT in the present documentation version AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.13 “SetSecurityLevelNotifier”.
This usage note is based on the specification AUTOSAR Adaptive Platform Release R25-11.
gemini-3.8-flash-low· 2026-10-13 · German original