DEENESPTFRRUARHIKOZHNL

结构体 ara::diag::SovdSwUpdate::SubProgress

[SWS_DM_01896] Upstream: RS_Diag_04265

struct SubProgress {...};

Definition of Sovd Progress type.

Header-Datei#include "ara/diag/sovd_sw_update.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::SovdSwUpdate

用户指南人工智能生成

在基于 SOVD 的软件更新中记录子实体的状态、百分比进度和错误代码。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 86b478c2c357 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

在基于 SOVD 的软件更新中记录子实体的状态、百分比进度和错误代码。

结构 ara::diag::SovdSwUpdate::SubProgress 封装了在基于 SOVD 的软件更新期间特定实体的当前进度、状态和可能的错误([SWS_DM_01896])。更新例程在其中记录待更新的组件,更新百分比进度,并将总体状态传输给诊断管理。如果更新失败,字段 error 指定所发生的错误代码,而在常规流程中它不被考虑([SWS_DM_01901])。由于 SubProgress 是没有内部同步的纯数据值类型,并发修改需要应用程序端进行保护。

上下文

结构体 ara::diag::SovdSwUpdate::SubProgress 是 AUTOSAR Adaptive Platform 模块 diag 中基于 SOVD 的软件更新 C++ 接口的一部分([SWS_DM_01896]、AUTOSAR_AP_SWS_Diagnostics §8.58.3 “Struct: SubProgress”)。在面向服务的车辆诊断(SOVD,Service-Oriented Vehicle Diagnostics)框架下,更新过程可由多个并行或顺序子步骤组成。SubProgress 负责反映更新期间特定子组件的处理状态。交互伙伴包括执行部分更新的诊断内部更新例程,以及协调更新总体进度并向外部诊断工具报告的上级控制实例。

该结构定义了四个公共成员变量(AUTOSAR_AP_SWS_Diagnostics §8.58.3.1 “Public Member Variables”):

  • entity:命名当前正在更新的实体的 ara::core::String([SWS_DM_01898])。
  • status:表示当前更新状态的 SovdUpdateStatus 类型值([SWS_DM_01899])。
  • progress:表示百分比进度的 ara::core::Optional<std::uint8_t> 类型可选值([SWS_DM_01900])。
  • error:用于在发生错误时指定所出现错误的 ara::core::ErrorCode 类型错误代码([SWS_DM_01901])。

生命周期

设计为 struct 的 SubProgress 具有值语义(AUTOSAR_AP_SWS_Diagnostics §8.58.3.1 “Public Member Variables”)。一旦更新处理中开始新的子步骤,实例通常在栈上或在上级状态容器内创建。管理组件在开始时通过 entity 将目标实体的标识符分配给该实例([SWS_DM_01898]),并在 status 中设置初始状态([SWS_DM_01899])。

在此流程中,百分比进度以及状态更改会在结构中持续更新。子更新完成或中止后,该结构会被传递或读取,并最终在离开作用域时自动销毁。由于规范未指定自身的方法或同步原语,该结构应该充当没有自身线程安全性的纯数据持有者(解释)。 问题 Q-92b3fcc698f7bab8 (未决)因此,多个线程的并发访问需要应用程序端进行同步。

使用路径

进度报告的常规流程细分为固定的步骤序列:\n首先,执行更新逻辑实例化一个 SubProgress 类型的对象,并在 entity 中设置相关实体的标识符([SWS_DM_01898])。同时设置 status 的起始值,例如以指示处理的开始([SWS_DM_01899])。对于连续步骤,逻辑会定期将百分比进度写入字段 progress([SWS_DM_01900]、AUTOSAR_AP_SWS_Diagnostics §8.58.3.1.3 “progress”)。由于 progress 被声明为 ara::core::Optional,只要进度尚未确定,该字段就保持为空。最后,该结构被传递给中央接口 SovdSwUpdate,以便外部 SOVD 客户端可以查询状态([SWS_DM_01896])。

软件更新子步骤的进度更新Update-LogikSubProgressSovdSwUpdate使用 entity 和初始状态进行实例化执行部分更新更新 status 和 progress(百分比形式)SubProgress bereitstellenalt部分更新期间失败将 status 设置为失败并填充 error发送带有错误代码的 SubProgress

时序图:子更新步骤进度报告和错误处理的典型流程。来源:[SWS_DM_01896]、[SWS_DM_01898]、[SWS_DM_01899]、[SWS_DM_01900]、[SWS_DM_01901]。

错误场景

在处理子实体期间发生异常或错误的情况下,该结构的错误场景生效。如果发生错误,status 中的值将切换为错误状态([SWS_DM_01899])。根据 [SWS_DM_01901],变量 error 仅在状态为失败时才指定确切的错误代码(“Specifies the error if status is failed”)。这构成了 status 与 error 之间具有约束力的逻辑耦合:该结构的接收方仅当 status 实际报告失败状态时,才可将字段 error 评估为有意义;否则其内容推测不予考虑或表示默认值(解释)。 问题 Q-3caa7622672dcb8e (未决)

另一个错误场景涉及未确定的进度:如果处理实体无法确定具体的百分比值或计算提前中止,则可选字段 progress 保持无值(ara::core::nullopt),这可防止无效的数值被错误地解释为百分比值([SWS_DM_01900])。

本指南基于 AUTOSAR Adaptive Platform Release R25-11 规范,并总结了对结构 ara::diag::SovdSwUpdate::SubProgress 的要求。

成员图

类图

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__SovdSwUpdate__SubProgress643 «struct» SubProgress + entity + error + progress + status

详细视图

请在大纲中选择一个条目。

常量

entity 变量

Specifies the entity that is currently being updated.

error 变量

Specifies the error if status is failed.

progress 变量

Specifies the Update progress in percent.

status 变量

Specifies the Update Status.

常量 / 变量文档

变量 entity [SWS_DM_01898] Upstream: RS_Diag_04265

ara::core::String entity;

Specifies the entity that is currently being updated.

Header-Datei#include "ara/diag/sovd_sw_update.h"
Scopestruct ara::diag::SovdSwUpdate::SubProgress
Symbolentity
Typara::core::String

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

Record
AUTOSAR/AP/record/SWS_DM_01898
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01898@rel:R25-11#3c60963f
Content hash
3c60963f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01898
Status: valid/unmigrated Version: rel:R25-11#ae29483e 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_DM_01898@rel:R25-11#ae29483e
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#df0333952026-09-30
  • R23-11rel:R23-11#ae29483e2026-10-14
  • R24-11rel:R24-11#ae29483e2026-10-14
  • R25-11rel:R25-11#ae29483e2026-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

变量 error [SWS_DM_01901] Upstream: RS_Diag_04265

ara::core::ErrorCode error;

Specifies the error if status is failed.

Header-Datei#include "ara/diag/sovd_sw_update.h"
Scopestruct ara::diag::SovdSwUpdate::SubProgress
Symbolerror
Typara::core::ErrorCode

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

Record
AUTOSAR/AP/record/SWS_DM_01901
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01901@rel:R25-11#982d54bc
Content hash
982d54bc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01901
Status: valid/unmigrated Version: rel:R25-11#dc82b576 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_DM_01901@rel:R25-11#dc82b576
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#005552222026-09-30
  • R23-11rel:R23-11#dc82b5762026-10-14
  • R24-11rel:R24-11#dc82b5762026-10-14
  • R25-11rel:R25-11#dc82b5762026-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

变量 progress [SWS_DM_01900] Upstream: RS_Diag_04265

ara::core::Optional<std::uint8_t> progress;

Specifies the Update progress in percent.

Header-Datei#include "ara/diag/sovd_sw_update.h"
Scopestruct ara::diag::SovdSwUpdate::SubProgress
Symbolprogress
Typara::core::Optional< std::uint8_t >

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

Record
AUTOSAR/AP/record/SWS_DM_01900
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01900@rel:R25-11#6fbe7a97
Content hash
6fbe7a97
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01900
Status: valid/unmigrated Version: rel:R25-11#28ed7b01 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_DM_01900@rel:R25-11#28ed7b01
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#33476bd62026-09-30
  • R23-11rel:R23-11#28ed7b012026-10-14
  • R24-11rel:R24-11#28ed7b012026-10-14
  • R25-11rel:R25-11#28ed7b012026-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

变量 status [SWS_DM_01899] Upstream: RS_Diag_04265

SovdUpdateStatus status;

Specifies the Update Status.

Header-Datei#include "ara/diag/sovd_sw_update.h"
Scopestruct ara::diag::SovdSwUpdate::SubProgress
Symbolstatus
TypSovdUpdateStatus

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

Record
AUTOSAR/AP/record/SWS_DM_01899
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01899@rel:R25-11#0a4847e7
Content hash
0a4847e7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01899
Status: valid/unmigrated Version: rel:R25-11#2a27d32e 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_DM_01899@rel:R25-11#2a27d32e
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#749009402026-09-30
  • R23-11rel:R23-11#2a27d32e2026-10-14
  • R24-11rel:R24-11#2a27d32e2026-10-14
  • R25-11rel:R25-11#2a27d32e2026-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