Method StartValueMonitor
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
StartValueMonitor(string, int, Action<TableValueChange>, TimeSpan, bool)
Starts monitoring value changes in the specified table. Every change will invoke the specified onChange action.
void StartValueMonitor(string sourceId, int primaryKeyColumnIdx, Action<TableValueChange> onChange, TimeSpan subscribeTimeout, bool includeCurrentValues)
Parameters
sourceIdstringThe identifier for the source of the subscription (e.g., a GUID or unique string).
primaryKeyColumnIdxintThe index of the table's primary key column.
onChangeAction<TableValueChange>The action to perform on each change.
subscribeTimeoutTimeSpanThe maximum time to wait for the subscription to be established.
includeCurrentValuesbooltrueto also receive the current values; otherwisefalse.
Remarks
These extension methods are intended for use outside of Protocols (e.g., in Automation scripts or external apps).
If you are working **within a Protocol**, use the methods defined in the Skyline.DataMiner.Core.DataMinerSystem.Protocol.Subscription.Monitors namespace instead. These versions use SLProtocol to correctly handle subscription cleanup.
If includeCurrentValues is set to true and the table is a partial table, the initial data will only contain the first page of the table.
Changes to other pages will still trigger the onChange action, but the initial data will not include those other pages.
Exceptions
- ArgumentNullException
sourceId, oronChangeis null.- ArgumentOutOfRangeException
primaryKeyColumnIdxis less than 0.- InvalidOperationException
Could not establish subscriptions within the given timeout.
StartValueMonitor(string, int, Action<TableValueChange>, bool)
Starts monitoring value changes in the specified table, using a default subscription timeout.
void StartValueMonitor(string sourceId, int primaryKeyColumnIdx, Action<TableValueChange> onChange, bool includeCurrentValues)
Parameters
sourceIdstringThe identifier for the source of the subscription (e.g., a GUID or unique string).
primaryKeyColumnIdxintThe index of the table's primary key column.
onChangeAction<TableValueChange>The action to perform on each change.
includeCurrentValuesbooltrueto also receive the current values; otherwisefalse.
Remarks
These extension methods are intended for use outside of Protocols (e.g., in Automation scripts or external apps).
If you are working **within a Protocol**, use the methods defined in the Skyline.DataMiner.Core.DataMinerSystem.Protocol.Subscription.Monitors namespace instead. These versions use SLProtocol to correctly handle subscription cleanup.
If includeCurrentValues is set to true and the table is a partial table, the initial data will only contain the first page of the table.
Changes to other pages will still trigger the onChange action, but the initial data will not include those other pages.
Exceptions
- ArgumentNullException
sourceId, oronChangeis null.- ArgumentOutOfRangeException
primaryKeyColumnIdxis less than 0.- InvalidOperationException
Could not establish subscriptions within the default timeout.
StartValueMonitor(string, int, int[], Action<TableValueChange>, TimeSpan, bool)
Starts monitoring filtered column value changes in the specified table.
void StartValueMonitor(string sourceId, int primaryKeyColumnIdx, int[] filteredColumnPids, Action<TableValueChange> onChange, TimeSpan subscribeTimeout, bool includeCurrentValues)
Parameters
sourceIdstringThe identifier for the source of the subscription (e.g., a GUID or unique string).
primaryKeyColumnIdxintThe index of the table's primary key column.
filteredColumnPidsint[]Array of column parameter IDs to monitor. The result will contain only these and the primary key.
onChangeAction<TableValueChange>The action to perform on each change.
subscribeTimeoutTimeSpanThe maximum time to wait for the subscription to be established.
includeCurrentValuesbooltrueto also receive the current values; otherwisefalse.
Remarks
These extension methods are intended for use outside of Protocols (e.g., in Automation scripts or external apps).
If you are working **within a Protocol**, use the methods defined in the Skyline.DataMiner.Core.DataMinerSystem.Protocol.Subscription.Monitors namespace instead. These versions use SLProtocol to correctly handle subscription cleanup.
If includeCurrentValues is set to true and the table is a partial table, the initial data will only contain the first page of the table.
Changes to other pages will still trigger the onChange action, but the initial data will not include those other pages.
Exceptions
- ArgumentNullException
sourceId,filteredColumnPids, oronChangeis null.- ArgumentOutOfRangeException
primaryKeyColumnIdxis less than 0.- InvalidOperationException
Could not establish subscriptions within the given timeout.
StartValueMonitor(string, int, int[], Action<TableValueChange>, bool)
Starts monitoring filtered column value changes in the specified table, using a default subscription timeout.
void StartValueMonitor(string sourceId, int primaryKeyColumnIdx, int[] filteredColumnPids, Action<TableValueChange> onChange, bool includeCurrentValues)
Parameters
sourceIdstringThe identifier for the source of the subscription (e.g., a GUID or unique string).
primaryKeyColumnIdxintThe index of the table's primary key column.
filteredColumnPidsint[]Array of column parameter IDs to monitor. The result will contain only these and the primary key.
onChangeAction<TableValueChange>The action to perform on each change.
includeCurrentValuesbooltrueto also receive the current values; otherwisefalse.
Remarks
These extension methods are intended for use outside of Protocols (e.g., in Automation scripts or external apps).
If you are working **within a Protocol**, use the methods defined in the Skyline.DataMiner.Core.DataMinerSystem.Protocol.Subscription.Monitors namespace instead. These versions use SLProtocol to correctly handle subscription cleanup.
If includeCurrentValues is set to true and the table is a partial table, the initial data will only contain the first page of the table.
Changes to other pages will still trigger the onChange action, but the initial data will not include those other pages.
Exceptions
- ArgumentNullException
sourceId,filteredColumnPids, oronChangeis null.- ArgumentOutOfRangeException
primaryKeyColumnIdxis less than 0.- InvalidOperationException
Could not establish subscriptions within the default timeout.