함수 Create [SWS_EM_02276] Upstream: RS_EM_00101, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00139, RS_AP_00144, RS_AP_00159
static ara::core::Result< StateClient > Create (std::function< void(const ara::exec::ExecutionErrorEvent &)> undefinedStateCallback) noexcept;
Named constructor for StateClient.
정적 팩토리 메서드 Create는 ara::exec::StateClient의 인스턴스를 생성하기 위한 네임드 생성자(Named Constructor) 역할을 합니다([SWS_EM_02276]). 필수 매개변수로 undefinedStateCallback이(가) 전달됩니다. 이 콜백은 기능 그룹이 예기치 않게(즉, SetState()을(를) 통한 사전 요청 없이) 정의되지 않은 상태로 전환될 때 클라이언트 라이브러리에 의해 트리거됩니다([SWS_EM_02276]). 이때 영향을 받는 기능 그룹과 오류는 ExecutionErrorEvent을(를) 통해 콜백으로 전달됩니다.
호출 컨텍스트 및 수명과 관련하여 다음과 같은 고정된 제약 조건이 적용됩니다:
- 이 함수는 thread-safe, exception-safe하며
noexcept(으)로 선언되어 있습니다([SWS_EM_02276]). - 전달된
undefinedStateCallback은(는) 생성된StateClient인스턴스의 전체 수명 동안 호출 가능한 상태를 유지해야 합니다([SWS_EM_02276]). 이는 (예를 들어std::bind을(를) 통한) 객체 인스턴스로의 바인딩 시 각별한 주의를 필요로 합니다.
인스턴스화는 동기식으로 수행되며 ara::core::Result<StateClient>을(를) 반환합니다([SWS_EM_02276]). 오류 발생 시 다음과 같은 오류 코드가 정의되어 있습니다:
ara::exec::ExecErrc::kInvalidArgument: 전달된 인수에 호출 가능한 함수가 포함되어 있지 않을 때 보고됩니다(롤백 시맨틱, 유효한 함수를 제공하여 해결)([SWS_EM_02276]).ara::exec::ExecErrc::kNoCommunication: 통신 오류를 알립니다(No-Rollback 시맨틱, 재시도를 통해 해결)([SWS_EM_02276]). 이는 실행 환경과의 연결 설정 실패에 기인한 것으로 보입니다. 질문 Q-c312c2b5e7c3c7d0 (열림)
이 생성 패턴은 네임드 생성자를 통해 필수 콜백과 함께 생성되는 ara::exec::ExecutionClient([SWS_EM_02562])과 같은 관련 실행 클라이언트의 초기화 접근 방식과 구조적으로 일치합니다.
이 사용 지침은 AUTOSAR R25-11 사양 데이터를 기반으로 자동 생성되었습니다.
구현자 가이드 준비 중 (복잡도 I1)
| Header-Datei | #include "ara/exec/state_client.h" |
|---|---|
| Scope | class ara::exec::StateClient |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| undefinedStateCallback | callback to be invoked by StateClient library if a FunctionGroup changes its state unexpectedly to an Undefined Function Group State, i.e. without previous request by SetState(). The affected FunctionGroup and ExecutionError is provided as an argument to the callback in form of ExecutionErrorEvent. Lifetime: it is expected that undefinedStateCallback remains callable, during entire lifetime of the StateClient instance. This is especially important if, undefinedStateCallback is bound to an instance of a class (e.g. using std::bind). |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< StateClient > | a result that contains either a StateClient object or an error. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| ara::exec::ExecErrc::kNoCommunication | no_rollback_semantics Communication error occurred. Recovery: try again |
| ara::exec::ExecErrc::kInvalidArgument | rollback_semantics Given undefinedStateCallback doesn’t contain a callable function. Recovery: change argument |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_EM_02276- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_EM_02276@rel:R25-11#85ed8639- Content hash
85ed8639- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02276
Status: valid/unmigrated
Version: rel:R25-11#e0c84a0f
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_EM_02276@rel:R25-11#e0c84a0f
Recorded Revisions (8):
- R25-11
rel:R25-11#4f8bba6e2026-09-30 - R19-11
rel:R19-11#de12c8242026-10-14 - R20-11
rel:R20-11#e48137012026-10-14 - R21-11
rel:R21-11#656a7fe92026-10-14 - R22-11
rel:R22-11#76c30edc2026-10-14 - R23-11
rel:R23-11#7c0d72972026-10-14 - R24-11
rel:R24-11#924d8c912026-10-14 - R25-11
rel:R25-11#e0c84a0f2026-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 · 독일어 원문