fix(alarms): OnEnableDisable native-check via lock-guarded IsNativeAlarmNode + unstale AlarmCommand doc (code-review)
This commit is contained in:
@@ -32,9 +32,9 @@ public static class AlarmCommandsTopic
|
|||||||
/// The Part 9 operation, one of: <c>Acknowledge</c>, <c>Confirm</c>, <c>OneShotShelve</c>,
|
/// The Part 9 operation, one of: <c>Acknowledge</c>, <c>Confirm</c>, <c>OneShotShelve</c>,
|
||||||
/// <c>TimedShelve</c>, <c>Unshelve</c>, <c>Enable</c>, <c>Disable</c>, <c>AddComment</c>. These map
|
/// <c>TimedShelve</c>, <c>Unshelve</c>, <c>Enable</c>, <c>Disable</c>, <c>AddComment</c>. These map
|
||||||
/// 1:1 onto the engine's <c>Part9StateMachine.Apply*</c> calls on the consuming side (T19).
|
/// 1:1 onto the engine's <c>Part9StateMachine.Apply*</c> calls on the consuming side (T19).
|
||||||
/// Note: <c>Enable</c> and <c>Disable</c> are part of the vocabulary but are not yet wired at the
|
/// All of <c>Acknowledge</c>/<c>Confirm</c>/<c>AddComment</c>/<c>Shelve</c>/<c>TimedUnshelve</c>/
|
||||||
/// node-manager seam (T18 wired Acknowledge/Confirm/AddComment/Shelve/TimedUnshelve only);
|
/// <c>Enable</c>/<c>Disable</c> are wired at the node-manager seam; the <c>Enable</c>/<c>Disable</c>
|
||||||
/// <c>OnEnableDisable</c> delegate wiring is a future task.
|
/// operations are produced by the condition's <c>OnEnableDisable</c> delegate.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="User">The acting user — the authenticated session identity's display/name.</param>
|
/// <param name="User">The acting user — the authenticated session identity's display/name.</param>
|
||||||
/// <param name="Comment">
|
/// <param name="Comment">
|
||||||
|
|||||||
@@ -642,7 +642,7 @@ public sealed class OtOpcUaNodeManager : CustomNodeManager2
|
|||||||
// engine enable/disable surface (Phase 3 decision #2) — they short-circuit to BadNotSupported.
|
// engine enable/disable surface (Phase 3 decision #2) — they short-circuit to BadNotSupported.
|
||||||
alarm.OnEnableDisable = (context, condition, enabling) =>
|
alarm.OnEnableDisable = (context, condition, enabling) =>
|
||||||
{
|
{
|
||||||
if (_nativeAlarmNodeIds.Contains(alarmNodeId))
|
if (IsNativeAlarmNode(alarmNodeId))
|
||||||
return new ServiceResult(StatusCodes.BadNotSupported);
|
return new ServiceResult(StatusCodes.BadNotSupported);
|
||||||
return HandleAlarmCommand(context, condition, enabling ? "Enable" : "Disable", comment: null, unshelveAt: null);
|
return HandleAlarmCommand(context, condition, enabling ? "Enable" : "Disable", comment: null, unshelveAt: null);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user