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

Guia do utilizadorGERADO POR IA

Serve à aplicação para reportar estados de autenticação e papéis de usuário ativos ao Diagnostic Server.
GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 426d68eb26e1 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Serve à aplicação para reportar estados de autenticação e papéis de usuário ativos ao Diagnostic Server.

A interface permite que a aplicação informe o Diagnostic Server sobre o status de autenticação, bem como sobre os papéis de usuário ativos de um cliente de diagnóstico [SWS_DM_01132]. Por meio de chamadas como Authenticate ou OverrideDefaultRoles, são controladas as transições de estado e fornecidos manipuladores para o gerenciamento de listas de acesso dinâmicas [SWS_DM_01206]. Alterações de estado decorrentes de timeouts podem ser monitoradas assincronamente por meio de um notificador. Como a classe não é segura para threads e não permite cópias, o acesso dentro da aplicação deve ocorrer de forma sincronizada.

Contexto

A classe ara::diag::ClientAuthentication serve como interface central para a aplicação informar a instância do Diagnostic Server sobre os estados de autenticação e os papéis de usuário autenticados atualmente [SWS_DM_01132], SWS Diagnostics, p. 129. Três partes essenciais participam dessa interação:

  • Aplicação (Application): Realiza verificações de autenticação – seja utilizando interfaces do Diagnostic Server ou por meio de mecanismos próprios da aplicação – e transmite os papéis de usuário para o Diagnostic Server [SWS_DM_01142].
  • Diagnostic Server / Diagnostic Manager: Gerencia as sessões de diagnóstico e aplica os direitos de acesso a recursos de diagnóstico com base nos papéis e no status de autenticação [SWS_DM_01206].
  • Cliente de diagnóstico: Um testador externo ou cliente SOVD que envia solicitações de diagnóstico para a ECU [SWS_DM_01210], [SWS_DM_01470].

A quantidade de instâncias de ClientAuthentication é definida pelo elemento de modelo DiagnosticExternalAuthenticationIdentification SWS Diagnostics, p. 129. Esse elemento permite configurar uma autenticação para um cliente com um endereço de origem fixo ou sobre uma faixa de endereços, caso o endereço de origem final ainda não seja conhecido em tempo de compilação SWS Diagnostics, p. 129. Interpretação: A associação de clientes de diagnóstico a instâncias concretas de ClientAuthentication ocorre em tempo de execução com base nessas faixas de endereços de origem. Pergunta Q-6cc7e791e678def2 (aberta) No caso de clientes SOVD, o Diagnostic Server passa diretamente um objeto ClientAuthentication para a aplicação durante a validação do token de autorização 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

Diagrama de contexto: parceiros de interação da interface de autenticação. Fontes: [SWS_DM_01132], [SWS_DM_01202], [SWS_DM_01470], SWS Diagnostics, p. 129

Ciclo de vida

A aplicação obtém uma instância de ClientAuthentication por meio de métodos sobrecarregados de ara::diag::ExternalAuthentication::Get [SWS_DM_01202] ou no contexto da verificação de token SOVD [SWS_DM_01470]. A classe possui semânticas estritas de posse: o construtor de cópia [SWS_DM_01139] e o operador de atribuição por cópia [SWS_DM_01140] estão excluídos (=delete). Operações de movimento (construtor de movimento [SWS_DM_01137] e operador de atribuição por movimento [SWS_DM_01138]) são predefinidas como padrão e declaradas como noexcept. O destrutor também é noexcept [SWS_DM_01136]. Todas as funções-membro, bem como o destrutor, não são seguras para threads (not thread-safe) [SWS_DM_01136], [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143], [SWS_DM_01144].

O status de autenticação é mapeado por meio do tipo enumerado DiagnosticAuthState [SWS_DM_01133]:

  • kDeAuthenticated (0x00): Nenhum cliente de diagnóstico está autenticado. Na inicialização do sistema, o cliente encontra-se por padrão nesse estado [SWS_DM_01205]. Nesse caso, são considerados papéis padrão aqueles papéis (DiagnosticAuthRole) cujo atributo isDefault esteja configurado como TRUE [SWS_DM_01204], [SWS_DM_01134]. Por meio de OverrideDefaultRoles, esses papéis padrão podem ser sobrescritos temporariamente por um timeout definido [SWS_DM_01141], [SWS_DM_01209].
  • kAuthenticated (0x01): Um cliente de diagnóstico está autenticado. Esse estado é alcançado por meio da chamada de Authenticate, ativando os papéis de usuário transmitidos no Diagnostic Server [SWS_DM_01142], [SWS_DM_01206].

Uma transição automática de estado de kAuthenticated de volta para kDeAuthenticated é disparada quando um cliente na sessão padrão não envia mais solicitações após a última confirmação de transmissão (TransmitConfirmation) e o tempo de inatividade expira [SWS_DM_01210], ou quando ocorre um timeout S3 [SWS_DM_01144], [SWS_DM_02077].

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

Diagrama de estados: ciclo de vida e transições de estado da autenticação do cliente. Fontes: [SWS_DM_01133], [SWS_DM_01204], [SWS_DM_01205], [SWS_DM_01206], [SWS_DM_01209], [SWS_DM_01210]

Caminho de utilização

O fluxo regular para gerenciar a autenticação do cliente compreende as seguintes etapas:

  1. Registrar notificador: A aplicação registra, com SetNotifier, uma função de retorno de chamada do tipo ClientAuthenticationSetNotifier (std::function<void(DiagnosticAuthState)>) [SWS_DM_01144], [SWS_DM_02077]. Com isso, ela é informada quando ocorrerem mudanças de status – por exemplo, a transição para kDeAuthenticated por inatividade ou um timeout S3 [SWS_DM_01144]. Uma nova chamada sobrescreve o notificador definido anteriormente [SWS_DM_01144].
  2. Consultar estado: Por meio do método GetState(), a aplicação pode consultar de forma síncrona o estado de autenticação atual do cliente [SWS_DM_01143].
  3. Reportar autenticação: Assim que a autenticação tiver sido concluída com sucesso, a aplicação chama Authenticate com os papéis de usuário a serem ativados (ara::core::Vector<DiagnosticAuthRole>) [SWS_DM_01142], [SWS_DM_01134]. O Diagnostic Server define o estado como kAuthenticated e retorna um ClientAuthenticationHandle [SWS_DM_01206].
  4. Gerenciar direitos de acesso: por meio do ClientAuthenticationHandle obtido, a aplicação pode configurar a lista de acesso dinâmico (DynamicAccessList) para o cliente [SWS_DM_01213], SWS Diagnostics, p. 132. Ao mesmo tempo, o uso desse handle atualiza a janela de tempo de inatividade do cliente SWS Diagnostics, p. 133.

Se o cliente estiver no estado kDeAuthenticated, a aplicação poderá, em vez disso, chamar OverrideDefaultRoles(defaultRoles, timeout) para ativar temporariamente funções padrão alternativas; em caso de sucesso, essa chamada também retorna um ClientAuthenticationHandle [SWS_DM_01141], [SWS_DM_01209].

Sequência de autenticação e gerenciamento de permissõesApplicationClientAuthenticationDiagnosticServerSetNotifier(notifier)Result<void>Authenticate(userRoles)Definir status kAuthenticated e papéisBestaetigung & HandleResult<ClientAuthenticationHandle>optClient-Inaktivitaet in Standard-Session / S3-TimeoutWechsel zu kDeAuthenticatednotifier(kDeAuthenticated)

Diagrama de sequência: fluxo de chamadas e notificações durante a autenticação. Fontes: [SWS_DM_01142], [SWS_DM_01144], [SWS_DM_01206], [SWS_DM_01210]

Cenários de erro

Os métodos Authenticate, OverrideDefaultRoles e GetState fornecem seus valores de retorno encapsulados em ara::core::Result e são especificados como seguros contra exceções (exception safe), bem como noexcept [SWS_DM_01141], [SWS_DM_01142], [SWS_DM_01143]. Em caso de erro, é reportado o seguinte código de erro padronizado:

Para SetNotifier, não há códigos de erro padronizados definidos [SWS_DM_01144]. Como pré-condição essencial, OverrideDefaultRoles exige que o cliente esteja no estado kDeAuthenticated no momento da chamada [SWS_DM_01209].

Este guia baseia-se na especificação AUTOSAR Adaptive R25-11 (módulo diag) e foi criado para o autodocs.

Mapa de membros

Diagrama 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=()

Vista de detalhes

Selecione uma entrada no índice.

Construtores e destrutor

Move constructor of ClientAuthentication.

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

Destructor of ClientAuthentication.

~ClientAuthentication () noexcept;

Métodos

Authenticate função

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 função

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 função

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;

Operadores

operator= função 2

Move assignment operator of ClientAuthentication.

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

Aliases de tipo

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 tipo

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

using DiagnosticAuthRole = ara::core::String;

Enumerações

DiagnosticAuthState enumeração

Possible values of the Authentication State of the client.

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

Documentação dos métodos

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 06f87d723d7c Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Uso e chamada

A função ara::diag::ClientAuthentication::Authenticate é chamada por uma aplicação para comunicar à instância do Diagnostic Server a autenticação bem-sucedida de um cliente de diagnóstico [SWS_DM_01142]. Isso pode ocorrer após uma autenticação por meio das interfaces do Diagnostic Server ou por meio de mecanismos próprios da aplicação [SWS_DM_01142].

Como parâmetro de entrada, a função recebe userRoles (do tipo ara::core::Vector<DiagnosticAuthRole>). Em caso de chamada bem-sucedida, o status de autenticação da instância muda para kAuthenticated e as funções de usuário passadas são adotadas em definitivo [SWS_DM_01206]. Como valor de retorno, ela fornece um ara::core::Result<ClientAuthenticationHandle> [SWS_DM_01142]. Como um objeto Result é disponibilizado imediatamente, presume-se que o processamento ocorra de forma síncrona no contexto chamador. Pergunta Q-dae22c82694f2103 (aberta)

Tratamento de erros e simultaneidade

O método está declarado como noexcept e é considerado seguro contra exceções (exception safe) [SWS_DM_01142]. Se ocorrer um erro devido à indisponibilidade de funcionalidades fundamentais do Diagnostic Manager no momento da chamada, a operação falha com semântica de rollback e retorna DiagErrc::kServiceNotAvailable no objeto Result [SWS_DM_01142].

Em relação à concorrência, o método está expressamente especificado como not thread-safe [SWS_DM_01142]. Chamadas paralelas no mesmo objeto ClientAuthentication são, portanto, inadmissíveis e devem ser sincronizadas pela aplicação.

Zusammenspiel e ciclo de vida

O ClientAuthenticationHandle obtido permite à aplicação definir ou estender uma DynamicAccessList para o cliente autenticado [SWS_DM_01142]. Além disso, a chamada inicia ou referencia o monitoramento de inatividade do cliente: se, após uma autenticação bem-sucedida no estado de sessão padrão, nenhuma outra solicitação UDS ocorrer pela duração de authenticationTimeout, a instância do Diagnostic Server redefine automaticamente o cliente de volta para kDeAuthenticated [SWS_DM_01210]. Para prevenir este timeout, a aplicação pode atualizar o temporizador por meio do método Refresh do handle [SWS_DM_01155].

Este texto foi gerado por uma IA com base na especificação AUTOSAR.

Guia do implementador em breve (complexidade 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#5a6d0f32
Content hash
5a6d0f32
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

função 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#8f44b0d6
Content hash
8f44b0d6
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

função 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#28292b4b
Content hash
28292b4b
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

função 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#a0a6a72d
Content hash
a0a6a72d
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 4809043989e1 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

Com o método síncrono OverrideDefaultRoles da classe ara::diag::ClientAuthentication, uma aplicação pode sobrepor temporariamente as funções de autenticação padrão (defaultRoles) de um cliente de diagnóstico [SWS_DM_01141]. Os serviços de diagnóstico liberados para as funções passadas ficam disponíveis para o testador pelo período de tempo definido no parâmetro timeout [SWS_DM_01141]. O pré-requisito para isso é que o cliente esteja no estado kDeAuthenticated [SWS_DM_01209]. Interpretação: se a chamada não ocorrer no estado kDeAuthenticated, presume-se que a sobreposição de funções seja rejeitada ou permaneça sem efeito, uma vez que a especificação prescreve o comportamento exclusivamente para este estado inicial. Pergunta Q-81189f2c2fe0f301 (aberta)

Em caso de execução bem-sucedida, o método retorna uma instância de ClientAuthenticationHandle dentro de um ara::core::Result para a aplicação [SWS_DM_01141], [SWS_DM_01209]. Se a chamada não puder ser executada porque funcionalidades essenciais do Diagnostic Manager não estão disponíveis no momento, o código de erro DiagErrc::kServiceNotAvailable é retornado [SWS_DM_01141]. A função está declarada como noexcept e é segura contra exceções (exception safe) [SWS_DM_01141].

Para a concorrência e a interação com outros componentes aplicam-se as seguintes diretrizes:

  • Concorrência: O método está especificado como not thread-safe [SWS_DM_01141]. Chamadas paralelas na mesma instância devem ser sincronizadas pelo lado da aplicação.
  • Gerenciamento de handles: Por meio da instância retornada de ClientAuthenticationHandle, o temporizador em execução pode ser prolongado com Refresh() [SWS_DM_01155]. Além disso, o handle possibilita o gerenciamento da DynamicAccessList para recursos de diagnóstico adicionais AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 «ClientAuthenticationHandle».

Esta nota de uso foi criada automaticamente com base nas especificações AUTOSAR.

Guia do implementador em breve (complexidade 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#8bc677a8
Content hash
8bc677a8
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

função 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.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 19ea8e6c95d7 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

usar

O método [SWS_DM_01144] da classe ara::diag::ClientAuthentication serve para a aplicação registar uma função de callback do tipo ClientAuthenticationSetNotifier. Esta é chamada pela instância do Diagnostic Server assim que o estado de autenticação de um cliente se altera [SWS_DM_01144]. Isto permite à aplicação reagir imediatamente a mudanças de estado, por exemplo, quando ocorre uma transição automática para o estado kDeAuthenticated após um timeout de servidor S3 [SWS_DM_01211] ou ocorre um timeout devido a inatividade do cliente [SWS_DM_01210].

Tratamento de erros e valor de retorno

A função devolve um ara::core::Result<void> e está declarada como noexcept, bem como segura em termos de exceções (exception safe) [SWS_DM_01144]. Não estão especificados códigos de erro normalizados [SWS_DM_01144]; presumivelmente, o objeto Result fornece sempre sucesso (void) em funcionamento regular. Pergunta Q-0d7d43cc37d57944 (aberta)

Concorrência e interação

No que diz respeito à segurança entre threads, o método está especificado como «not thread-safe» [SWS_DM_01144]. As chamadas na mesma instância não devem, por conseguinte, ser realizadas de forma desprotegida a partir de threads concorrentes. Além disso, aplica-se um comportamento de sobreposição ao registo: uma nova chamada a SetNotifier substitui completamente o notificador anteriormente registado [SWS_DM_01144]. Este comportamento corresponde ao padrão de registo uniforme no Diagnostic Management, tal como definido analogamente para [SWS_DM_00615] (CancellationHandler), [SWS_DM_00745] (Indicator) e [SWS_DM_00755] (OperationCycle).

Esta nota de uso foi criada de forma automatizada com base na especificação AUTOSAR Adaptive R25-11.

Guia do implementador em breve (complexidade 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#805d761a
Content hash
805d761a
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

função 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#5d56cead
Content hash
5d56cead
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

função 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#c55b0794
Content hash
c55b0794
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

função ~ClientAuthentication [SWS_DM_01136] Upstream: RS_Diag_04251

~ClientAuthentication () noexcept;

Destructor of ClientAuthentication.

GERADO POR IA não revisado Modelo: gemini-3.8-flash-medium · Esforço: medium · Temperatura: não controlável · Prompt: 9da38c214c58 Procedência Perguntas em aberto (1)
traduzido do guia alemãogemini-3.8-flash-low · 2026-10-13 · Original em alemão

O destrutor [SWS_DM_01136] da classe ara::diag::ClientAuthentication serve para a libertação e o desmantelamento limpo de uma instância para autenticação de clientes no Diagnostic Management. A função está definida no ficheiro de cabeçalho #include "ara/diag/client_authentication.h" e é chamada de forma síncrona no fim do tempo de vida do objeto (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 «Destructor»).

Para a utilização e propriedades de execução aplicam-se as seguintes determinações:

  • Chamada e parâmetros: Como destrutor, ~ClientAuthentication() não possui parâmetros de entrada nem valor de retorno.
  • Segurança contra erros e exceções: A operação está especificada como noexcept e exception safe [SWS_DM_01136]; durante a destruição do objeto é garantido que não são lançadas quaisquer exceções.
  • Concorrência: A chamada está expressamente classificada como not thread-safe. Consequentemente, a destruição do objeto não pode ocorrer de forma concorrente a outras chamadas de métodos da mesma instância.

O elemento implementa o requisito upstream RS_Diag_04251 (AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 «Destructor»). Interpretação: antes de destruir a instância, os procedimentos ativos de autenticação ou de comunicação da aplicação deverão ter de ser terminados de forma ordenada, a fim de evitar comportamento indefinido resultante da falta de segurança de threads. Pergunta Q-cedd6f523eb2c1c3 (aberta)

Este texto foi gerado por uma IA e serve como nota editorial de utilização.

Guia do implementador em breve (complexidade 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#b5ecfd9d
Content hash
b5ecfd9d
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

Documentação das enumerações

enumeração 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#53b7607a
Content hash
53b7607a
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

Documentação dos aliases de tipo

alias de tipo 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#541588a8
Content hash
541588a8
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 tipo 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#965545ab
Content hash
965545ab
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