함수 CompareKey [SWS_DM_00765] Upstream: RS_AP_00138, RS_Diag_04005, RS_Diag_04170, RS_AP_00119
virtual ara::core::Future< KeyCompareResultType > CompareKey (ara::core::Span< const std::uint8_t > key, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;
This method is called, when a diagnostic request has been finished, to notify about the outcome.
사용
클래스 ara::diag::SecurityAccess[SWS_DM_00765]의 순수 가상 메소드 CompareKey은(는) UDS 서비스 0x27 (SecurityAccess)에서 클라이언트가 전송한 키를 검증하기 위해 애플리케이션 측에 구현됩니다SWS Diagnostics §7.3.2.8.9 “Service 0x27 – SecurityAccess”. 이는 GetSeed와(과) 함께 ISO 14229-1에 따른 정적 시드-키 메커니즘의 기반을 형성합니다[SWS_DM_00863].
함수의 파라미터는 다음을 포함합니다:
key: 검사할 키 데이터에 대한ara::core::Span<const std::uint8_t>입니다. 이 버퍼는 연관된 Promise가 충족되거나 실행이cancellationHandler을(를) 통해 취소될 때까지 유효하게 유지됩니다[SWS_DM_00765].metaInfo: 수신 진단 요청의 메타 정보입니다[SWS_DM_00765].cancellationHandler:cancellationHandler.IsCanceled을(를) 통한 취소 확인 및 대화 취소 시cancellationHandler.SetNotifier을(를) 통한 알림 함수 등록을 가능하게 합니다[SWS_DM_00765].
검사 결과는 ara::core::Future<KeyCompareResultType>을(를) 통해 비동기식으로 제공됩니다[SWS_DM_00765].
오류 처리 및 상호 작용
키 비교에 실패하거나 처리 중 오류가 발생하면, DiagUdsNrcErrc을(를) 통해 ISO 14229-1에 따른 적절한 Negative Response Code (NRC)가 Future를 통해 전달되어야 합니다[SWS_DM_00765]. 요청된 서브기능이 CompareKey에 대해 구성되지 않은 경우, 요청은 NRC 0x12(kSubFunctionNotSupported)(으)로 응답됩니다[SWS_DM_00363]. Diagnostic Server는 실패한 시도 횟수를 계산하고[SWS_DM_00270] 이를 임계값과 비교합니다[SWS_DM_00271].
보안 접근이 성공적으로 승인되면 서버는 내부적으로 보안 레벨을 업데이트하고[SWS_DM_00846], 실패 시도 카운터를 재설정하며[SWS_DM_00270], 보안 이벤트 SEV_UDS_SECURITY_ACCESS_SUCCESSFUL을(를) IdsM에 보고합니다[SWS_DM_02019].
동시성 및 제약사항
이 인터페이스는 noexcept(으)로 선언되어 있으며 예외 안전(exception safe)합니다[SWS_DM_00765]. 스레드 안전성은 조건부(conditional)입니다. 구현이 스레드 안전해야 하는지 여부는 SecurityAccess의 생성자에서 전달된 ConcurrencyType을(를) 통해 결정됩니다[SWS_DM_00765].
이 사용 지침은 AUTOSAR 사양을 기반으로 AI에 의해 생성되었습니다.
구현자 가이드 준비 중 (복잡도 I2)
| Header-Datei | #include "ara/diag/security_access.h" |
|---|---|
| Scope | class ara::diag::SecurityAccess |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| key | The key to be validated. Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler. |
| metaInfo | MetaInfo of the request. |
| cancellationHandler | This parameter is used to • Query the current cancellation status by calling cancellationHandler.IsCanceled. Returns TRUE in case, the current conversation has been cancelled and FALSE otherwise. • Register a notifier function by calling cancellationHandler.SetNotifier. The registered notifier is called if the current conversation is cancelled. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Future< KeyCompareResultType > | Result of the key validation. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc. | |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_DM_00765- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_DM_00765@rel:R25-11#4cfacae6- Content hash
4cfacae6- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00765
Status: valid/unmigrated
Version: rel:R25-11#fcff65aa
Versionshistorie & Revisions (1 transition, 8 revision)
- Current State
valid/unmigrated- Reason
- mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
- Campaign
2026-08-13-status-backfill- Active Version
AUTOSAR/AP/record/SWS_DM_00765@rel:R25-11#fcff65aa
Recorded Revisions (8):
- R25-11
rel:R25-11#d4d3823f2026-09-30 - R19-11
rel:R19-11#4bf18d9e2026-10-14 - R20-11
rel:R20-11#52ff58612026-10-14 - R21-11
rel:R21-11#42d7f4462026-10-14 - R22-11
rel:R22-11#94736e912026-10-14 - R23-11
rel:R23-11#cbc123ea2026-10-14 - R24-11
rel:R24-11#e09a76d52026-10-14 - R25-11
rel:R25-11#fcff65aa2026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문