DEENESPTFRRUARHIKOZHNL

类 ara::tsync::ConsumerTimeBaseValidationNotification

[SWS_TS_00428] Upstream: RS_TS_00034 原文尚未导入, RS_TS_00030 原文尚未导入

class ConsumerTimeBaseValidationNotification {...};

Callback interface to notify Consumer Application about the availability of a new data block recorded for the Time Base. .

Header-Datei#include "ara/tsync/consumer_time_base_validation_notification.h"
Forwarding-Header#include "ara/tsync/tsync_fwd.h"
Scopenamespace ara::tsync

用户指南人工智能生成

向 Consumer 应用程序通知用于验证时间基准的新可用测量数据块。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c02e36846f4f 来源 未决问题(3)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

向 Consumer 应用程序通知用于验证时间基准的新可用测量数据块。

接口 ara::tsync::ConsumerTimeBaseValidationNotification 向 Consumer 应用程序通知时间基准的新可用测量数据块。通过回调方法 SetSlaveTimingData [SWS_TS_00420] 和 SetPdelayInitiatorData [SWS_TS_00422],系统为 Time Slave 以及 pDelay 发起方传递详细的时序与验证数据。应用程序开发人员从该类派生,实现数据处理,并必须确保不抛出异常,因为所有方法均被指定为 noexcept 且具备异常安全性。此外,被归类为 non_threadsafe 要求在并发访问时进行应用端同步。

上下文

类 ara::tsync::ConsumerTimeBaseValidationNotification 代表 AUTOSAR Adaptive Platform 的 tsync 模块中的回调接口。其目的在于,一旦受监视的时间基准有新的已记录数据块可用,就通知 Consumer 应用程序。

基本上有三个组件参与此交互:

  • tsync 模块的时间基准:持续采集通信网络中的时间和同步测量值。
  • 接口 ConsumerTimeBaseValidationNotification:通过方法 SetSlaveTimingData [SWS_TS_00420] 和 SetPdelayInitiatorData [SWS_TS_00422] 定义已记录测量数据块的传递点。
  • Consumer 应用程序:实现回调方法,接收提供的测量值并对时间基准执行专业验证。

通过这种结构,特定于应用程序的验证逻辑与平台内部的时间数据记录清晰解耦。

生命周期

作为包含纯虚方法的抽象接口类,ara::tsync::ConsumerTimeBaseValidationNotification 无法直接实例化。Consumer 应用程序派生出一个具体类并实现所需的方法。

创建和所有权完全由 Consumer 应用程序负责。推测应用程序在其初始化阶段创建回调对象,并将其与 tsync 服务的相应时间基准相关联。 问题 Q-a423ce4cbd4eeaaa (未决)

为了进行销毁,该类提供了一个虚析构函数:virtual ~ConsumerTimeBaseValidationNotification() noexcept = default; [SWS_TS_01300]。声明为虚析构函数可确保派生类的实例可以通过基类指针进行类型安全且无资源泄漏的释放。

在并发性方面,通知方法 SetSlaveTimingData [SWS_TS_00420] 和 SetPdelayInitiatorData [SWS_TS_00422] 被指定为 non_threadsafe。如果平台服务的调用推测发生在后台线程的上下文中,则应用端实现自身负责保护对共享应用资源的访问。 问题 Q-1b857df043504eec (未决)

使用路径

使用验证通知的典型流程包括以下步骤:

  1. 实现:Consumer 应用程序实现一个派生自 ara::tsync::ConsumerTimeBaseValidationNotification 的类。
  2. 接收 Time Slave 测量数据:一旦为时间基准的 Time Slave 记录了新的测量数据块,时间服务就会调用方法 SetSlaveTimingData [SWS_TS_00420],并通过 TimeSlaveMeasurementType 类型的参数 measurementData 传递详细的验证数据。
  3. 接收 pDelay 发起方测量数据:如果有新的测量数据可用于 pDelay 发起方,则会使用 PdelayInitiatorMeasurementType 中的详细时序数据调用 SetPdelayInitiatorData [SWS_TS_00422]。
  4. 处理:Consumer 应用程序评估传输的数据块,以检测同步错误或运行时偏差。
  5. 对象释放:在监视结束时,通过虚析构函数销毁实例 [SWS_TS_01300]。
校验数据通知流程Zeitbasis (tsync)ValidationNotificationConsumer-AnwendungSetSlaveTimingData(measurementData)Time-Slave-Messdaten verarbeitenSetPdelayInitiatorData(measurementData)pDelay-Initiator-Messdaten verarbeiten

时序图:将为 Time Slave 和 pDelay 发起方采集的测量数据块传输到 Consumer 实现。来源:[SWS_TS_00420]、[SWS_TS_00422]。

错误场景

接口方法设计为具有最大的稳健性和确定性调用:

  • 异常安全性:所有成员函数——SetSlaveTimingData [SWS_TS_00420]、SetPdelayInitiatorData [SWS_TS_00422] 和析构函数 [SWS_TS_01300]——均使用 noexcept 声明,并指定为具备异常安全性(exception safe)。Consumer 应用程序中的重写方法不得向外部传播异常,因为这会导致程序立即终止。
  • 缺乏反馈通道:由于回调方法的返回类型为 void,因此应用程序逻辑内部的处理错误无法报告回 tsync 模块。应用程序必须在内部独立处理并记录可能出现的错误状态。
  • 并发风险:基于属性 non_threadsafe([SWS_TS_00420]、[SWS_TS_00422]),必须防止在没有应用端锁定的情况下并行处理多个数据块。解释:回调对象还必须在时间基准的整个注册期间保持有效,以防止对已释放内存发生致命访问。 问题 Q-934e451f6a0099c1 (未决)

本指南基于 tsync 模块的 AUTOSAR Adaptive R25-11 规范。没有显式规范依据的说明属于专业解释。

成员图

类图

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

G nara__tsync__ConsumerTimeBaseValidationNotification118 ConsumerTimeBaseValidationNotification + ~ConsumerTimeBaseValidationNotification() + SetPdelayInitiatorData() + SetSlaveTimingData()

详细视图

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

构造函数和析构函数

方法

Provide the recorded data block for the pPelay Initiator of the Time Base.

virtual void SetPdelayInitiatorData (const PdelayInitiatorMeasurement Type &measurementData) noexcept=0;

Provide the recorded data block for the Time Slave of the Time Base.

virtual void SetSlaveTimingData (const TimeSlaveMeasurementType &measurementData) noexcept=0;

方法文档

函数 SetPdelayInitiatorData [SWS_TS_00422] Upstream: RS_TS_00034 原文尚未导入, RS_TS_00030 原文尚未导入

virtual void SetPdelayInitiatorData (const PdelayInitiatorMeasurement Type &measurementData) noexcept=0;

Provide the recorded data block for the pPelay Initiator of the Time Base.

Header-Datei#include "ara/tsync/consumer_time_base_validation_notification.h"
Scopeclass ara::tsync::ConsumerTimeBaseValidationNotification
Exception-Sicherheitexception safe
Thread-Sicherheitnon_threadsafe

Parameter (in)

ParameterBeschreibung
measurementDataDetailed timing data for the pDelay Initiator

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_TS_00422
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_TS_00422@rel:R25-11#4d29b969
Content hash
4d29b969
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_TimeSynchronization.pdf#nameddest=SWS_TS_00422
Status: valid/unmigrated Version: rel:R25-11#30c61c3d 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_TS_00422@rel:R25-11#30c61c3d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#bc80faac2026-09-30
  • R19-11rel:R19-11#eb03dca32026-10-14
  • R20-11rel:R20-11#bc341be62026-10-14
  • R21-11rel:R21-11#bc341be62026-10-14
  • R22-11rel:R22-11#9da969872026-10-14
  • R23-11rel:R23-11#dcb016da2026-10-14
  • R24-11rel:R24-11#30c61c3d2026-10-14
  • R25-11rel:R25-11#30c61c3d2026-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

函数 SetSlaveTimingData [SWS_TS_00420] Upstream: RS_TS_00034 原文尚未导入, RS_TS_00030 原文尚未导入

virtual void SetSlaveTimingData (const TimeSlaveMeasurementType &measurementData) noexcept=0;

Provide the recorded data block for the Time Slave of the Time Base.

Header-Datei#include "ara/tsync/consumer_time_base_validation_notification.h"
Scopeclass ara::tsync::ConsumerTimeBaseValidationNotification
Exception-Sicherheitexception safe
Thread-Sicherheitnon_threadsafe

Parameter (in)

ParameterBeschreibung
measurementDataDetailed data for validation of the Time Slave

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_TS_00420
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_TS_00420@rel:R25-11#6a263aca
Content hash
6a263aca
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_TimeSynchronization.pdf#nameddest=SWS_TS_00420
Status: valid/unmigrated Version: rel:R25-11#db5c7e95 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_TS_00420@rel:R25-11#db5c7e95
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0ae186d02026-09-30
  • R19-11rel:R19-11#9045509e2026-10-14
  • R20-11rel:R20-11#d0bb9b042026-10-14
  • R21-11rel:R21-11#d0bb9b042026-10-14
  • R22-11rel:R22-11#80e6946d2026-10-14
  • R23-11rel:R23-11#b85a4f422026-10-14
  • R24-11rel:R24-11#db5c7e952026-10-14
  • R25-11rel:R25-11#db5c7e952026-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

函数 ~ConsumerTimeBaseValidationNotification [SWS_TS_01300] Upstream: RS_TS_00034 原文尚未导入, RS_TS_00030 原文尚未导入

virtual ~ConsumerTimeBaseValidationNotification () noexcept=default;

Destructor .

Header-Datei#include "ara/tsync/consumer_time_base_validation_notification.h"
Scopeclass ara::tsync::ConsumerTimeBaseValidationNotification
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_TS_01300
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_TS_01300@rel:R25-11#42212dda
Content hash
42212dda
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_TimeSynchronization.pdf#nameddest=SWS_TS_01300
Status: valid/unmigrated Version: rel:R25-11#dffdb922 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_TS_01300@rel:R25-11#dffdb922
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#786258362026-09-30
  • R23-11rel:R23-11#8b1738b12026-10-14
  • R24-11rel:R24-11#3389479d2026-10-14
  • R25-11rel:R25-11#dffdb9222026-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