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
sourceIdstringUnique identifier representing the source of the subscription (e.g., a GUID).
onChangeAction<ElementAlarmlevelChange>Callback invoked when an alarm level change is detected.
subscribeTimeoutTimeSpanMaximum 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
sourceIdoronChangeis 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
sourceIdstringIdentifier representing the source of the subscription (e.g., a GUID).
onChangeAction<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
sourceIdoronChangeis null.- InvalidOperationException
Subscription could not be created within the default timeout.