Method StartElementAlarmLevelMonitor
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
StartElementAlarmLevelMonitor(string, Action<ElementAlarmlevelChange>, TimeSpan)
Starts monitoring alarm level changes across all elements. Every change triggers the specified onChange
action.
void StartElementAlarmLevelMonitor(string sourceId, Action<ElementAlarmlevelChange> onChange, TimeSpan subscribeTimeout)
Parameters
sourceId
stringUnique identifier for the subscription source (e.g., a GUID).
onChange
Action<ElementAlarmlevelChange>Callback invoked when an element’s alarm level changes.
subscribeTimeout
TimeSpanMaximum duration to wait for subscription establishment.
Remarks
These extension methods are intended for use outside of Protocols, such as in Automation scripts or external processes.
If you're using these within a Protocol, use the overloads in the
Skyline.DataMiner.Core.DataMinerSystem.Protocol.Subscription.Monitors
namespace with SLProtocol
to ensure proper subscription cleanup.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
Subscription could not be established within the specified timeout.
StartElementAlarmLevelMonitor(string, Action<ElementAlarmlevelChange>)
Starts monitoring alarm level changes using a default subscription timeout.
void StartElementAlarmLevelMonitor(string sourceId, Action<ElementAlarmlevelChange> onChange)
Parameters
sourceId
stringUnique identifier for the subscription source (e.g., a GUID).
onChange
Action<ElementAlarmlevelChange>Callback invoked when an element’s alarm level changes.
Remarks
These extension methods are intended for use outside of Protocols.
If used within a Protocol, prefer the SLProtocol
-based methods for automatic cleanup.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
Subscription could not be established within the default timeout.