फ़ंक्शन 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 को इंस्टेंटिएट करने के लिए एक नेम्ड कंस्ट्रक्टर के रूप में कार्य करता है [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में कोई कॉल करने योग्य फ़ंक्शन शामिल नहीं है (रोलबैक सेमांटिक्स; एक वैध कॉल करने योग्य पास करके समाधान) [SWS_EM_02562]।ara::exec::ExecErrc::kNoCommunication: एक संचार त्रुटि हुई है (कोई रोलबैक सेमांटिक्स नहीं; पुनः प्रयास करके समाधान) [SWS_EM_02562]।
फ़ंक्शन को noexcept के रूप में घोषित किया गया है, इसे Exception-safe और Thread-safe माना जाता है, और यह आंतरिक रूप से डेवलपर-परिभाषित कंस्ट्रक्टर को कॉल कर सकता है [SWS_EM_02562]। व्याख्या: मुख्य कार्यभार शुरू होने से पहले सिग्नल हैंडलिंग को समय पर सेट करने के लिए कॉल आमतौर पर किसी प्रक्रिया के प्रारंभिक आरंभीकरण चरण के दौरान की जा सकती है। प्रश्न Q-555aea895feb2123 (खुला) कॉलबैक पंजीकरण के साथ नेम्ड कंस्ट्रक्टर का यह पैटर्न इसके अपने 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#a8d139d3- Content hash
a8d139d3- 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 · जर्मन मूल