Method Subscribe
- Namespace
- Skyline.DataMiner.DataSources.OpenConfig.Gnmi.Api
- Assembly
- Skyline.DataMiner.DataSources.OpenConfig.Gnmi.dll
Subscribe(string, TimeSpan, IEnumerable<string>, Action<IEnumerable<GnmiResponseValue>>)
Adds a subscription with a sample interval on the endpoint for the specified paths.
public void Subscribe(string subscriptionName, TimeSpan sampleInterval, IEnumerable<string> paths, Action<IEnumerable<GnmiResponseValue>> action = null)
Parameters
subscriptionName
stringAn identifying name for this subscription. The name must be unique for the channel or the request will be ignored if already active.
sampleInterval
TimeSpanInterval between samples. Assign zero to receive at lowest interval as possible.
paths
IEnumerable<string>The model paths to subscribe to. A path should be formatted as a concatenation of node names separated by either a forward or backward slash.
action
Action<IEnumerable<GnmiResponseValue>>The callback action to execute when an update is received.
Exceptions
- ArgumentNullException
The action argument cannot be null when there is no DataMapper present.
- ArgumentOutOfRangeException
The sampleInterval argument cannot be negative.
- ArgumentException
Name of the subscription cannot be null, empty, or a whitespace.
- ArgumentNullException
The paths argument cannot be null.
- ArgumentException
There should be at least one path present in the paths argument.
- RequestFailedException
There was an exception thrown by the DxM.
Subscribe(string, IEnumerable<string>, Action<IEnumerable<GnmiResponseValue>>)
Adds a subscription for changed values on the endpoint for the specified paths.
public void Subscribe(string subscriptionName, IEnumerable<string> paths, Action<IEnumerable<GnmiResponseValue>> action = null)
Parameters
subscriptionName
stringAn identifying name for this subscription. The name must be unique for the channel or the request will be ignored if already active.
paths
IEnumerable<string>The model paths to subscribe to. A path should be formatted as a concatenation of node names separated by either a forward or backward slash.
action
Action<IEnumerable<GnmiResponseValue>>The callback action to execute when an update is received.
Exceptions
- ArgumentNullException
The action argument cannot be null when there is no DataMapper present.
- ArgumentException
Name of the subscription cannot be null, empty, or a whitespace.
- ArgumentNullException
The paths argument cannot be null.
- ArgumentException
There should be at least one path present in the paths argument.
- RequestFailedException
There was an exception thrown by the DxM.
Subscribe(string, TimeSpan, IEnumerable<Path>, Action<IEnumerable<GnmiResponseValue>>)
Adds a subscription with a sample interval on the endpoint for the specified paths.
public void Subscribe(string subscriptionName, TimeSpan sampleInterval, IEnumerable<Path> paths, Action<IEnumerable<GnmiResponseValue>> action = null)
Parameters
subscriptionName
stringAn identifying name for this subscription. The name must be unique for the channel or the request will be ignored if already active.
sampleInterval
TimeSpanInterval between samples. Assign zero to receive at lowest interval as possible.
paths
IEnumerable<Path>The model paths to subscribe to. This uses the actual gNMI Path class.
action
Action<IEnumerable<GnmiResponseValue>>The callback action to execute when an update is received.
Exceptions
- ArgumentNullException
The action argument cannot be null when there is no DataMapper present.
- ArgumentOutOfRangeException
The sampleInterval argument cannot be negative.
- ArgumentException
Name of the subscription cannot be null, empty, or a whitespace.
- ArgumentNullException
The paths argument cannot be null.
- ArgumentException
There should be at least one path present in the paths argument.
- RequestFailedException
There was an exception thrown by the DxM.
Subscribe(string, IEnumerable<Path>, Action<IEnumerable<GnmiResponseValue>>)
Adds a subscription for changed values on the endpoint for the specified paths.
public void Subscribe(string subscriptionName, IEnumerable<Path> paths, Action<IEnumerable<GnmiResponseValue>> action = null)
Parameters
subscriptionName
stringAn identifying name for this subscription. The name must be unique for the channel or the request will be ignored if already active.
paths
IEnumerable<Path>The model paths to subscribe to. This uses the actual gNMI Path class.
action
Action<IEnumerable<GnmiResponseValue>>The callback action to execute when an update is received.
Exceptions
- ArgumentNullException
The action argument cannot be null when there is no DataMapper present.
- ArgumentException
Name of the subscription cannot be null, empty, or a whitespace.
- ArgumentNullException
The paths argument cannot be null.
- ArgumentException
There should be at least one path present in the paths argument.
- RequestFailedException
There was an exception thrown by the DxM.