docs(dcl): M2.13 review nits — OriginalRaiseTime ConditionRefresh/UTC caveats + Description-vs-Message note (#27)
This commit is contained in:
@@ -398,7 +398,11 @@ public class RealOpcUaClient : IOpcUaClient
|
|||||||
|
|
||||||
// 13: AlarmConditionType/ActiveState/TransitionTime — the UTC instant the active-state
|
// 13: AlarmConditionType/ActiveState/TransitionTime — the UTC instant the active-state
|
||||||
// last flipped to TRUE. Mapped to OriginalRaiseTime; absent on non-AlarmCondition
|
// last flipped to TRUE. Mapped to OriginalRaiseTime; absent on non-AlarmCondition
|
||||||
// events (ConditionType base events rarely carry it).
|
// events (ConditionType base events rarely carry it). CAVEAT: during a
|
||||||
|
// ConditionRefresh replay the server MAY re-stamp this to the current/restart time
|
||||||
|
// rather than the historical raise instant (OPC UA Part 9 §5.5.2 makes it advisory),
|
||||||
|
// so a snapshot-derived OriginalRaiseTime can look like the refresh time — it is
|
||||||
|
// display-only and not treated as authoritative.
|
||||||
filter.SelectClauses.Add(SelectField(ObjectTypeIds.AlarmConditionType, "ActiveState", "TransitionTime")); // 13
|
filter.SelectClauses.Add(SelectField(ObjectTypeIds.AlarmConditionType, "ActiveState", "TransitionTime")); // 13
|
||||||
|
|
||||||
// 14–17: LimitAlarmType limit thresholds — configuration-time set-points exposed as
|
// 14–17: LimitAlarmType limit thresholds — configuration-time set-points exposed as
|
||||||
@@ -413,8 +417,9 @@ public class RealOpcUaClient : IOpcUaClient
|
|||||||
// UNAVAILABLE via standard OPC UA A&C event fields (documented here so future
|
// UNAVAILABLE via standard OPC UA A&C event fields (documented here so future
|
||||||
// maintainers know these were considered, not overlooked):
|
// maintainers know these were considered, not overlooked):
|
||||||
// Category — not a standard event field; server-specific extensions only.
|
// Category — not a standard event field; server-specific extensions only.
|
||||||
// Description — not a per-event text field; the OPC UA Description attribute is a
|
// Description — NativeAlarmTransition.Description is a static template description;
|
||||||
// static node property, not carried in event notifications.
|
// OPC UA events carry dynamic Message text (index 4, mapped) but no
|
||||||
|
// static template description in the notification, so this stays empty.
|
||||||
// OperatorUser — not available on the standard ConditionRefresh replay stream;
|
// OperatorUser — not available on the standard ConditionRefresh replay stream;
|
||||||
// present on Acknowledge/Confirm method call results, but those do
|
// present on Acknowledge/Confirm method call results, but those do
|
||||||
// not flow through the monitored-item subscription.
|
// not flow through the monitored-item subscription.
|
||||||
@@ -539,6 +544,8 @@ public class RealOpcUaClient : IOpcUaClient
|
|||||||
// transitioned to TRUE). Absent on non-AlarmCondition events → guard + null fallback.
|
// transitioned to TRUE). Absent on non-AlarmCondition events → guard + null fallback.
|
||||||
DateTimeOffset? originalRaiseTime = null;
|
DateTimeOffset? originalRaiseTime = null;
|
||||||
if (fields.Count > 13 && fields[13].Value is DateTime activeTransitionTime)
|
if (fields.Count > 13 && fields[13].Value is DateTime activeTransitionTime)
|
||||||
|
// OPC UA mandates UTC for DateTime fields; a TimeSpan.Zero offset treats an
|
||||||
|
// Unspecified Kind as UTC (consistent with the Time→TransitionTime mapping above).
|
||||||
originalRaiseTime = new DateTimeOffset(activeTransitionTime, TimeSpan.Zero);
|
originalRaiseTime = new DateTimeOffset(activeTransitionTime, TimeSpan.Zero);
|
||||||
|
|
||||||
// Indices 14–17: LimitAlarmType set-point thresholds (HighHighLimit/HighLimit/
|
// Indices 14–17: LimitAlarmType set-point thresholds (HighHighLimit/HighLimit/
|
||||||
|
|||||||
Reference in New Issue
Block a user