类 apext::phm::WatchdogInterface
[SWS_PHM_01257] Upstream: RS_PHM_00101
class WatchdogInterface {...};
class for interface to hardware watchdog Note: class WatchdogInterface although identifiable in code as an interface, it is a PlatformExtension - i.e. no modelled interface - nothing to do here
Header-Datei #include "apext/phm/watchdog_interface.h" Forwarding-Header #include "apext/phm/phm_fwd.h" Scope namespace apext::phm
用户指南人工智能生成 将硬件看门狗控制和错误响应连接到 Platform Health Management。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ead3ce845973
来源
未决问题(3)
摘要 详细
将硬件看门狗控制和错误响应连接到 Platform Health Management。
类 apext::phm::WatchdogInterface 作为平台扩展,构成了 Platform Health Management 与物理硬件看门狗之间的接口。PHM 在正常操作期间通过 AliveNotification() 周期性地通知该接口,而在未收到通知时,该接口必须自主触发看门狗响应 [SWS_PHM_01255] 。在发生严重系统错误时,PHM 还可以通过 FireWatchdogReaction() 直接强制硬件看门狗执行错误响应 [SWS_PHM_01256] 。作为核心边界条件,这两个方法都被指定为线程安全,但不是异常安全的。
更多 ›
上下文
C++ 类 apext::phm::WatchdogInterface 在 AUTOSAR Adaptive 的 Platform Health Management(PHM)中代表物理硬件看门狗的接口。作为平台扩展(PlatformExtension),它并不映射建模的 AUTOSAR 端口接口,而是作为 PHM 服务与底层硬件之间的特定于供应商的桥梁。PHM 监控进程和平台组件的执行。为了可靠地防范 PHM 本身发生故障或阻塞,WatchdogInterface 连接了外部或内部硬件监控。PHM 通过方法 AliveNotification() 周期性地向接口 [SWS_PHM_01255] 报告其功能正常。如果发生严重系统错误,PHM 可以通过函数 FireWatchdogReaction() 有针对性地请求硬件端错误响应 [SWS_PHM_01256] 。
WatchdogKontext
PHM
PHM
WatchdogInterface
WatchdogInterface
PHM->WatchdogInterface
AliveNotification () /
FireWatchdogReaction ()
HardwareWatchdog
HardwareWatchdog
WatchdogInterface->HardwareWatchdog
Triggerung /
Watchdog-Reaktion
上下文图:WatchdogInterface 在 PHM 和硬件看门狗之间的集成。来源:[SWS_PHM_01255] 、[SWS_PHM_01256]
生命周期
由于 apext::phm::WatchdogInterface 用作平台扩展,接口实现的实例化及其与硬件驱动程序的连接大概率在 PHM 服务的初始化期间特定于平台地执行。 问题 Q-c2235d5c87e0a675 (未决) 该实例的生命周期通常与 PHM 的运行时间绑定,因此在平台运行期间不打算进行具有多次创建或销毁的动态生命周期。关于并发性,两个接口函数 AliveNotification() 和 FireWatchdogReaction() 都被显式声明为线程安全(thread-safe)[SWS_PHM_01255] 、[SWS_PHM_01256] 。这使得 PHM 能够从不同的内部工作线程并行地向看门狗接口传递保活信号和错误报告,而无需调用方进行同步。
使用路径
PHM 与接口之间的典型交互分为常规监控周期和错误升级:
周期性监控及看门狗响应触发 PHM WatchdogInterface Hardware-Watchdog Use Case: 常规监控周期 loop Konfigurierte Zykluszeit AliveNotification() Hardware-Watchdog bedienen Use Case: Fehlerfall alt PHM fordert Fehlerreaktion an FireWatchdogReaction() 触发看门狗响应 存活报告缺失(超时) Timeout erkennen 触发看门狗响应
时序图:定期保活信号传输和触发看门狗响应。来源:[SWS_PHM_01255] 、[SWS_PHM_01256]
错误场景
该接口支持两种互补的机制来处理系统故障:
一方面,未收到通知的被动情况会导致系统反应:如果 PHM 未在配置的时间段内通过 AliveNotification() 进行报告,则 WatchdogInterface 有义务自主启动看门狗响应 [SWS_PHM_01255] 。从而通过硬件可靠地拦截 PHM 服务本身的崩溃或死锁。
另一方面,存在主动错误路径:通过显式调用 FireWatchdogReaction() 触发看门狗的已定义错误响应 [SWS_PHM_01256] 。在这两种情况下,系统级的最终影响通常可能包括硬件复位或转换到安全状态。 问题 Q-817baa072cc94a19 (未决)
关于代码中的错误行为,两个成员函数均被指定为非异常安全(not exception safe)[SWS_PHM_01255] 、[SWS_PHM_01256] 。因此,调用组件不能依赖任何异常处理保证,并且接口的实现不得发出未处理的 C++ 异常。
本指南总结了符合 AUTOSAR Adaptive R25-11 的 apext::phm::WatchdogInterface 规范。
UML 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
napext__phm__WatchdogInterface47
WatchdogInterface
+ AliveNotification()
+ FireWatchdogReaction()
此版本没有元素数据
方法 Called cyclically by PHM in configurable cycle time. Note: This time might differ from the cycle time of triggering the "real" hardware watchdog. If PHM does not report aliveness in configured time, WatchdogInterface shall initiate watchdog reaction
void AliveNotification ();
Interface to fire an error reaction of the Watchdog.
void FireWatchdogReaction ();
方法文档
void AliveNotification ();
Called cyclically by PHM in configurable cycle time. Note: This time might differ from the cycle time of triggering the "real" hardware watchdog. If PHM does not report aliveness in configured time, WatchdogInterface shall initiate watchdog reaction
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: cb75c45d42c3
来源
未决问题(1)
该文本由 AI 创建,总结了 AUTOSAR Adaptive R25-11 的规范状态。
Header-Datei #include "apext/phm/watchdog_interface.h" Scope class apext::phm::WatchdogInterface Exception-Sicherheit not exception safe Thread-Sicherheit thread-safe
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#3204f230
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_PHM_01255@rel:R25-11#3204f230
Point-in-Time History:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#756ef89a2026-09-30 Inspect R24-11 rel:R24-11#b0affe0c2026-10-14 Inspect R25-11 rel:R25-11#3204f2302026-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
void FireWatchdogReaction ();
Interface to fire an error reaction of the Watchdog.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 28a89e0724c4
来源
未决问题(1)
函数 FireWatchdogReaction 用作 Platform Health Management(PHM)模块内的专用接口,以有针对性地触发看门狗的故障反应 [SWS_PHM_01256] 。它分配在类 apext::phm::WatchdogInterface 的作用域内,并通过头文件 apext/phm/watchdog_interface.h 提供 [SWS_PHM_01256] 。
使用时应注意以下几个方面:
因此,该函数提供了一个标准化的访问点,以便在发生严重错误时主动干预看门狗的行为并启动已定义的保护措施 [SWS_PHM_01256] 。
该文本由 AI 生成。它基于 AUTOSAR Adaptive R25-11。
Header-Datei #include "apext/phm/watchdog_interface.h" Scope class apext::phm::WatchdogInterface Exception-Sicherheit not exception safe Thread-Sicherheit thread-safe
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#9d382947
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_PHM_01256@rel:R25-11#9d382947
Point-in-Time History:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#8b20aac12026-09-30 Inspect R24-11 rel:R24-11#e80c13872026-10-14 Inspect R25-11 rel:R25-11#9d3829472026-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 · 德文原文