함수 Create [SWS_EM_02562] Upstream: RS_AP_00119, RS_AP_00120, RS_AP_00128, RS_AP_00139, RS_AP_00144, RS_EM_00103, RS_AP_00159
static ara::core::Result< ExecutionClient > Create (std::function< void()> terminationHandler) noexcept;
Named constructor for ExecutionClient.
정적 함수 Create은(는) ara::exec::ExecutionClient의 인스턴스화를 위한 Named Constructor 역할을 합니다 [SWS_EM_02562]. 호출 시 콜백 terminationHandler(std::function<void()> 타입)이 전달되며, 이는 SIGTERM 신호가 도달할 때 백그라운드 스레드에서 동시에 실행됩니다 [SWS_EM_02562]. 일반적으로 이 콜백은 전역 플래그를 설정하거나 차단된 스레드를 깨워 정상적인 종료(graceful termination)를 시작합니다. 호출자는 ExecutionClient 인스턴스의 전체 수명 동안 핸들러가 호출 가능한 상태로 유지되도록 보장해야 하며, 이는 특히 std::bind을(를) 통한 객체 인스턴스 바인딩 시 주의해야 합니다 [SWS_EM_02562].
반환값으로 이 함수는 생성된 인스턴스 또는 오류 코드를 포함하는 ara::core::Result<ExecutionClient>을(를) 반환합니다 [SWS_EM_02562]. 생성이 실패할 경우 두 가지 특정 오류가 정의되어 있습니다:
ara::exec::ExecErrc::kInvalidArgument: 전달된terminationHandler에 호출 가능한 함수가 포함되어 있지 않습니다(롤백 시맨틱; 유효한 Callable 전달을 통해 해결) [SWS_EM_02562].ara::exec::ExecErrc::kNoCommunication: 통신 오류가 발생했습니다(롤백 시맨틱 없음; 재시도를 통해 해결) [SWS_EM_02562].
이 함수는 noexcept(으)로 선언되어 있으며, Exception-safe 및 Thread-safe로 간주되고 내부적으로 개발자 정의 생성자를 호출할 수 있습니다 [SWS_EM_02562]. 해석: 이 호출은 일반적으로 메인 워크로드가 시작되기 전에 신호 처리를 적시에 설정하기 위해 프로세스의 초기화 단계 초기에 발생할 것으로 추정됩니다. 질문 Q-555aea895feb2123 (열림) 콜백 등록을 포함하는 이러한 Named Constructor 패턴은 자체 Create 함수를 통한 StateClient의 생성과 상응합니다 [SWS_EM_02276].
이 텍스트는 사양 데이터를 바탕으로 AI 시스템에 의해 생성되었습니다.
| Header-Datei | #include "ara/exec/execution_client.h" |
|---|---|
| Scope | class ara::exec::ExecutionClient |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| terminationHandler | Callback which is called if ExecutionClient receives SIGTERM signal. The callback is executed in a background thread. A typical implementation of this callback will set a global flag (and potentially unblock other threads) to perform a graceful termination. Lifetime: it is expected that terminationHandler remains callable, during entire lifetime of the ExecutionClient instance. This is especially important if, terminationHandler is bound to an instance of a class (e.g. using std::bind). |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<ExecutionClient > | a result that contains either a ExecutionClient 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 terminationHandler 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_02562- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_EM_02562@rel:R25-11#1c4b9430- Content hash
1c4b9430- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02562
Status: valid/unmigrated
Version: rel:R25-11#446bd257
Versionshistorie & Revisions (1 transition, 4 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_02562@rel:R25-11#446bd257
Recorded Revisions (4):
- R25-11
rel:R25-11#b09af1042026-09-30 - R23-11
rel:R23-11#10b43bed2026-10-14 - R24-11
rel:R24-11#7ed2aeda2026-10-14 - R25-11
rel:R25-11#446bd2572026-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 · 독일어 원문