结构体 ara::diag::GenericRoutine::OperationOutput
[SWS_DM_00551] Upstream: RS_Diag_04169, RS_Diag_04224
struct OperationOutput {...};
Response data of positive respose message.
| Header-Datei | #include "ara/diag/generic_routine.h" |
|---|
| Forwarding-Header | #include "ara/diag/diag_fwd.h" |
|---|
| Scope | class ara::diag::GenericRoutine |
|---|
用户指南人工智能生成
用于在通用例程服务成功响应时接收并返回有效负载数据。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: d9df3888892f
来源
未决问题(3)
用于在通用例程服务成功响应时接收并返回有效负载数据。
结构体 ara::diag::GenericRoutine::OperationOutput 在 AUTOSAR Adaptive [SWS_DM_00633] 中用作通用例程服务肯定响应消息的返回结构体。在成功执行例程后,应用程序实例化该结构体,并用结果的有效负载数据填充成员 responseData SWS Diagnostics 第80页。一个重要的约束条件是,向量 responseData 仅包含纯结果数据,且显式不得包含 RoutineIdentifier [SWS_DM_00633]。
上下文
结构体 ara::diag::GenericRoutine::OperationOutput 在 AUTOSAR Adaptive 的诊断模块中用作通用例程服务肯定响应消息的专用数据容器 [SWS_DM_00633]。它可通过头文件 ara/diag/generic_routine.h 获取 [SWS_DM_00633],并封装了自适应诊断应用程序在成功处理例程后返回给诊断管理(ara::diag)的有效负载数据。主要有三个实体参与交互:作为例程请求发送方的外部诊断仪、用于协议处理的平台框架 ara::diag,以及执行业务逻辑并提供结果的 GenericRoutine 的应用专用实现 SWS Diagnostics 第80页。OperationOutput 的核心任务是以结构化方式提供例程的纯输出数据,其中 RoutineIdentifier 明确不是该数据结构的一部分 [SWS_DM_00633]。
生命周期
作为轻量级数据结构(struct),OperationOutput 具有简单的值生命周期。一旦针对例程的命令(例如启动、停止或结果查询)成功完成,自适应诊断应用程序就会按需进行实例化。唯一的数据成员是 ara::core::Vector<std::uint8_t> 类型的 responseData [SWS_DM_00633]。应用程序分配该向量,使用应用专用的返回数据对其进行填充,并将就绪的结构体传递给诊断子系统。返回给诊断框架通常应通过 ara::core 的 Result 或 Future 类型异步进行(解释:Adaptive Platform 的异步接口约定)。 问题 Q-e672dfb8b9ff416a (未决)在传递之后,序列化的职责转移给 ara::diag。一旦数据被传输或被接纳到内部缓冲区中,该结构体将在离开相应作用域时被再次销毁。在并发方面需要注意的是,OperationOutput 是针对单个操作执行的上下文创建的;常规情况下不会发生跨多个线程的共享、无保护访问。
使用路径
使用 OperationOutput 的常规流程包含多个连续阶段:
时序图:成功执行例程时通过 OperationOutput 提供数据的典型流程。来源:[SWS_DM_00633]、SWS Diagnostics 第80页。
错误场景
如果在执行例程期间发生错误或传入的输入数据无效,则 OperationOutput 的使用路径将被中止。在错误情况下,应用程序应向 Diagnostic Management 发送错误代码而非 OperationOutput,从而触发一条负面 UDS 响应(解读:通过 Result/Error-Domain 的错误路径)。 问题 (未决)因此,使用 OperationOutput 的基本先决条件是例程操作已完整且无误地完成。作为后置条件,应用程序保证 responseData 仅包含正面响应消息的纯有效载荷数据,并且不包含诸如 RoutineIdentifier 等协议前缀 [SWS_DM_00633]。如果例程成功结束但未生成任何附加返回数据,则向量 responseData 保持为空 SWS Diagnostics 第70页。
本指南基于 Diagnostics 模块的 AUTOSAR Adaptive 规范(R25-11)。相关说明基于规范摘录,并受文档记录的假设框架约束。
UML 类图
Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
此版本没有元素数据
常量
Content of positive respose message (without RoutineIdentifier)
常量 / 变量文档
ara::core::Vector<std::uint8_t> responseData;
Content of positive respose message (without RoutineIdentifier)
Status: valid/unmigrated
Version: rel:R25-11#05a25446
Versionshistorie & Revisions (1 transition, 7 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_00633@rel:R25-11#05a25446
Point-in-Time History:
Recorded Revisions (7):
- R25-11
rel:R25-11#85d41a6a2026-09-30 - R20-11
rel:R20-11#bfdc6f692026-10-14 - R21-11
rel:R21-11#bfdc6f692026-10-14 - R22-11
rel:R22-11#816f129b2026-10-14 - R23-11
rel:R23-11#4c6a51d42026-10-14 - R24-11
rel:R24-11#4c6a51d42026-10-14 - R25-11
rel:R25-11#05a254462026-10-14 active
Historical Snapshot:
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
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 · 德文原文