结构体 ara::diag::HttpRedirect
[SWS_DM_01828] Upstream: RS_Diag_04266 , RS_Diag_04256
struct HttpRedirect {...};
Definition of HTTP-Redirect. In case a SOVD resource has been moved and/or is available under another URI, the SOVD server shall use this type to indicate the new location of the redirected SOVD resource to the SOVD client.
Header-Datei #include "ara/diag/sovd_http_redirect.h" Forwarding-Header #include "ara/diag/diag_fwd.h" Scope namespace ara::diag
用户指南人工智能生成 使 SOVD 服务器能够结构化地传递用于重定向诊断请求的新目标 URL。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 9bc6ec8deebc
来源
未决问题(2)
摘要 详细
使 SOVD 服务器能够结构化地传递用于重定向诊断请求的新目标 URL。
结构 ara::diag::HttpRedirect 用于 SOVD 服务器向 SOVD 客户端传达已移动或在其他路径下可用的 SOVD 资源的新地址 [SWS_DM_01828] 。为此,它提供了公共属性 url,该属性将重定向的目标 URL 定义为字符串 [SWS_DM_01829] 。作为纯值对象,该结构按需进行实例化,并为上层 HTTP 响应协议封装地址信息。
更多 ›
上下文
结构 ara::diag::HttpRedirect 是 AUTOSAR Adaptive Platform 的 Diagnostics 模块(diag)的一部分,并通过头文件 ara/diag/sovd_http_redirect.h 进行声明 AUTOSAR_AP_SWS_Diagnostics §8.55 “Header: ara/diag/sovd_http_redirect.h” 。它用于根据 [SWS_DM_01828] 在 SOVD(面向服务的车辆诊断)框架下对 HTTP 重定向进行标准化表示。当车辆内部的诊断资源被迁移,或者临时或永久地可在另一地址下访问时,SOVD 服务器会通过该类型向发起请求的 SOVD 客户端指示新的存储位置。
该结构代表一个基本数据载体,其唯一的公共元素是类型为 ara::core::String 的变量 url [SWS_DM_01829] 。通过该字段指定客户端应将其原始请求重定向至的完整或相对目标地址 AUTOSAR_AP_SWS_Diagnostics §8.55.1.1 “Public Member Variables” 。因此,ara::diag::HttpRedirect 充当诊断服务器内部资源管理与面向客户端的外部协议处理之间的标准化纽带。
生命周期
作为纯被动数据结构(struct),根据 [SWS_DM_01828] ,ara::diag::HttpRedirect 具有与执行上下文绑定的瞬态生命周期。解释:在需要重定向请求的时刻,SOVD 服务器或连接的诊断应用程序会按需进行实例化。 问题 (未决) 在此过程中,目标 URL 在构造时或紧随其后直接存储在字段 url 中 [SWS_DM_01829] 。
该结构具有常规的 C++ 值语义;内存分配和释放完全取决于封装实例以及嵌入的 ara::core::String 的生命周期。解释:该结构的生成、赋值和销毁无副作用,且不需要在诊断服务的中央实例中进行注册或注销。 问题 (未决) 关于并发性,ara::diag::HttpRedirect 的单个实例在进行写访问时不是线程安全的;然而,由于实例通常是针对每个客户端请求隔离创建并作为返回值传输的,因此不会发生同步冲突。
使用路径
ara::diag::HttpRedirect 的典型应用体现在 SOVD 客户端、SOVD 服务器和已迁移的目标资源之间的三步交互中。首先,SOVD 客户端向已知的资源 URI 发送 HTTP 调用。如果服务器由于资源已移至新端点而无法直接服务该请求,则它会根据 [SWS_DM_01828] 创建 ara::diag::HttpRedirect 的实例,并将新目标地址分配给成员 url [SWS_DM_01829] 。
解释:将结构内容转换到 HTTP 响应流中(例如与 HTTP 重定向状态码和相应的 Location 标头结合)由底层 SOVD 通信栈执行。 问题 Q-e68bb7696aa291c0 (未决) 一旦 SOVD 客户端收到重定向,它就会透明地将其诊断请求定向到传输的目标 URL,以执行实际的诊断操作。
使用 HttpRedirect 进行 SOVD HTTP 重定向 SOVD-Client SOVD-Server Ziel-Ressource 发往原始 URI 的 HTTP 请求 Ressourcenverlagerung erkannt Erzeuge HttpRedirect (url) 带有新 URL 的 HTTP 重定向 HTTP-Anfrage an Ziel-URL 目标资源的响应
时序图:SOVD 服务器通过 HttpRedirect 对 SOVD 客户端进行重定向。来源:[SWS_DM_01828] 、[SWS_DM_01829]
本指南基于 AUTOSAR Adaptive Platform R25-11 规范(diag 模块),并通过自动化方式生成。
UML 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
nara__diag__HttpRedirect903
«struct»
HttpRedirect
+ url
此版本没有元素数据
常量 Specifies the URL where the request shall be redirected.
常量 / 变量文档
ara::core::String url;
Specifies the URL where the request shall be redirected.
Status: valid/unmigrated
Version: rel:R25-11#13045042
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_01829@rel:R25-11#13045042
Point-in-Time History:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#2c63e2122026-09-30 Inspect R23-11 rel:R23-11#7468bf292026-10-14 Inspect R24-11 rel:R24-11#7468bf292026-10-14 Inspect R25-11 rel:R25-11#130450422026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
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/unmigratedmechanically 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 · 德文原文