DEENESPTFRRUARHIKOZHNL

نطاق أسماء apext::diag::uds_transport

دليل المستخدممولَّد بالذكاء الاصطناعي

يُستخدم للربط المعياري وإدارة بروتوكولات نقل UDS الخارجية في إدارة التشخيص.
مُولَّد بالذكاء الاصطناعي غير مُراجَع النموذج: gemini-3.8-flash-medium · الجهد: medium · درجة الحرارة: غير قابل للتحكم · الموجّه: ce8b113ec3f5 المصدر أسئلة مفتوحة (1)
مترجم من الدليل الألمانيgemini-3.8-flash-low · 2026-10-13 · الأصل الألماني

يُستخدم للربط المعياري وإدارة بروتوكولات نقل UDS الخارجية في إدارة التشخيص.

يوفر نطاق الأسماء apext::diag::uds_transport واجهة نقل C++‎ لفصل إدارة التشخيص العامة عن بروتوكولات نقل UDS المحددة AUTOSAR_AP_SWS_Diagnostics §7.1 «UDS Transport Layer». تشتق المكونات الإضافية للبروتوكول من الفئة الأساسية UdsTransportProtocolHandler وتمر بدورة حياة صارمة تتكون من الإنشاء والتهيئة والبدء والإيقاف المنظم [SWS_DM_00329]. يتم الإبلاغ عن الرسائل الواردة عبر IndicateMessage وتحصل في حالة وجود سعات فارغة على UdsMessagePtr مُدار الذاكرة لاستلام البيانات المفيدة. ومن القيود الأساسية أنه بعد الإيقاف لا يجوز إجراء أي استدعاءات أخرى لإدارة التشخيص باستثناء رسالة التأكيد.

السياق

يحدد نطاق الأسماء apext::diag::uds_transport واجهة النقل القياسية لـ C++‎‏ (Transport Protocol API) لإدارة التشخيص (DM) في AUTOSAR Adaptive Platform AUTOSAR_AP_SWS_Diagnostics §7.1 «UDS Transport Layer». تفصل البنية المعمارية النواة العامة لإدارة التشخيص وظيفيًا عن طبقات الشبكة والنقل المحددة. وبهذه الطريقة، يمكن دمج البروتوكولات القياسية مثل DoIP وكذلك بروتوكولات النقل المستقبلية أو الخاصة بالشركة المصنعة (على سبيل المثال لـ CAN أو CAN-FD أو FlexRay) كمكونات إضافية معيارية AUTOSAR_AP_SWS_Diagnostics §7.1 «UDS Transport Layer».

تمثل الفئة UdsTransportProtocolMgr كيان الوساطة المركزي، الذي ينسق التفاعل بين حالات Diagnostic Server وبروتوكولات النقل المتصلة. تشتق المكونات الإضافية المحددة للبروتوكول من الفئة الأساسية المجردة UdsTransportProtocolHandler AUTOSAR_AP_SWS_Diagnostics §7.1.1 «Support of UDS Transport Layer» [SWS_DM_00315]. يتم عنونة حالات المعالج الفردية عبر UdsTransportProtocolHandlerID [SWS_DM_00336]، بينما يتم تحديد قنوات الاتصال عبر النوع ChannelID [SWS_DM_00337]. ولدعم الاستعلامات الدورية عن البيانات وفقًا لخدمة ISO رقم 0x2A، تدمج الواجهة أيضًا الفئة UdsTransportProtocolPeriodicHandler.

دورة الحياة

تتحكم إدارة التشخيص في دورة حياة كل حالة من UdsTransportProtocolHandler بترتيب محدد بدقة [SWS_DM_00329]:

  1. الإنشاء: تُنشئ DM حالة للمكون الإضافي للبروتوكول عبر منشئ الكائن UdsTransportProtocolHandler::UdsTransportProtocolHandler [SWS_DM_00329].
  2. التهيئة: تستدعي DM الدالة UdsTransportProtocolHandler::Initialize [SWS_DM_00329]. باستثناء الاستعلام عن GetPeriodicHandler، لا يجوز لـ DM استدعاء أي طرق أخرى على المعالج قبل الإرجاع الناجح لـ kInitializeOk [SWS_DM_01746].
  3. البدء والتشغيل: بعد التهيئة الناجحة، يتم تنشيط المعالج باستخدام UdsTransportProtocolHandler::Start. بعد هذا الاستدعاء فقط، تعالج DM الرسائل المتعلقة بالقنوات المعاد تنشيطها عبر UdsTransportProtocolMgr::ChannelReestablished [SWS_DM_01744].
  4. الإنهاء: إذا انتقل DM إلى الحالة ApplicationState.kTerminating، فإنه يستدعي UdsTransportProtocolHandler::Stop لجميع الملحقات النشطة [SWS_DM_00333]. بعد العودة من هذا الاستدعاء، لا يُسمح للملحق إلا باستدعاء UdsTransportProtocolMgr::HandlerStopped حصريًا [SWS_DM_01741]. ينتظر DM هذا التأكيد بصورة نشطة [SWS_DM_00340].
handler_lifecycle NichtInitialisiert NichtInitialisiert Initialisierend Initialisierend NichtInitialisiert->Initialisierend Konstruktor Initialisiert Initialisiert Initialisierend->Initialisiert Initialize() -> kInitializeOk Fehlgeschlagen Fehlgeschlagen Initialisierend->Fehlgeschlagen Initialize() -> kInitializeFailed Gestartet Gestartet Initialisiert->Gestartet Start() Stoppend Stoppend Gestartet->Stoppend Stop() عند kTerminating Gestoppt Gestoppt Stoppend->Gestoppt HandlerStopped()

مخطط الحالة: مراحل دورة الحياة وشروط الانتقال لتنفيذ معالج بروتوكول النقل. المصادر: [SWS_DM_00329]، [SWS_DM_00333]، [SWS_DM_00340]، [SWS_DM_01741]، [SWS_DM_01744]، [SWS_DM_01745]، [SWS_DM_01746]

مسار الاستخدام

أثناء التشغيل الفعلي، تتم إعادة توجيه رسائل التشخيص الواردة عبر تفاعل منسق بين المعالج والمدير:

  1. إشارة الرسالة: إذا استقبل المعالج بيانات على إحدى القنوات (ChannelID [SWS_DM_00337])، فإنه يستدعي UdsTransportProtocolMgr::IndicateMessage. ويمكنه في هذه الأثناء تمرير حمولة أولية في payloadInfo؛ ويُوصى بما لا يقل عن أول بايتين للتعرف المبكر على الطلبات الوظيفية AUTOSAR_AP_SWS_Diagnostics §7.1 «UDS Transport Layer».
  2. تخصيص المخزن المؤقت: إذا كان DM جاهزًا للاستقبال، فإن IndicateMessage يرد بـ std::pair من IndicationResult::kIndicationOk وبمؤشر ذكي صالح UdsMessagePtr [SWS_DM_00309] [SWS_DM_00385]. يمتلك كائن UdsMessage المشار إليه سعة لا تقل عن بايت واحد [SWS_DM_00385]. يُدار المخزن المؤقت كـ std::unique_ptr مع مخصص حذف محدد لنواة DM وهو ليس آمنًا بالنسبة للخيوط [SWS_DM_00303]. لعمليات الوصول للقراءة، يتوفر المكافئ الثابت UdsMessageConstPtr [SWS_DM_00304].
  3. تسليم البيانات: يكتب المعالج بيانات التشخيص المستلمة في المخزن المؤقت المقدم، والذي يُحدد تسلسل بايتاته عبر النوع ByteSpan (اسم مستعار لـ ara::core::Span<ara::core::Byte> [SWS_DM_00338]). يُفترض أن توفير الفئة المنفصلة UdsTransportProtocolPeriodicHandler عبر GetPeriodicHandler يهدف إلى فك ارتباط خدمة النقل الدوري 0x2A عن مسار رسائل UDS العادي. سؤال Q-230ef0b7c384c594 (مفتوح)
تسلسل الإشارة إلى رسائل UDSHandlerUdsTransportProtocolMgrDM-KernIndicateMessage(channelId, payloadInfo)فحص حالة الخادم والمواردaltDM bereitAllokiere UdsMessagereturn pair(kIndicationOk, UdsMessagePtr)Kopiere Nutzdaten in ByteSpanDM belegtreturn pair(kIndicationOccupied, nullptr)

مخطط التتابع: مسار إشارة الرسالة وتخصيص المخزن المؤقت بين المعالج والمدير ونواة DM. المصادر: AUTOSAR_AP_SWS_Diagnostics §7.1 «UDS Transport Layer»، [SWS_DM_00303]، [SWS_DM_00309]، [SWS_DM_00385]، [SWS_DM_00386]

سيناريوهات الأخطاء

تحدد المواصفة حالات خطأ وشروطًا مسبقة محددة لاتصال النقل:

  • فشل التهيئة: إذا أرجع UdsTransportProtocolHandler::Initialize النتيجة kInitializeFailed، يقوم DM على الفور بإلغاء عملية التهيئة لهذا المعالج ولا يستدعي أي دوال إضافية عليه [SWS_DM_01745].
  • الرفض عند انشغال نواة التشخيص: إذا كان DM محجوبًا بسبب معالجة خدمة جارية لنفس محادثة Tester-Present ولم تكن Tester-Present وظيفية بـ payloadInfo 0x3E 0x80، يُرجع IndicateMessage النتيجة kIndicationOccupied مع nullptr بدلاً من مخزن الرسائل المؤقت [SWS_DM_00386].
  • استدعاءات غير مسموح بها بعد الإنهاء: إذا استدعى ملحقٌ دالةً أخرى من UdsTransportProtocolMgr غير HandlerStopped بعد العودة من Stop، فإن ذلك ينتهك متطلبات البروتوكول [SWS_DM_01741]. وبالمثل، يتجاهل DM إشارات مثل ChannelReestablished إذا وردت قبل الاستدعاء الناجح لـ Start [SWS_DM_01744].

يستند هذا الدليل حصريًا إلى مواصفات AUTOSAR Adaptive Platform الإصدار R25-11.

خريطة المواضيع

KI-gestützte Gruppierung auf Basis der Records und Spezifikationsauszüge; keine Gliederung aus der AUTOSAR-Spezifikation.

مخطط الفئة

Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.

G cluster_ns apext::diag::uds_transport napext__diag__uds_transport__UdsMessage UdsMessage napext__diag__uds_transport__UdsTransportProtocolHandler UdsTransportProtocolHandler napext__diag__uds_transport__UdsTransportProtocolMgr UdsTransportProtocolMgr napext__diag__uds_transport__UdsTransportProtocolPeriodicHandler UdsTransportProtocolPeriodicHandler

عرض التفاصيل

اختر عنصرًا من المخطط.

Nachrichtendaten

UdsMessage فئة

class represents an UDS message exchanged between DM generic core (UdsTransport ProtocolMgr) and a specific implementation of UdsTransportPr

ByteSpan اسم نوع بديل

This is the type of ByteSpan.

using ByteSpan = ara::core::Span<ara::core::Byte>;
UdsMessageConstPtr اسم نوع بديل

This is the unique_ptr for constant UdsMessages containing a custom deleter as provided by the generic/core DM part towards the UdsTransportLayer-Plugin.

using UdsMessageConstPtr = std::unique_ptr<const UdsMessage, std::function<void(const UdsMessage*)>>;
UdsMessagePtr اسم نوع بديل

This is the unique_ptr for UdsMessages containing a custom deleter as provided by the generic/ core DM part towards the UdsTransportLayer-Plugin.

using UdsMessagePtr = std::unique_ptr<UdsMessage, std::function<void(UdsMessage*)>>;

Protokoll-Plugins

Abstract Class, which a specific UDS Transport Protocol (plugin) shall subclass.

UdsTransportProtocolPeriodicHandler class to support 0x2A service from ISO.

UdsTransportProtocolHandlerID اسم نوع بديل

UdsTransportProtocolHandler are flexible "plugins", which need an identification.

using UdsTransportProtocolHandlerID = std::uint8_t;

Protokollverwaltung

The UdsTransportProtocolMgr class manages the interaction between the Diagnostic Server instance(s) and various UDS Transport Protocols (e.g

ChannelID اسم نوع بديل

This is the identification of channel on which to transmit.

using ChannelID = std::uint32_t;

أسماء الأنواع البديلة

اسم نوع بديل ByteSpan [SWS_DM_00338] Upstream: RS_Diag_04147

using ByteSpan = ara::core::Span<ara::core::Byte>;

This is the type of ByteSpan.

Header-Datei#include "apext/diag/uds_transport/protocol_types.h"
Scopenamespace apext::diag::uds_transport
SymbolByteSpan

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

Record
AUTOSAR/AP/record/SWS_DM_00338
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00338@rel:R25-11#8cf01c67
Content hash
8cf01c67
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00338
Status: valid/unmigrated Version: rel:R25-11#1a041728 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_00338@rel:R25-11#1a041728
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3f6b4b552026-09-30
  • R19-11rel:R19-11#87b9aa052026-10-14
  • R20-11rel:R20-11#280ab9cb2026-10-14
  • R21-11rel:R21-11#280ab9cb2026-10-14
  • R22-11rel:R22-11#21aad9862026-10-14
  • R23-11rel:R23-11#a3af51d32026-10-14
  • R24-11rel:R24-11#1a0417282026-10-14
  • R25-11rel:R25-11#1a0417282026-10-14 active
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

اسم نوع بديل ChannelID [SWS_DM_00337] Upstream: RS_Diag_04147

using ChannelID = std::uint32_t;

This is the identification of channel on which to transmit.

Header-Datei#include "apext/diag/uds_transport/protocol_types.h"
Scopenamespace apext::diag::uds_transport
SymbolChannelID

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

Record
AUTOSAR/AP/record/SWS_DM_00337
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00337@rel:R25-11#c0f64ff8
Content hash
c0f64ff8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00337
Status: valid/unmigrated Version: rel:R25-11#1d8116d5 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_00337@rel:R25-11#1d8116d5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a89726192026-09-30
  • R19-11rel:R19-11#a09308352026-10-14
  • R20-11rel:R20-11#6bf394982026-10-14
  • R21-11rel:R21-11#6bf394982026-10-14
  • R22-11rel:R22-11#1855826a2026-10-14
  • R23-11rel:R23-11#3d08977c2026-10-14
  • R24-11rel:R24-11#1d8116d52026-10-14
  • R25-11rel:R25-11#1d8116d52026-10-14 active
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

اسم نوع بديل UdsMessageConstPtr [SWS_DM_00304] Upstream: RS_Diag_04147

using UdsMessageConstPtr = std::unique_ptr<const UdsMessage, std::function<void(const UdsMessage*)>>;

This is the unique_ptr for constant UdsMessages containing a custom deleter as provided by the generic/core DM part towards the UdsTransportLayer-Plugin.

Header-Datei#include "apext/diag/uds_transport/uds_message.h"
Scopenamespace apext::diag::uds_transport
SymbolUdsMessageConstPtr
Thread-Sicherheitnot thread-safe
Hinweise: How the exact typedef for UdsMessageConstPtr looks like, is up to the DM product vendor. I.e. how f.i. the deleter signature looks like ... basically the minimal agreement is: UdsMessage ConstPtr shall behave like a std::unique_ptr<const UdsMessage>!

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

Record
AUTOSAR/AP/record/SWS_DM_00304
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00304@rel:R25-11#3b494f89
Content hash
3b494f89
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00304
Status: valid/unmigrated Version: rel:R25-11#cbe7d8ab 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_00304@rel:R25-11#cbe7d8ab
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8e4075282026-09-30
  • R19-11rel:R19-11#f70a6f152026-10-14
  • R20-11rel:R20-11#70977a452026-10-14
  • R21-11rel:R21-11#70977a452026-10-14
  • R22-11rel:R22-11#3632365b2026-10-14
  • R23-11rel:R23-11#ee76163c2026-10-14
  • R24-11rel:R24-11#6389682c2026-10-14
  • R25-11rel:R25-11#cbe7d8ab2026-10-14 active
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

اسم نوع بديل UdsMessagePtr [SWS_DM_00303] Upstream: RS_Diag_04147

using UdsMessagePtr = std::unique_ptr<UdsMessage, std::function<void(UdsMessage*)>>;

This is the unique_ptr for UdsMessages containing a custom deleter as provided by the generic/ core DM part towards the UdsTransportLayer-Plugin.

Header-Datei#include "apext/diag/uds_transport/uds_message.h"
Scopenamespace apext::diag::uds_transport
SymbolUdsMessagePtr
Thread-Sicherheitnot thread-safe
Hinweise: How the exact typedef for UdsMessagePtr looks like, is up to the DM product vendor. I.e. how f.i. the deleter signature looks like ... basically the minimal agreement is: UdsMessagePtr shall behave like a std::unique_ptr<UdsMessage>!

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

Record
AUTOSAR/AP/record/SWS_DM_00303
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00303@rel:R25-11#a1264793
Content hash
a1264793
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00303
Status: valid/unmigrated Version: rel:R25-11#6be645e6 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_00303@rel:R25-11#6be645e6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b75a0d132026-09-30
  • R19-11rel:R19-11#401203282026-10-14
  • R20-11rel:R20-11#a5dd04072026-10-14
  • R21-11rel:R21-11#a5dd04072026-10-14
  • R22-11rel:R22-11#812335462026-10-14
  • R23-11rel:R23-11#057e29102026-10-14
  • R24-11rel:R24-11#fb6c8d462026-10-14
  • R25-11rel:R25-11#6be645e62026-10-14 active
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

اسم نوع بديل UdsTransportProtocolHandlerID [SWS_DM_00336] Upstream: RS_Diag_04147, RS_Diag_04168

using UdsTransportProtocolHandlerID = std::uint8_t;

UdsTransportProtocolHandler are flexible "plugins", which need an identification.

Header-Datei#include "apext/diag/uds_transport/protocol_types.h"
Scopenamespace apext::diag::uds_transport
SymbolUdsTransportProtocolHandlerID

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

Record
AUTOSAR/AP/record/SWS_DM_00336
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00336@rel:R25-11#fa83a7d5
Content hash
fa83a7d5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00336
Status: valid/unmigrated Version: rel:R25-11#dbbb3100 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_00336@rel:R25-11#dbbb3100
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#44559d542026-09-30
  • R19-11rel:R19-11#d727dd482026-10-14
  • R20-11rel:R20-11#7d7439fe2026-10-14
  • R21-11rel:R21-11#7d7439fe2026-10-14
  • R22-11rel:R22-11#c079e14d2026-10-14
  • R23-11rel:R23-11#d98d683b2026-10-14
  • R24-11rel:R24-11#dbbb31002026-10-14
  • R25-11rel:R25-11#dbbb31002026-10-14 active
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