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
sourceIdstringUnique identifier for the subscription source (e.g., a GUID).
onChangeAction<ElementAlarmlevelChange>Callback invoked when an element’s alarm level changes.
subscribeTimeoutTimeSpanMaximum 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
sourceIdoronChangeis 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
sourceIdstringUnique identifier for the subscription source (e.g., a GUID).
onChangeAction<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
sourceIdoronChangeis null.- InvalidOperationException
Subscription could not be established within the default timeout.