The ISubscription interface.
More...
The ISubscription interface.
Definition at line 48 of file ISubscription.cs.
◆ DataChangedEventHandler()
The DataChanged event delegate.
- Parameters
-
subscription | The source subscription, which raises the event. |
args | The data changed event arguments. |
◆ Subscribe()
Subscribes to a node.
- Parameters
-
address | Address of the subscription. |
- Returns
- Result of the method call.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
Example
var properties = comm.datalayer.SubscriptionProperties.CreateSubscriptionProperties(
builder: builder,
idOffset: builder.CreateString("mySubscription"),
keepaliveInterval: 10000,
publishInterval: 1000,
errorInterval: 10000);
builder.Finish(properties.Value);
var propertiesFlatbuffers =
new Variant(builder);
var(createResult, subscription) = client.CreateSubscription(propertiesFlatbuffers, userData: null);
const string cpuLoad = "framework/metrics/system/cpu-utilisation-percent";
var subscribeResult = subscription.Subscribe(address: cpuLoad);
Provides the implementation for IVariant.
static readonly int DefaultFlatbuffersInitialSize
Gets the default Flatbuffers initial size in bytes.
◆ SubscribeAsync()
Subscribes to a node asynchronously.
- Parameters
-
address | Address of the subscription. |
- Returns
- Task.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
◆ SubscribeMulti()
Subscribes to a list of nodes.
- Parameters
-
addresses | An array of the addresses. |
- Returns
- Result of the method call.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
◆ SubscribeMultiAsync()
Subscribes to a list of nodes asynchronously.
- Parameters
-
addresses | An array of the addresses. |
- Returns
- Task.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
◆ Unsubscribe()
Unsubscribes the node.
- Parameters
-
address | Address of the subscription. |
- Returns
- Result of the method call.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
◆ UnsubscribeAll()
Unsubscribes all subscribed nodes.
- Returns
- Result of the method call.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
◆ UnsubscribeAllAsync()
Unsubscribes all subscribed nodes asynchronously.
- Returns
- Task.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
◆ UnsubscribeAsync()
Unsubscribes to a node asynchronously.
- Parameters
-
address | Address of the subscription. |
- Returns
- Result of the method call.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
◆ UnsubscribeMulti()
Unsubscribes to a list of nodes.
- Parameters
-
addresses | An array of the addresses. |
- Returns
- Result of the method call.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
◆ UnsubscribeMultiAsync()
Unsubscribes a list of nodes asynchronously.
- Parameters
-
addresses | An array of the addresses. |
- Returns
- Task.
- Exceptions
-
ObjectDisposedException | Cannot access a disposed object. |
ArgumentNullException | Argument cannot be null. |
◆ DefaultErrorIntervalMillis
readonly uint DefaultErrorIntervalMillis = 10000 |
|
static |
The default error interval in milli seconds.
Definition at line 67 of file ISubscription.cs.
◆ DefaultKeepaliveIntervalMillis
readonly uint DefaultKeepaliveIntervalMillis = 60000 |
|
static |
The default keep alive interval in milli seconds.
Definition at line 57 of file ISubscription.cs.
◆ DefaultPublishIntervalMillis
readonly uint DefaultPublishIntervalMillis = 1000 |
|
static |
The default publish interval in milli seconds.
Definition at line 62 of file ISubscription.cs.
◆ DefaultSamplingIntervalMicros
readonly ulong DefaultSamplingIntervalMicros = 1000000 |
|
static |
The default sampling interval in micro seconds.
Definition at line 72 of file ISubscription.cs.
◆ Client
◆ Id
◆ UserData
◆ DataChanged
The documentation for this interface was generated from the following file: