Method StartAlarmLevelMonitor
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
StartAlarmLevelMonitor(string, Action<ElementAlarmlevelChange>, TimeSpan)
Starts monitoring alarm level changes for a specific element. Every change triggers the specified onChange
action.
void StartAlarmLevelMonitor(string sourceId, Action<ElementAlarmlevelChange> onChange, TimeSpan subscribeTimeout)
Parameters
sourceId
stringUnique identifier representing the source of the subscription (e.g., a GUID).
onChange
Action<ElementAlarmlevelChange>Callback invoked when an alarm level change is detected.
subscribeTimeout
TimeSpanMaximum duration allowed for the subscription setup to complete.
Remarks
Intended for use outside of Protocols (e.g., in automation scripts or external components).
If you're working within a Protocol, use the overloads from the
Skyline.DataMiner.Core.DataMinerSystem.Protocol.Subscription.Monitors
namespace with SLProtocol
to ensure proper subscription cleanup.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
The subscription could not be established within the timeout.
StartAlarmLevelMonitor(string, Action<ElementAlarmlevelChange>)
Starts monitoring alarm level changes for a specific element using the default subscription timeout.
void StartAlarmLevelMonitor(string sourceId, Action<ElementAlarmlevelChange> onChange)
Parameters
sourceId
stringIdentifier representing the source of the subscription (e.g., a GUID).
onChange
Action<ElementAlarmlevelChange>Action to execute when an alarm level change occurs.
Remarks
For non-Protocol usage. For Protocol scenarios, use the SLProtocol-based version.
Exceptions
- ArgumentNullException
sourceId
oronChange
is null.- InvalidOperationException
Subscription could not be created within the default timeout.