跳到主要内容

History 历史

ua.ReadHistory(...) 是简化入口, 完整 API 在 ua.History.*.

子页跳转

5 种 HistoryRead 模式

模式API说明
Raw 原始数据ReadRaw / ua.ReadHistory(...)区间内全部点
Modified 含修改记录ReadModified区间内含修改记录
AtTime 指定时间点ReadAtTime给定时间戳的内插值
Processed 聚合ReadProcessed聚合 (Avg / Min / Max / ...)
Events 事件历史ReadEvents历史事件 (报警 / 条件)

HistoryUpdate

API用途
UpdateInsert / Replace / Update 历史数据
DeleteDeleteRange / DeleteAtTime / DeleteEvents

通用前提

  • 服务端必须支持 Historian, 否则统一返回 BadHistoryOperationUnsupported
  • 节点的 AccessLevel bit 4 (HistoryRead) / bit 8 (HistoryWrite) 必须置位
  • 节点 Historizing Attribute (20) 决定是否在记录历史

下一步