feat(client-cli): add ack/confirm/shelve alarm commands with service layer

Adds ConfirmAlarmAsync and ShelveAlarmAsync to IOpcUaClientService and
OpcUaClientService (mirroring the AcknowledgeAlarmAsync pattern: same
CallMethodAsync/ServiceResultException/StatusCode contract). Adds ShelveKind
enum (OneShot/Timed/Unshelve). Adds three new CLI commands — ack, confirm,
shelve — with hex EventId input and per-command argument validation.
Updates both fakes (CLI + UI) to implement the new interface members and
record calls. Adds 16 unit tests covering argument mapping, invalid-input
CommandException paths, bad-status output, and disconnect-in-finally.
This commit is contained in:
Joseph Doherty
2026-06-11 05:46:25 -04:00
parent a6fed85ac9
commit 1f172e55f7
11 changed files with 819 additions and 1 deletions
@@ -0,0 +1,25 @@
namespace ZB.MOM.WW.OtOpcUa.Client.Shared.Models;
/// <summary>
/// Shelve operations supported by the OPC UA Part 9 ShelvedStateMachine.
/// </summary>
public enum ShelveKind
{
/// <summary>
/// OneShotShelve: suppresses the alarm for one occurrence. The alarm automatically
/// unshelves when it next returns to the inactive state.
/// </summary>
OneShot,
/// <summary>
/// TimedShelve: suppresses the alarm for a specified duration (seconds).
/// Requires a positive <c>shelvingTimeSeconds</c> argument.
/// </summary>
Timed,
/// <summary>
/// Unshelve: removes an active OneShotShelve or TimedShelve, returning the alarm
/// to its normal active-notification state.
/// </summary>
Unshelve
}