DEENESPTFRRUARHIKOZHNL

类 apext::tsync::FVM

[SWS_TS_14197] Upstream: RS_TS_20072 原文尚未导入

class FVM {...};

A freshness value management interface for ara::tsync.

Header-Datei#include "apext/tsync/fvm.h"
Forwarding-Header#include "apext/tsync/tsync_fwd.h"
Scopenamespace apext::tsync

用户指南人工智能生成

提供新鲜度值以用于对已发送和已接收的时间同步报文进行身份验证。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 88e47d85a572 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

提供新鲜度值以用于对已发送和已接收的时间同步报文进行身份验证。

类 apext::tsync::FVM 用作模块的接口,用于为受保护的时间同步报文提供新鲜度值 [SWS_TS_14199]。在投入使用前必须初始化该实例,随后即可获取用于发送以及校验已接收报文的新鲜度值 [SWS_TS_14200]。接收时,会将截断的新鲜度值连同重试计数器一起传递,以重构用于验证身份验证器的完整值。所有接口方法均被指定为异常安全且线程安全。

上下文

类 apext::tsync::FVM 表示 AUTOSAR Adaptive Platform 的 tsync 模块内 Freshness Value Management 的接口。其主要职责是为时间同步服务 ara::tsync 提供当前新鲜度值(Freshness Values),以便对报文进行加密保护以防范重放和欺骗攻击 [SWS_TS_14198],[SWS_TS_14199]。

TimeSync 功能充当核心交互伙伴,它调用 FVM 为传出以及接收到的受保护报文检索新鲜度值容器(apext::tsync::FVContainer)[SWS_TS_14198],[SWS_TS_14199]。类声明通过头文件 #include "apext/tsync/fvm.h" 包含。所有指定的方法均声明为线程安全且异常安全(noexcept),因此可以从时间同步的不同执行上下文中并行进行调用 [SWS_TS_14198],[SWS_TS_14199],[SWS_TS_14200]。

生命周期

FVM 实例的功能生命周期分为显式初始化阶段和随后的运行阶段:

  • 初始化:在使用查询函数之前,必须调用方法 Initialize() [SWS_TS_14200]。成功完成时,它返回一个空的 ara::core::Result<void>。若初始化失败,它会返回具有回滚语义的错误码 TsyncFvmErrc::kFVInitializeFailed [SWS_TS_14200]。
  • 运行状态:成功的初始化推测是后续新鲜度值请求提供有效结果的必要前提。 问题 Q-df4ee3e749313b94 (未决)初始化完成后,实例保持在运行状态并响应针对已配置新鲜度值 ID 的请求。
  • 并发性:由于所有方法均标记为 thread-safe,因此对用于发送和接收的新鲜度值的访问无需外部锁定机制即可并发进行 [SWS_TS_14198],[SWS_TS_14199]。

使用路径

TimeSync 组件的典型调用顺序包括初始化以及针对发送和接收路径持续确定新鲜度值:

  1. 服务初始化:TimeSync 在启动时执行方法 Initialize() 并检查返回的 ara::core::Result 是否无错误 [SWS_TS_14200]。
  2. 发送受保护报文:在发送报文之前,TimeSync 使用相应的 FreshnessValueID 调用 GetTxFreshness() [SWS_TS_14199]。获取到的 FVContainer 对象提供用于计算身份验证器的新鲜度值 [SWS_TS_14199]。
  3. 接收受保护报文:接收到报文时,TimeSync 调用 GetRxFreshness() 并传递 FreshnessValueID、报文中包含的截断值 TruncatedFreshnessValue 以及先前的身份验证尝试次数 AuthVerifyAttempts [SWS_TS_14198]。FVM 由此确定用于校验身份验证器的完整新鲜度值 [SWS_TS_14198]。
TimeSync 中的初始化与新鲜度值确定TimeSyncFVMUse Case: InitialisierungInitialize()ara::core::Result<void>Use Case: 发送消息GetTxFreshness(FreshnessValueID)ara::core::Result<FVContainer>Use Case: 接收消息GetRxFreshness(FreshnessValueID, TruncatedFreshnessValue, AuthVerifyAttempts)ara::core::Result<FVContainer>

时序图:TimeSync 初始化及检索发送和接收新鲜度值的典型流程。来源:[SWS_TS_14198],[SWS_TS_14199],[SWS_TS_14200]

错误场景

所有接口方法均通过 ara::core::Result 发送错误信号并指定了 noexcept [SWS_TS_14198],[SWS_TS_14199],[SWS_TS_14200]。以下错误状态和前提条件相关:

  • 初始化失败(TsyncFvmErrc::kFVInitializeFailed):当 FVM 无法初始化时发生 [SWS_TS_14200]。得益于回滚语义,系统保持在未初始化的确定初始状态。
  • 新鲜度值不可用(TsyncFvmErrc::kFVNotAvailable):当请求的 ID 没有可用新鲜度值时,由 GetTxFreshness() 或 GetRxFreshness() 返回 [SWS_TS_14198],[SWS_TS_14199]。发生错误时,操作不会更改其状态(回滚语义)。
  • 接收时的重复校验尝试:参数 AuthVerifyAttempts 从 0 开始,并在每次身份验证尝试失败时递增 [SWS_TS_14198]。该递增推测用于 FVM 逐步调整内部接受窗口,以容忍轻微时间偏移的新鲜度值。 问题 Q-8f151c47d2607f90 (未决)

本指南完全基于 AUTOSAR R25-11 针对 tsync 模块的规范要求自动生成。

成员图

类图

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

G napext__tsync__FVM697 FVM + GetRxFreshness() + GetTxFreshness() + Initialize()

详细视图

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

方法

Used by TimeSync to obtain the current freshness value for received messages.

ara::core::Result< FVContainer > GetRxFreshness (std::uint16_t FreshnessValueID, const FVContainer &TruncatedFreshnessValue, std::uint16_t AuthVerifyAttempts) noexcept;

Used by TimeSync to obtain the current freshness value for transmitted messages.

ara::core::Result< FVContainer > GetTxFreshness (std::uint16_t FreshnessValueID) noexcept;
Initialize 函数

Initializes FVM

ara::core::Result< void > Initialize () noexcept;

方法文档

函数 GetRxFreshness [SWS_TS_14198] Upstream: RS_TS_20072 原文尚未导入

ara::core::Result< FVContainer > GetRxFreshness (std::uint16_t FreshnessValueID, const FVContainer &TruncatedFreshnessValue, std::uint16_t AuthVerifyAttempts) noexcept;

Used by TimeSync to obtain the current freshness value for received messages.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 37f7da507510 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 apext::tsync::FVM(定义于 apext/tsync/fvm.h 中)的同步接口 GetRxFreshness 用于 TimeSync 获取传入报文的当前新鲜度值 [SWS_TS_14198]。

该调用需要三个参数 [SWS_TS_14198]:

  • FreshnessValueID:新鲜度值的数值标识符(std::uint16_t)[SWS_TS_14198]。
  • TruncatedFreshnessValue:包含来自接收到的安全报文的截断新鲜度值的容器(apext::tsync::FVContainer)[SWS_TS_14198]。
  • AuthVerifyAttempts:自上次接收到该报文以来针对该报文的认证尝试计数器;首次尝试的值从 0 开始,并在每次验证尝试失败时递增 [SWS_TS_14198]。

该函数返回一个 ara::core::Result<FVContainer> [SWS_TS_14198]。在成功情况下,其包含一个带有完整新鲜度值的 apext::tsync::FVContainer,该新鲜度值用于后续由 TimeSync 计算身份验证器 [SWS_TS_14198]。如果新鲜度值不可用,则返回带有错误码 TsyncFvmErrc::kFVNotAvailable 和回滚语义的可恢复错误 [SWS_TS_14198]。

该签名声明为 noexcept;其实现被指定为异常安全(exception safe)和线程安全(thread-safe)[SWS_TS_14198]。

本文由 AI 基于 AUTOSAR 规范 R25-11 生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "apext/tsync/fvm.h"
Scopeclass apext::tsync::FVM
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
FreshnessValueIDTruncatedFreshnessValueAuthVerifyAttemptsthe identifier of the freshness value. the apext::tsync::FVContainer with the values from the received Secured message. the number of authentication verify attempts of this message since the last reception. The value is 0 for the first attempt and incremented on every unsuccessful verification attempt.

Rückgabewert

TypBeschreibung
ara::core::Result<FVContainer >an ara::core::Result containing a ara::core::Result:: value_type containing a apext::tsync::FVContainer that holds the freshness value to be used for the calculation of the authenticator by TimeSync, or recoverable error.

Fehler

FehlercodeBeschreibung
TsyncFvmErrc::kFVNotAvailablerollback_semantics the Freshness Value is not available.

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

Record
AUTOSAR/AP/record/SWS_TS_14198
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_TS_14198@rel:R25-11#18bcf77d
Content hash
18bcf77d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_TimeSynchronization.pdf#nameddest=SWS_TS_14198
Status: valid/unmigrated Version: rel:R25-11#5a2df49d Versionshistorie & Revisions (1 transition, 3 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_TS_14198@rel:R25-11#5a2df49d
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#cbec70a42026-09-30
  • R24-11rel:R24-11#8dfc9f262026-10-14
  • R25-11rel:R25-11#5a2df49d2026-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

函数 GetTxFreshness [SWS_TS_14199] Upstream: RS_TS_20072 原文尚未导入

ara::core::Result< FVContainer > GetTxFreshness (std::uint16_t FreshnessValueID) noexcept;

Used by TimeSync to obtain the current freshness value for transmitted messages.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 9a44eddcc1b0 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

函数 GetTxFreshness 作为类 apext::tsync::FVM 的接口在头文件 apext/tsync/fvm.h 中定义([SWS_TS_14199])。它由 TimeSync 组件调用,以查询所发送报文的当前新鲜度值。TimeSync 强制需要该新鲜度值,以计算外发传输的加密身份验证器。

调用时,新鲜度值的标识符通过类型为 std::uint16_t 的参数 FreshnessValueID 传递([SWS_TS_14199])。作为返回值,该接口同步返回一个类型为 ara::core::Result<FVContainer> 的对象。在成功情况下,该返回类型封装了包含具体新鲜度值的 apext::tsync::FVContainer 实例。

如果在查询时间点所需的新鲜度值尚未就绪,则操作因可恢复错误(recoverable error)而失败([SWS_TS_14199])。在此场景下,函数返回错误码 TsyncFvmErrc::kFVNotAvailable,同时系统遵循定义的回滚语义。

在并发性和容错性方面,GetTxFreshness 被指定为 thread-safe 以及 exception safe,并带有 noexcept 注解([SWS_TS_14199])。因此,可以从并行线程调用该函数而无需外部互斥锁保护,也无需针对同步 C++ 异常采取预防措施。

该使用说明基于 AUTOSAR 规范自动生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "apext/tsync/fvm.h"
Scopeclass apext::tsync::FVM
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
FreshnessValueIDthe identifier of the freshness value.

Rückgabewert

TypBeschreibung
ara::core::Result<FVContainer >an ara::core::Result containing a ara::core::Result:: value_type containing a apext::tsync::FVContainer that holds the freshness value to be used for the calculation of the authenticator by TimeSync, or recoverable error.

Fehler

FehlercodeBeschreibung
TsyncFvmErrc::kFVNotAvailablerollback_semantics the Freshness Value is not available.

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

Record
AUTOSAR/AP/record/SWS_TS_14199
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_TS_14199@rel:R25-11#20005cab
Content hash
20005cab
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_TimeSynchronization.pdf#nameddest=SWS_TS_14199
Status: valid/unmigrated Version: rel:R25-11#09c3542d Versionshistorie & Revisions (1 transition, 3 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_TS_14199@rel:R25-11#09c3542d
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a86e7a3f2026-09-30
  • R24-11rel:R24-11#1e7ee0612026-10-14
  • R25-11rel:R25-11#09c3542d2026-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

函数 Initialize [SWS_TS_14200] Upstream: RS_TS_20072 原文尚未导入

ara::core::Result< void > Initialize () noexcept;

Initializes FVM

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: e3e4199a5145 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

命名空间 apext::tsync::FVM 中的函数 Initialize 用于根据 [SWS_TS_14200] 初始化 Freshness Value Manager (FVM)。该接口通过头文件 apext/tsync/fvm.h 提供,并具有签名 ara::core::Result<void> Initialize() noexcept;。该调用同步执行且无传入参数。在成功情况下,提供带有空返回类型 void 的 ara::core::Result。

错误处理

如果执行期间发生问题,该函数会在结果对象内返回特定错误码 TsyncFvmErrc::kFVInitializeFailed [SWS_TS_14200]。规范在此规定了回滚语义,以便在发生错误时不应残留不一致的中间状态。 问题 Q-0d3c1a8f45444579 (未决)

并发性与限制

对于调用上下文,该函数显式归类为 thread-safe 以及 exception safe [SWS_TS_14200]。由于标识符 noexcept,保证不会向外部传递 C++ 异常。解读:推测必须已成功完成此初始化步骤,然后才能调用 FVM 组件的其他功能方法。 问题 Q-ba44afb55d21ac38 (未决)

本使用说明基于 AUTOSAR R25-11 自动生成。

Header-Datei#include "apext/tsync/fvm.h"
Scopeclass apext::tsync::FVM
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >an ara::core::Result containing a ara::core::Result:: value_type containing a void, kFVInitializeFailed otherwise.

Fehler

FehlercodeBeschreibung
TsyncFvmErrc::kFVInitializeFailedrollback_semantics Initialization fails

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

Record
AUTOSAR/AP/record/SWS_TS_14200
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_TS_14200@rel:R25-11#fd81b0ee
Content hash
fd81b0ee
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_TimeSynchronization.pdf#nameddest=SWS_TS_14200
Status: valid/unmigrated Version: rel:R25-11#711e1128 Versionshistorie & Revisions (1 transition, 3 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_TS_14200@rel:R25-11#711e1128
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#55c36e332026-09-30
  • R24-11rel:R24-11#f1f5a9742026-10-14
  • R25-11rel:R25-11#711e11282026-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