DEENESPTFRRUARHIKOZHNL

클래스 ara::shwa::DeviceSelector

Diese Seite wurde vollständig KI-generiert auf Basis von SWS Safe Hardware Acceleration (R25-11) — kein offizieller AUTOSAR-Text und keine automatisch extrahierte API-Seite wie die übrigen Module. Als Interpretation gekennzeichnete Aussagen sind Schlussfolgerungen aus den Quellen.

[AP_SWS_SHWA_00401] 문구 아직 가져오지 않음 Upstream: RS_SHWA_00006

class DeviceSelector {...};

Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.

Header-Datei#include "ara/shwa/device_selector.h"
Scopenamespace ara::shwa

사용자 가이드AI 생성

특정 선택 전략을 기반으로 장치를 평가하고 선택하기 위한 추상 인터페이스 역할을 합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 4c64c523c424 출처 열린 질문 (3)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

특정 선택 전략을 기반으로 장치를 평가하고 선택하기 위한 추상 인터페이스 역할을 합니다.

추상 클래스 ara::shwa::DeviceSelector은(는) 서브시스템 shwa에서 대상 장치를 평가하고 선택하기 위한 전략 인터페이스를 정의합니다. 이 클래스는 SelectDevice()을(를) 통해 최적의 장치를 직접 결정하고, operator()을(를) 통해 개별 장치 후보를 비교 평가할 수 있도록 합니다 [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404]. 가상 기본 소멸자는 파생 전략 인스턴스의 안전한 소멸을 보장합니다. 주요 제약 사항으로는 호출이 스레드 안전하지 않으며 실패 시 자동 롤백 시맨틱이 적용되지 않는다는 점이 있습니다.

컨텍스트

클래스 ara::shwa::DeviceSelector은(는) 특정 선택 전략을 기반으로 하드웨어 또는 기능 장치(Device)를 선택하거나 평가할 수 있도록 모듈 shwa에서 추상 인터페이스를 제공합니다. 이 클래스는 상위 제어 애플리케이션과 구체적인 선택 절차 사이의 디커플링 계층 역할을 합니다. 참여하는 상호작용 파트너로는 호출 애플리케이션, 선택 전략의 구체적 구현체 및 Device 타입의 대상 객체가 있습니다. 이 인터페이스는 두 가지 핵심 작업을 정의합니다. 즉, SelectDevice()을(를) 통한 장치의 직접 선택 [AP_SWS_SHWA_00403]과(와) 함수 호출 연산자 operator()을(를) 통한 장치의 비교 개별 평가입니다 [AP_SWS_SHWA_00404].

DeviceSelectorKontext Anwendung Anwendung DeviceSelector DeviceSelector Anwendung->DeviceSelector 사용 Device Device DeviceSelector->Device selektiert / bewertet

컨텍스트 다이어그램: 애플리케이션과 장치 대상 사이에서의 DeviceSelector 배치. 출처: [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404]

수명 주기

순수 가상 메서드를 갖는 추상 기본 클래스로서 DeviceSelector은(는) 직접 인스턴스화할 수 없습니다. 구체적인 선택 전략은 파생 클래스로 구현되어 애플리케이션 구성요소에 의해 생성될 것으로 보입니다. 질문 Q-4e22b2e57ef141e9 (열림) 소유권 관리는 일반적으로 std::unique_ptr<DeviceSelector>과(와) 같은 스마트 포인터를 통해 애플리케이션이 담당합니다. 특화된 클래스의 깔끔한 다형적 소멸을 위해 인터페이스는 가상 기본 소멸자 ~DeviceSelector()을(를) 선언합니다 [AP_SWS_SHWA_00402]. 이는 명시적으로 noexcept(으)로 지정되어 있어 인스턴스 해제 시 예외 안전성(exception safe) 요구사항을 충족합니다 [AP_SWS_SHWA_00402].

동시성 및 상태 전이와 관련하여, 인터페이스 작업들은 스레드 안전하지 않음(not thread-safe)(으)로 분류됩니다 [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404]. 멤버 함수들이 const(으)로 주석 처리되어 있더라도, 외부 동기화 없이 서로 다른 스레드에서 동일한 인스턴스에 동시 접근해서는 안 됩니다. 또한 사양에서는 오류가 발생한 호출에 대해 자동 롤백을 규정하지 않습니다(no_rollback_semantics) [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404].

사용 경로

일반적인 사용 흐름은 구체적인 전략 인스턴스의 초기화와 그에 이은 장치 후보의 평가 또는 선택으로 구성됩니다. 여기에는 두 가지 기본 호출 경로가 존재합니다:

  • 직접 장치 선택: 애플리케이션이 매개변수가 없는 메서드 SelectDevice()을(를) 호출합니다 [AP_SWS_SHWA_00403]. 구체적 전략은 가장 적합한 장치를 자율적으로 결정하고 ara::core::Result<Device>을(를) 반환합니다.
  • 반복적 개별 평가: 여러 후보를 필터링하거나 정렬하는 알고리즘의 경우, 애플리케이션은 각 인스턴스를 operator()(const Device &device)에 순차적으로 전달합니다 [AP_SWS_SHWA_00404]. operator()을(를) 통한 평가는 내부적으로 전달된 장치의 관련 속성이나 작동 상태를 분석할 것으로 보입니다. 질문 Q-8ba0b9b900196d50 (열림) 이때 ara::core::Result<int> 내에서 반환되는 int 값은 호출 측에서 선택 결정을 내리는 기준이 되는 적합성 지표 또는 우선순위를 반영할 것으로 보입니다.
디바이스 평가 및 선택을 위한 호출 시퀀스애플리케이션DeviceSelectorUse Case: 후보 디바이스 개별 평가operator()(device)altErfolgreiche AuswertungResult<int> (Bewertungswert)Ressource belegtShwaErrorCode::kResourceBusyUse Case: 직접 디바이스 선택SelectDevice()altErfolgreiche SelektionResult<Device>지원되지 않는 기능ShwaErrorCode::kFeatureNotSupported

시퀀스 다이어그램: 오류 처리를 포함한 개별 평가 및 직접 선택의 호출 시퀀스. 출처: [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404]

오류 시나리오

두 선택 메서드 모두 noexcept(으)로 선언되어 있으며 C++ 예외를 throw하지 않습니다(exception safe). 대신 ara::core::Result의 오류 채널을 통해 실패를 알립니다. 애플리케이션은 결과에 접근하기 전에 항상 반환값에 오류가 있는지 확인해야 합니다. SelectDevice() 및 operator()에 대해 다음과 같은 오류 상태가 정의되어 있습니다:

  • ShwaErrorCode::kResourceBusy: 필요한 리소스가 현재 사용 중이어서 요청된 작업을 실행할 수 없었습니다 [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404]. 이 경우 애플리케이션은 나중에 호출을 재시도하거나 대체 전략을 선택할 수 있습니다.
  • ShwaErrorCode::kFeatureNotSupported: 선택 또는 평가를 위해 요청된 기능이 기본 구현에서 지원되지 않을 때 반환됩니다 [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404].

롤백 시맨틱이 존재하지 않으므로(no_rollback_semantics) [AP_SWS_SHWA_00403], [AP_SWS_SHWA_00404], 오류 발생 시 시스템은 현재 상태로 유지되며 호출 측이 적절한 보상 조치를 취해야 합니다. 또한 operator()의 사전 조건으로, 전달된 장치 참조가 호출 전체 기간 동안 유효하게 유지되어야 합니다.

이 클래스 가이드는 AUTOSAR Adaptive R25-11 사양(shwa 모듈)을 기반으로 하며 자동화된 방식으로 큐레이션되었습니다.

멤버 맵

생성자 및 소멸자

1

메서드

1

연산자

1

상세 보기

개요에서 항목을 선택하세요.

생성자 및 소멸자

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

virtual ~DeviceSelector () noexcept=default;

메서드

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

virtual ara::core::Result< Device > SelectDevice () const noexcept=0;

연산자

operator() 함수

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

virtual ara::core::Result< int > operator() (const Device &device) const noexcept=0;

세부 정보

함수 ~DeviceSelector [AP_SWS_SHWA_00402] Upstream: RS_SHWA_00006

virtual ~DeviceSelector () noexcept=default;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::DeviceSelector
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00402
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00402@rel:R25-11#c93b3b85
Content hash
c93b3b85
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00402
Status: valid/unmigrated Version: rel:R25-11#8e9d36b4 Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00402@rel:R25-11#8e9d36b4
Point-in-Time History:
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

함수 SelectDevice [AP_SWS_SHWA_00403] Upstream: RS_SHWA_00006, RS_SHWA_00007

virtual ara::core::Result< Device > SelectDevice () const noexcept=0;

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

Scopeclass ara::shwa::DeviceSelector
Thread Safetynot thread-safe no_rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k FeatureNotSupported Used when a requested feature isn’t supported

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00403
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00403@rel:R25-11#8bed642a
Content hash
8bed642a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00403
Status: valid/unmigrated Version: rel:R25-11#83b7e520 Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00403@rel:R25-11#83b7e520
Point-in-Time History:
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

함수 operator() [AP_SWS_SHWA_00404] Upstream: RS_SHWA_00006, RS_SHWA_00007

virtual ara::core::Result< int > operator() (const Device &device) const noexcept=0;

Bewertet beziehungsweise selektiert ein Device entsprechend der Selektor-Strategie.

Scopeclass ara::shwa::DeviceSelector
Thread Safetynot thread-safe no_rollback_semantics ShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k FeatureNotSupported Used when a requested feature isn’t supported

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00404
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00404@rel:R25-11#b5680026
Content hash
b5680026
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00404
Status: valid/unmigrated Version: rel:R25-11#2bfa9942 Versionshistorie & Revisions (1 transition)
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/AP_SWS_SHWA_00404@rel:R25-11#2bfa9942
Point-in-Time History:
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