DEENESPTFRRUARHIKOZHNL

classe ara::diag::ClientAuthentication

[SWS_DM_01132] Upstream: RS_Diag_04251

class ClientAuthentication final {...};

Interface for the application to inform the Diagnostic Server instance about the authentication states and the user roles that are currently authenticated.

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

Guide utilisateurGÉNÉRÉ PAR IA

Sert à l’application pour signaler les états d’authentification et les rôles utilisateur actifs au serveur de diagnostic.
GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 426d68eb26e1 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Sert à l’application pour signaler les états d’authentification et les rôles utilisateur actifs au serveur de diagnostic.

L’interface permet à l’application d’informer le serveur de diagnostic de l’état d’authentification ainsi que des rôles utilisateur actifs d’un client de diagnostic [SWS_DM_01132]. Des transitions d’état sont contrôlées via des appels tels que Authenticate ou OverrideDefaultRoles, et des handles sont fournis pour gérer des listes d’accès dynamiques [SWS_DM_01206]. Les changements d’état consécutifs à des délais d’expiration peuvent être surveillés de manière asynchrone via un notificateur. La classe n’étant pas thread-safe et n’autorisant aucune copie, l’accès doit être synchronisé au sein de l’application.

Contexte

La classe ara::diag::ClientAuthentication sert d’interface centrale pour l’application afin d’informer l’instance du serveur de diagnostic des états d’authentification et des rôles utilisateur actuellement authentifiés [SWS_DM_01132], SWS Diagnostics, p. 129. Trois parties principales participent à cette interaction :

  • Application : réalise les vérifications d’authentification – soit en utilisant les interfaces du serveur de diagnostic, soit via ses propres mécanismes internes – et transmet les rôles utilisateur au serveur de diagnostic [SWS_DM_01142].
  • Serveur de diagnostic / Diagnostic Manager : gère les sessions de diagnostic et applique les droits d’accès aux ressources de diagnostic en se basant sur les rôles et l’état d’authentification [SWS_DM_01206].
  • Client de diagnostic : un testeur externe ou un client SOVD qui adresse des requêtes de diagnostic au calculateur [SWS_DM_01210], [SWS_DM_01470].

Le nombre d’instances de ClientAuthentication est défini par l’élément de modèle DiagnosticExternalAuthenticationIdentification SWS Diagnostics, p. 129. Cet élément permet de configurer une authentification pour un client avec une adresse source fixe ou via une plage d’adresses, si l’adresse source finale n’est pas encore connue au moment de la compilation SWS Diagnostics, p. 129. Interprétation : l’association des clients de diagnostic aux instances concrètes de ClientAuthentication s’effectue au moment de l’exécution à partir de ces plages d’adresses sources. Question Q-6cc7e791e678def2 (ouverte) Dans le cas de clients SOVD, le serveur de diagnostic transmet directement un objet ClientAuthentication à l’application lors de la validation du jeton d’autorisation via ara::diag::SovdAuthorization::ValidateAuthorization [SWS_DM_01470].

Application Application ClientAuthentication ClientAuthentication Application->ClientAuthentication Get / Authenticate DiagnosticServer DiagnosticServer ClientAuthentication->DiagnosticServer Zustandsmeldung DiagnosticClient DiagnosticClient DiagnosticClient->DiagnosticServer Diagnoseanfrage

Diagramme de contexte : partenaires d’interaction de l’interface d’authentification. Sources : [SWS_DM_01132], [SWS_DM_01202], [SWS_DM_01470], SWS Diagnostics, p. 129

Cycle de vie

L’application obtient une instance de ClientAuthentication via des méthodes surchargées de ara::diag::ExternalAuthentication::Get [SWS_DM_01202] ou dans le contexte de la vérification de jeton SOVD [SWS_DM_01470]. La classe possède des sémantiques de propriété strictes : le constructeur de copie [SWS_DM_01139] et l’opérateur d’assignation par copie [SWS_DM_01140] sont supprimés (=delete). Les opérations de déplacement (constructeur de déplacement [SWS_DM_01137] et opérateur d’assignation par déplacement [SWS_DM_01138]) sont prédéfinies par défaut et déclarées comme noexcept. Le destructeur est également noexcept [SWS_DM_01136]. Toutes les fonctions membres ainsi que le destructeur ne sont pas thread-safe (not thread-safe) [SWS_DM_01136], [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143], [SWS_DM_01144].

L’état d’authentification est représenté par le type énuméré DiagnosticAuthState [SWS_DM_01133] :

  • kDeAuthenticated (0x00) : aucun client de diagnostic n’est authentifié. Au démarrage du système, le client se trouve par défaut dans cet état [SWS_DM_01205]. Les rôles (DiagnosticAuthRole) dont l’attribut isDefault est configuré sur TRUE sont alors considérés comme des rôles par défaut [SWS_DM_01204], [SWS_DM_01134]. Ces rôles par défaut peuvent être temporairement remplacés pour un délai d’expiration défini via OverrideDefaultRoles [SWS_DM_01141], [SWS_DM_01209].
  • kAuthenticated (0x01) : un client de diagnostic est authentifié. Cet état est atteint par l’appel de Authenticate, ce qui active les rôles utilisateur transmis dans le serveur de diagnostic [SWS_DM_01142], [SWS_DM_01206].

Une transition d’état automatique de kAuthenticated vers kDeAuthenticated est déclenchée lorsqu’un client en session par défaut n’envoie plus de requête après la dernière confirmation de transfert (TransmitConfirmation) et que le délai d’inactivité expire [SWS_DM_01210], ou lorsqu’un délai d’attente S3 survient [SWS_DM_01144], [SWS_DM_02077].

kDeAuthenticated kDeAuthenticated kDeAuthenticated->kDeAuthenticated OverrideDefaultRoles() kAuthenticated kAuthenticated kDeAuthenticated->kAuthenticated Authenticate() kAuthenticated->kDeAuthenticated Inaktivitaet / S3-Timeout

Diagramme d’états : cycle de vie et transitions d’état de l’authentification client. Sources : [SWS_DM_01133], [SWS_DM_01204], [SWS_DM_01205], [SWS_DM_01206], [SWS_DM_01209], [SWS_DM_01210]

Parcours d'utilisation

Le déroulement régulier de la gestion de l’authentification client comprend les étapes suivantes :

  1. Enregistrer le notificateur : l’application enregistre avec SetNotifier une fonction de rappel du type ClientAuthenticationSetNotifier (std::function<void(DiagnosticAuthState)>) [SWS_DM_01144], [SWS_DM_02077]. Elle est ainsi informée lorsque des changements d’état surviennent – par exemple la transition vers kDeAuthenticated en raison de l’inactivité ou d’un délai d’attente S3 [SWS_DM_01144]. Un nouvel appel écrase le notificateur précédemment configuré [SWS_DM_01144].
  2. Interroger l’état : via la méthode GetState(), l’application peut interroger de manière synchrone l’état d’authentification actuel du client [SWS_DM_01143].
  3. Signaler l’authentification : dès que l’authentification s’est achevée avec succès, l’application appelle Authenticate avec les rôles utilisateur à activer (ara::core::Vector<DiagnosticAuthRole>) [SWS_DM_01142], [SWS_DM_01134]. Le serveur de diagnostic positionne l’état sur kAuthenticated et renvoie un ClientAuthenticationHandle [SWS_DM_01206].
  4. Gérer les droits d'accès : via le ClientAuthenticationHandle obtenu, l'application peut configurer la liste de contrôle d'accès dynamique (DynamicAccessList) pour le client [SWS_DM_01213], SWS Diagnostics, p. 132. Parallèlement, l'utilisation de ce handle réinitialise la fenêtre d'inactivité du client SWS Diagnostics, p. 133.

Si le client se trouve à l'état kDeAuthenticated, l'application peut appeler OverrideDefaultRoles(defaultRoles, timeout) à la place afin d'activer temporairement des rôles par défaut alternatifs ; cet appel renvoie également un ClientAuthenticationHandle en cas de succès [SWS_DM_01141], [SWS_DM_01209].

Déroulement de l'authentification et gestion des droitsApplicationClientAuthenticationDiagnosticServerSetNotifier(notifier)Result<void>Authenticate(userRoles)Définir le statut kAuthenticated et les rôlesBestaetigung & HandleResult<ClientAuthenticationHandle>optClient-Inaktivitaet in Standard-Session / S3-TimeoutWechsel zu kDeAuthenticatednotifier(kDeAuthenticated)

Diagramme de séquence : déroulement des appels et des notifications lors de l'authentification. Sources : [SWS_DM_01142], [SWS_DM_01144], [SWS_DM_01206], [SWS_DM_01210]

Scénarios d'erreur

Les méthodes Authenticate, OverrideDefaultRoles et GetState renvoient leurs valeurs de retour encapsulées dans ara::core::Result et sont spécifiées comme sûres vis-à-vis des exceptions (exception safe) ainsi que noexcept [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143]. En cas d'erreur, le code d'erreur standardisé suivant est signalé :

Aucun code d'erreur standardisé n'est défini pour SetNotifier [SWS_DM_01144]. Comme précondition essentielle, OverrideDefaultRoles exige que le client se trouve à l'état kDeAuthenticated au moment de l'appel [SWS_DM_01209].

Ce guide est basé sur la spécification AUTOSAR Adaptive R25-11 (module diag) et a été rédigé pour autodocs.

Carte des membres

Diagramme de classes

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

G nara__diag__ClientAuthentication678 ClientAuthentication + ClientAuthentication() + ~ClientAuthentication() + Authenticate() + GetState() + OverrideDefaultRoles() + SetNotifier() + operator=()

Vue détaillée

Sélectionnez une entrée dans le plan.

Constructeurs et destructeur

Move constructor of ClientAuthentication.

Surcharges ClientAuthentication 2
ClientAuthentication (ClientAuthentication &&other) noexcept=default; SWS_DM_01137
ClientAuthentication (ClientAuthentication const &other)=delete; SWS_DM_01139

Destructor of ClientAuthentication.

~ClientAuthentication () noexcept;

Méthodes

Authenticate fonction

This function is used by the application to report the authenticated state to the Diagnostic Server instance. The authentication could be either done using the Authentication interfaces of the Diagnostic Server instance, or through other means in the application.

GetState fonction

This function is used by the application to query the current authentication state of the diagnostic client.

ara::core::Result< DiagnosticAuthState > GetState () const noexcept;

This method is used by the application to temporarily change the default AuthenticationRole for a Diagnostic Server Instance. The diagnostic services allowed in the passed defaultRoles are now accessible to the tester for a time period defined in the parameter timeout.

SetNotifier fonction

This function is used by the application to set a Notifier function that shall be called by the Diagnostic Server instance when an Authentication Status Change occurs. This may be used, e.g, to notify the application when a transition to kDeAuthenticated state occurred due to an S3 timeout. A consecutive call of this method will overwrite the previous registered notifier.

ara::core::Result< void > SetNotifier (ClientAuthenticationSetNotifier notifier) noexcept;

Opérateurs

operator= fonction 2

Move assignment operator of ClientAuthentication.

Surcharges = 2
auto operator= (ClientAuthentication &&other) & noexcept -> Client Authentication & =default; SWS_DM_01138
auto operator= (ClientAuthentication const &other) -> Client Authentication &=delete; SWS_DM_01140

Alias de type

Notifier Function that is called by the Diagnostic Server instance when an Authentication Status Change Occurs. This may be used, for e.g, to notify the application when a transition to kDeAuthenticated State occurred due to an S3 timeout.

using ClientAuthenticationSetNotifier = std::function<void(Diagnostic AuthState)>;
DiagnosticAuthRole alias de type

The supported values for the Diagnostic Authentication roles are specified in the Diagnostic Extract.

using DiagnosticAuthRole = ara::core::String;

Énumérations

DiagnosticAuthState énumération

Possible values of the Authentication State of the client.

enum class DiagnosticAuthState : std::uint8_t {...};

Documentation des méthodes

fonction Authenticate [SWS_DM_01142] Upstream: RS_Diag_04251

ara::core::Result< ClientAuthenticationHandle > Authenticate (ara::core::Vector< DiagnosticAuthRole > userRoles) noexcept;

This function is used by the application to report the authenticated state to the Diagnostic Server instance. The authentication could be either done using the Authentication interfaces of the Diagnostic Server instance, or through other means in the application.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 06f87d723d7c Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation et appel

La fonction ara::diag::ClientAuthentication::Authenticate est appelée par une application afin de notifier à l'instance de Diagnostic Server l'authentification réussie d'un client de diagnostic [SWS_DM_01142]. Cela peut se produire après une authentification via les interfaces du Diagnostic Server ou via des mécanismes propres à l'application [SWS_DM_01142].

En paramètre d'entrée, la fonction accepte userRoles (de type ara::core::Vector<DiagnosticAuthRole>). En cas d'appel réussi, l'état d'authentification de l'instance passe à kAuthenticated et les rôles utilisateur transmis sont définitivement adoptés [SWS_DM_01206]. Comme valeur de retour, elle fournit un ara::core::Result<ClientAuthenticationHandle> [SWS_DM_01142]. Puisqu'un objet Result est directement mis à disposition, le traitement devrait s'effectuer de manière synchrone dans le contexte appelant. Question Q-dae22c82694f2103 (ouverte)

Gestion des erreurs et concurrence

La méthode est déclarée comme noexcept et est considérée comme sûre vis-à-vis des exceptions (exception safe) [SWS_DM_01142]. Si une erreur survient en raison de l'indisponibilité de fonctionnalités fondamentales du Diagnostic Manager au moment de l'appel, l'opération échoue avec une sémantique de rollback et renvoie DiagErrc::kServiceNotAvailable dans l'objet Result [SWS_DM_01142].

Concernant la concurrence, la méthode est expressément spécifiée comme not thread-safe [SWS_DM_01142]. Les appels parallèles sur le même objet ClientAuthentication sont donc non autorisés et doivent être synchronisés par l'application.

Zusammenspiel et cycle de vie

Le ClientAuthenticationHandle obtenu permet à l'application de définir ou d'étendre une DynamicAccessList pour le client authentifié [SWS_DM_01142]. De plus, l'appel démarre ou référence la surveillance de l'inactivité du client : si, après une authentification réussie dans l'état de session par défaut, aucune autre requête UDS n'est reçue pendant une durée de authenticationTimeout, l'instance de Diagnostic Server réinitialise automatiquement le client à kDeAuthenticated [SWS_DM_01210]. Pour prévenir ce timeout, l'application peut rafraîchir le temporisateur via la méthode Refresh du handle [SWS_DM_01155].

Ce texte a été généré par une IA sur la base de la spécification AUTOSAR.

Guide de l'implémenteur à venir (complexité I2)

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

Parameter (in)

ParameterBeschreibung
userRolesThe user roles to set on the diagnostic client

Rückgabewert

TypBeschreibung
ara::core::Result< ClientAuthenticationHandle >A handler of the Authentication State, which can be used by the application to set or extend the DynamicAccessList

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_01142
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01142@rel:R25-11#5f8cce74
Content hash
5f8cce74
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01142
Status: valid/unmigrated Version: rel:R25-11#17cf8f55 Versionshistorie & Revisions (1 transition, 6 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_01142@rel:R25-11#17cf8f55
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ffd39a4b2026-09-30
  • R21-11rel:R21-11#6f17bd9a2026-10-14
  • R22-11rel:R22-11#1579f1692026-10-14
  • R23-11rel:R23-11#3b67657b2026-10-14
  • R24-11rel:R24-11#575f1e5f2026-10-14
  • R25-11rel:R25-11#17cf8f552026-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

fonction ClientAuthentication [SWS_DM_01137] Upstream: RS_Diag_04251

ClientAuthentication (ClientAuthentication &&other) noexcept=default;

Move constructor of ClientAuthentication.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherObject to move-construct from

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

Record
AUTOSAR/AP/record/SWS_DM_01137
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01137@rel:R25-11#57b3f195
Content hash
57b3f195
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01137
Status: valid/unmigrated Version: rel:R25-11#3462794e Versionshistorie & Revisions (1 transition, 6 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_01137@rel:R25-11#3462794e
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#581961172026-09-30
  • R21-11rel:R21-11#f373d3152026-10-14
  • R22-11rel:R22-11#afdb12682026-10-14
  • R23-11rel:R23-11#5682468c2026-10-14
  • R24-11rel:R24-11#d6bf1b932026-10-14
  • R25-11rel:R25-11#3462794e2026-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

fonction ClientAuthentication [SWS_DM_01139] Upstream: RS_Diag_04251

ClientAuthentication (ClientAuthentication const &other)=delete;

Copy constructor of ClientAuthentication cannot be used.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication

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

Record
AUTOSAR/AP/record/SWS_DM_01139
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01139@rel:R25-11#d4de45c3
Content hash
d4de45c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01139
Status: valid/unmigrated Version: rel:R25-11#8625245a Versionshistorie & Revisions (1 transition, 6 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_01139@rel:R25-11#8625245a
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ab1768822026-09-30
  • R21-11rel:R21-11#1fb6defa2026-10-14
  • R22-11rel:R22-11#74808a772026-10-14
  • R23-11rel:R23-11#1b61e7822026-10-14
  • R24-11rel:R24-11#8625245a2026-10-14
  • R25-11rel:R25-11#8625245a2026-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

fonction GetState [SWS_DM_01143] Upstream: RS_Diag_04251

ara::core::Result< DiagnosticAuthState > GetState () const noexcept;

This function is used by the application to query the current authentication state of the diagnostic client.

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

Rückgabewert

TypBeschreibung
ara::core::Result<DiagnosticAuthState >The Authentication State of the Diagnostic Client or error.

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_01143
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01143@rel:R25-11#b8fa8215
Content hash
b8fa8215
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01143
Status: valid/unmigrated Version: rel:R25-11#608570f4 Versionshistorie & Revisions (1 transition, 6 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_01143@rel:R25-11#608570f4
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#84da2c3e2026-09-30
  • R21-11rel:R21-11#d78810992026-10-14
  • R22-11rel:R22-11#fed2aecc2026-10-14
  • R23-11rel:R23-11#275163122026-10-14
  • R24-11rel:R24-11#23ca48ab2026-10-14
  • R25-11rel:R25-11#608570f42026-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

fonction OverrideDefaultRoles [SWS_DM_01141] Upstream: RS_Diag_04251

ara::core::Result< ClientAuthenticationHandle > OverrideDefaultRoles (ara::core::Vector< DiagnosticAuthRole > defaultRoles, std::chrono::milliseconds timeout) noexcept;

This method is used by the application to temporarily change the default AuthenticationRole for a Diagnostic Server Instance. The diagnostic services allowed in the passed defaultRoles are now accessible to the tester for a time period defined in the parameter timeout.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 4809043989e1 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

À l'aide de la méthode synchrone OverrideDefaultRoles de la classe ara::diag::ClientAuthentication, une application peut surcharger temporairement les rôles d'authentification par défaut (defaultRoles) d'un client de diagnostic [SWS_DM_01141]. Les services de diagnostic autorisés pour les rôles transmis sont à la disposition du testeur pendant le laps de temps défini dans le paramètre timeout [SWS_DM_01141]. La condition préalable est que le client se trouve dans l'état kDeAuthenticated [SWS_DM_01209]. Interprétation : si l'appel n'a pas lieu dans l'état kDeAuthenticated, la surcharge de rôles devrait être rejetée ou rester sans effet, car la spécification prescrit ce comportement exclusivement pour cet état initial. Question Q-81189f2c2fe0f301 (ouverte)

En cas d'exécution réussie, la méthode renvoie à l'application une instance de ClientAuthenticationHandle au sein d'un ara::core::Result [SWS_DM_01141], [SWS_DM_01209]. Si l'appel ne peut pas être exécuté parce qu'une fonctionnalité essentielle du Diagnostic Manager n'est pas disponible actuellement, le code d'erreur DiagErrc::kServiceNotAvailable est renvoyé [SWS_DM_01141]. La fonction est déclarée comme noexcept et est sûre vis-à-vis des exceptions (exception safe) [SWS_DM_01141].

Les exigences suivantes s'appliquent à la concurrence et à l'interaction avec d'autres composants :

  • Concurrence : la méthode est spécifiée comme not thread-safe [SWS_DM_01141]. Les appels parallèles sur la même instance doivent être synchronisés côté application.
  • Gestion des handles : via l'instance renvoyée de ClientAuthenticationHandle, le temporisateur en cours peut être prolongé avec Refresh() [SWS_DM_01155]. De plus, le handle permet la gestion de la DynamicAccessList pour des ressources de diagnostic supplémentaires AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 « ClientAuthenticationHandle ».

Cette note d'utilisation a été générée automatiquement à partir des spécifications AUTOSAR.

Guide de l'implémenteur à venir (complexité I2)

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

Parameter (in)

ParameterBeschreibung
defaultRolesThe default roles requested by the application, to be set on the diagnostic client
timeoutThe timeout until which the override request is active

Rückgabewert

TypBeschreibung
ara::core::Result< ClientAuthenticationHandle >Operation result

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_01141
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01141@rel:R25-11#dc3aabc9
Content hash
dc3aabc9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01141
Status: valid/unmigrated Version: rel:R25-11#21bca5df Versionshistorie & Revisions (1 transition, 6 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_01141@rel:R25-11#21bca5df
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#852a402e2026-09-30
  • R21-11rel:R21-11#135b2de82026-10-14
  • R22-11rel:R22-11#70389b8e2026-10-14
  • R23-11rel:R23-11#e73e64042026-10-14
  • R24-11rel:R24-11#94dc59742026-10-14
  • R25-11rel:R25-11#21bca5df2026-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

fonction SetNotifier [SWS_DM_01144] Upstream: RS_Diag_04251

ara::core::Result< void > SetNotifier (ClientAuthenticationSetNotifier notifier) noexcept;

This function is used by the application to set a Notifier function that shall be called by the Diagnostic Server instance when an Authentication Status Change occurs. This may be used, e.g, to notify the application when a transition to kDeAuthenticated state occurred due to an S3 timeout. A consecutive call of this method will overwrite the previous registered notifier.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 19ea8e6c95d7 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Utilisation

La méthode [SWS_DM_01144] de la classe ara::diag::ClientAuthentication permet à l'application d'enregistrer une fonction de rappel du type ClientAuthenticationSetNotifier. Celle-ci est appelée par l'instance du Diagnostic Server dès que l'état d'authentification d'un client change [SWS_DM_01144]. Cela permet à l'application de réagir immédiatement aux changements d'état, par exemple lorsqu'une transition automatique vers l'état kDeAuthenticated intervient après un timeout de serveur S3 [SWS_DM_01211] ou lorsqu'un timeout survient en raison d'une inactivité du client [SWS_DM_01210].

Gestion des erreurs et valeur de retour

La fonction renvoie un ara::core::Result<void> et est déclarée comme noexcept ainsi que sûre vis-à-vis des exceptions (exception safe) [SWS_DM_01144]. Aucun code d'erreur standardisé n'est spécifié [SWS_DM_01144] ; l'objet de résultat fournit vraisemblablement toujours un succès (void) en fonctionnement normal. Question Q-0d7d43cc37d57944 (ouverte)

Concurrence et interaction

Concernant la sécurité des threads, la méthode est spécifiée comme « not thread-safe » [SWS_DM_01144]. Les appels sur la même instance ne doivent donc pas être effectués sans protection à partir de threads concurrents. De plus, un comportement d'écrasement s'applique à l'enregistrement : un nouvel appel de SetNotifier remplace entièrement le notificateur précédemment enregistré [SWS_DM_01144]. Ce comportement correspond au modèle d'enregistrement uniforme dans le Diagnostic Management, tel qu'il est défini de manière analogue pour [SWS_DM_00615] (CancellationHandler), [SWS_DM_00745] (Indicator) et [SWS_DM_00755] (OperationCycle).

Cette note d'utilisation a été générée automatiquement sur la base de la spécification AUTOSAR Adaptive R25-11.

Guide de l'implémenteur à venir (complexité I3)

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

Parameter (in)

ParameterBeschreibung
notifierThe notifier to call on state transition

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_01144
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01144@rel:R25-11#6f8256b0
Content hash
6f8256b0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01144
Status: valid/unmigrated Version: rel:R25-11#ddcf5d80 Versionshistorie & Revisions (1 transition, 6 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_01144@rel:R25-11#ddcf5d80
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#bb5bb9422026-09-30
  • R21-11rel:R21-11#fec80c112026-10-14
  • R22-11rel:R22-11#2ece489f2026-10-14
  • R23-11rel:R23-11#7f1d62332026-10-14
  • R24-11rel:R24-11#107e99362026-10-14
  • R25-11rel:R25-11#ddcf5d802026-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

fonction operator= [SWS_DM_01138] Upstream: RS_Diag_04251

auto operator= (ClientAuthentication &&other) & noexcept -> Client Authentication & =default;

Move assignment operator of ClientAuthentication.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherObject to move-assign from.

Rückgabewert

TypBeschreibung
ClientAuthenticationClientAuthentication& Reference to self.

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

Record
AUTOSAR/AP/record/SWS_DM_01138
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01138@rel:R25-11#da13e8a8
Content hash
da13e8a8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01138
Status: valid/unmigrated Version: rel:R25-11#76277668 Versionshistorie & Revisions (1 transition, 6 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_01138@rel:R25-11#76277668
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#f0894f262026-09-30
  • R21-11rel:R21-11#1107ed262026-10-14
  • R22-11rel:R22-11#9d8e860b2026-10-14
  • R23-11rel:R23-11#a3ca32ee2026-10-14
  • R24-11rel:R24-11#2d04d62d2026-10-14
  • R25-11rel:R25-11#762776682026-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

fonction operator= [SWS_DM_01140] Upstream: RS_Diag_04251

auto operator= (ClientAuthentication const &other) -> Client Authentication &=delete;

Copy assignment operator of ClientAuthentication cannot be used.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication

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

Record
AUTOSAR/AP/record/SWS_DM_01140
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01140@rel:R25-11#833565f3
Content hash
833565f3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01140
Status: valid/unmigrated Version: rel:R25-11#83c48e25 Versionshistorie & Revisions (1 transition, 6 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_01140@rel:R25-11#83c48e25
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#2a4783d52026-09-30
  • R21-11rel:R21-11#f986a5382026-10-14
  • R22-11rel:R22-11#666e2c0b2026-10-14
  • R23-11rel:R23-11#9111a09e2026-10-14
  • R24-11rel:R24-11#41a505672026-10-14
  • R25-11rel:R25-11#83c48e252026-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

fonction ~ClientAuthentication [SWS_DM_01136] Upstream: RS_Diag_04251

~ClientAuthentication () noexcept;

Destructor of ClientAuthentication.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 9da38c214c58 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Le destructeur [SWS_DM_01136] de la classe ara::diag::ClientAuthentication sert à la libération et à la déconstruction propre d'une instance destinée à l'authentification de client dans le Diagnostic Management. La fonction est définie dans le fichier d'en-tête #include "ara/diag/client_authentication.h" et est appelée de manière synchrone à la fin de la durée de vie de l'objet (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 « Destructor »).

Les dispositions suivantes s'appliquent à l'utilisation et aux propriétés d'exécution :

  • Appel et paramètres : en tant que destructeur, ~ClientAuthentication() ne possède ni paramètre d'entrée ni valeur de retour.
  • Sécurité vis-à-vis des erreurs et des exceptions : l'opération est spécifiée comme noexcept et exception safe [SWS_DM_01136] ; aucune exception n'est déclenchée lors de la déconstruction de l'objet.
  • Concurrence : l'appel est expressément classé comme not thread-safe. Une destruction de l'objet ne doit par conséquent pas avoir lieu de manière concurrente à d'autres appels de méthode de la même instance.

L'élément met en œuvre l'exigence amont RS_Diag_04251 (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 « Destructor »). Interprétation : avant de détruire l'instance, les opérations actives d'authentification ou de communication de l'application devraient devoir être terminées de manière ordonnée afin d'éviter tout comportement indéfini résultant de l'absence de sécurité des threads. Question Q-cedd6f523eb2c1c3 (ouverte)

Ce texte a été généré par une IA et sert de note d'utilisation rédactionnelle.

Guide de l'implémenteur à venir (complexité I1)

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
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_01136
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01136@rel:R25-11#fc220067
Content hash
fc220067
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01136
Status: valid/unmigrated Version: rel:R25-11#ebd2efb0 Versionshistorie & Revisions (1 transition, 6 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_01136@rel:R25-11#ebd2efb0
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#5066950d2026-09-30
  • R21-11rel:R21-11#aa8b145e2026-10-14
  • R22-11rel:R22-11#e03e0f452026-10-14
  • R23-11rel:R23-11#a62b91a92026-10-14
  • R24-11rel:R24-11#393bc96e2026-10-14
  • R25-11rel:R25-11#ebd2efb02026-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

Documentation des énumérations

énumération DiagnosticAuthState [SWS_DM_01133] Upstream: RS_Diag_04251

enum class DiagnosticAuthState :                std::uint8_t {...};

Possible values of the Authentication State of the client.

Header-Datei#include "ara/diag/client_authentication.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::ClientAuthentication
SymbolDiagnosticAuthState
Basistypstd::uint8_t

Werte

EnumeratorBeschreibung
kDeAuthenticated= 0x00 No Diagnostic Clients are currently authenticated.
kAuthenticated= 0x01 A Diagnostic Client is currently authenticated.

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

Record
AUTOSAR/AP/record/SWS_DM_01133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01133@rel:R25-11#6aabbc73
Content hash
6aabbc73
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01133
Status: valid/unmigrated Version: rel:R25-11#be2431b9 Versionshistorie & Revisions (1 transition, 6 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_01133@rel:R25-11#be2431b9
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ecdc884c2026-09-30
  • R21-11rel:R21-11#9ee5449e2026-10-14
  • R22-11rel:R22-11#9ee5449e2026-10-14
  • R23-11rel:R23-11#e21d94c52026-10-14
  • R24-11rel:R24-11#e21d94c52026-10-14
  • R25-11rel:R25-11#be2431b92026-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

Documentation des alias de type

alias de type ClientAuthenticationSetNotifier [SWS_DM_02077] Upstream: RS_Diag_04251

using ClientAuthenticationSetNotifier = std::function<void(Diagnostic AuthState)>;

Notifier Function that is called by the Diagnostic Server instance when an Authentication Status Change Occurs. This may be used, for e.g, to notify the application when a transition to kDeAuthenticated State occurred due to an S3 timeout.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
SymbolClientAuthenticationSetNotifier
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_02077
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02077@rel:R25-11#c1801462
Content hash
c1801462
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02077
Status: valid/unmigrated Version: rel:R25-11#9f8e8d05 Versionshistorie & Revisions (1 transition, 3 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_02077@rel:R25-11#9f8e8d05
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#00399c222026-09-30
  • R24-11rel:R24-11#b4d6fb532026-10-14
  • R25-11rel:R25-11#9f8e8d052026-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

alias de type DiagnosticAuthRole [SWS_DM_01134] Upstream: RS_Diag_04251

using DiagnosticAuthRole = ara::core::String;

The supported values for the Diagnostic Authentication roles are specified in the Diagnostic Extract.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
SymbolDiagnosticAuthRole

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

Record
AUTOSAR/AP/record/SWS_DM_01134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01134@rel:R25-11#bc19f271
Content hash
bc19f271
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01134
Status: valid/unmigrated Version: rel:R25-11#10bed2cf Versionshistorie & Revisions (1 transition, 6 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_01134@rel:R25-11#10bed2cf
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ecb176b92026-09-30
  • R21-11rel:R21-11#d3a529062026-10-14
  • R22-11rel:R22-11#7d6be0912026-10-14
  • R23-11rel:R23-11#7e7656532026-10-14
  • R24-11rel:R24-11#eb0bd58b2026-10-14
  • R25-11rel:R25-11#10bed2cf2026-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