ctrlX Data Layer .NET API  6.0.1
Loading...
Searching...
No Matches
IClient Interface Reference

The IClient interface. More...

Inheritance diagram for IClient:
INativeDisposable

Public Member Functions

DLR_RESULT IVariant value Browse (string address)
 
Task< IClientAsyncResult > BrowseAsync (string address)
 Browses a node asynchronously.
 
DLR_RESULT IBulkItem[] items BulkBrowse (string[] addresses)
 
Task< IClientAsyncBulkResult > BulkBrowseAsync (string[] addresses)
 Browses a list of nodes asynchronously.
 
DLR_RESULT IBulkItem[] items BulkCreate (string[] addresses, IVariant[] args)
 
Task< IClientAsyncBulkResult > BulkCreateAsync (string[] addresses, IVariant[] args)
 Creates a list of nodes with arguments asynchronously.
 
DLR_RESULT IBulkItem[] items BulkRead (string[] addresses)
 
DLR_RESULT IBulkItem[] items BulkRead (string[] addresses, IVariant[] args)
 
Task< IClientAsyncBulkResult > BulkReadAsync (string[] addresses)
 Reads values from a list of nodes asynchronously.
 
Task< IClientAsyncBulkResult > BulkReadAsync (string[] addresses, IVariant[] args)
 Reads values from a list of nodes with arguments asynchronously.
 
DLR_RESULT IBulkItem[] items BulkReadMetadata (string[] addresses)
 
Task< IClientAsyncBulkResult > BulkReadMetadataAsync (string[] addresses)
 Reads the metadata from a list of nodes asynchronously.
 
DLR_RESULT IBulkItem[] items BulkRemove (string[] addresses)
 
Task< IClientAsyncBulkResult > BulkRemoveAsync (string[] addresses)
 Removes a list of nodes asynchronously.
 
DLR_RESULT IBulkItem[] items BulkWrite (string[] addresses, IVariant[] writeValues)
 
Task< IClientAsyncBulkResult > BulkWriteAsync (string[] addresses, IVariant[] writeValues)
 Writes a list of values to a list of nodes asynchronously.
 
DLR_RESULT IVariant value Create (string address, IVariant args)
 
Task< IClientAsyncResult > CreateAsync (string address, IVariant args)
 Creates a node with arguments asynchronously.
 
DLR_RESULT ISubscription subscription CreateSubscription (IVariant subscriptionPropertiesFlatbuffers, object userData)
 
DLR_RESULT ISubscription subscription CreateSubscription (SubscriptionPropertiesT subscriptionProperties, object userData=null)
 
Task< ISubscriptionAsyncResult > CreateSubscriptionAsync (IVariant subscriptionPropertiesFlatbuffers, object userData)
 Creates an subscription asynchronously.
 
Task< ISubscriptionAsyncResult > CreateSubscriptionAsync (SubscriptionPropertiesT subscriptionProperties, object userData)
 Creates an subscription asynchronously.
 
DLR_RESULT Ping ()
 Pings the remote.
 
Task< IClientAsyncResult > PingAsync ()
 Pings the remote asynchronously.
 
DLR_RESULT IVariant value Read (string address)
 
DLR_RESULT IVariant value Read (string address, IVariant args)
 
Task< IClientAsyncResult > ReadAsync (string address)
 Reads a node value asynchronously.
 
Task< IClientAsyncResult > ReadAsync (string address, IVariant args)
 Reads a node value with arguments asynchronously.
 
DLR_RESULT IVariant value ReadJson (string address, int indentStep=0)
 
DLR_RESULT IVariant value ReadJson (string address, IVariant args, int indentStep=0)
 
Task< IClientAsyncResult > ReadJsonAsync (string address, int indentStep=0)
 Reads a node value as JSON asynchronously.
 
Task< IClientAsyncResult > ReadJsonAsync (string address, IVariant args, int indentStep=0)
 Reads a node value as JSON with arguments asynchronously.
 
DLR_RESULT IVariant value ReadMetadata (string address)
 
Task< IClientAsyncResult > ReadMetadataAsync (string address)
 Reads the metadata of a node asynchronously.
 
DLR_RESULT Remove (string address)
 Removes a node.
 
Task< IClientAsyncResult > RemoveAsync (string address)
 Removes a node asynchronously.
 
DLR_RESULT SetTimeout (DLR_TIMEOUT_SETTING timeout, uint value)
 Sets the timeout of each request.
 
DLR_RESULT Write (string address, IVariant writeValue)
 Writes the value to a node.
 
Task< IClientAsyncResult > WriteAsync (string address, IVariant writeValue)
 Writes a value to a node asynchronously.
 
IVariant error WriteJson (string address, string json)
 
Task< IClientAsyncResult > WriteJsonAsync (string address, string json)
 Writes a JSON value to a node asynchronously.
 

Public Attributes

 DLR_RESULT
 Writes a JSON value to a node.
 
DLR_RESULT result
 Reads a node value.
 

Properties

IVariant AuthToken [get]
 Gets the authentication token (JWT) as string.
 
DLR_RESULT ConnectionStatus [get]
 Gets the connection status.
 
bool IsConnected [get]
 Checks the connection.
 
IDatalayerSystem System [get]
 Gets the system.
 
- Properties inherited from INativeDisposable
bool IsDisposed [get]
 Checks disposed.
 

Detailed Description

The IClient interface.

Definition at line 10 of file IClient.cs.

Member Function Documentation

◆ BrowseAsync()

Task< IClientAsyncResult > BrowseAsync ( string  address)

Browses a node asynchronously.

Parameters
addressAddress of the node.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ BulkBrowseAsync()

Task< IClientAsyncBulkResult > BulkBrowseAsync ( string[]  addresses)

Browses a list of nodes asynchronously.

Parameters
addressesAddress of the nodes.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ BulkCreateAsync()

Task< IClientAsyncBulkResult > BulkCreateAsync ( string[]  addresses,
IVariant[]  args 
)

Creates a list of nodes with arguments asynchronously.

Parameters
addressesAddresses of the nodes.
argsRequest arguments.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ BulkReadAsync() [1/2]

Task< IClientAsyncBulkResult > BulkReadAsync ( string[]  addresses)

Reads values from a list of nodes asynchronously.

Parameters
addressesAddresses of the nodes.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ BulkReadAsync() [2/2]

Task< IClientAsyncBulkResult > BulkReadAsync ( string[]  addresses,
IVariant[]  args 
)

Reads values from a list of nodes with arguments asynchronously.

Parameters
addressesAddresses of the nodes.
argsRequest arguments.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
ArgumentExceptionInvalid arguments.

◆ BulkReadMetadataAsync()

Task< IClientAsyncBulkResult > BulkReadMetadataAsync ( string[]  addresses)

Reads the metadata from a list of nodes asynchronously.

Parameters
addressesAddresses of the nodes.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ BulkRemoveAsync()

Task< IClientAsyncBulkResult > BulkRemoveAsync ( string[]  addresses)

Removes a list of nodes asynchronously.

Parameters
addressesAddresses of the nodes.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ BulkWriteAsync()

Task< IClientAsyncBulkResult > BulkWriteAsync ( string[]  addresses,
IVariant[]  writeValues 
)

Writes a list of values to a list of nodes asynchronously.

Parameters
addressesAddresses of the nodes.
writeValuesValues to write.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
ArgumentExceptionInvalid arguments.

◆ CreateAsync()

Task< IClientAsyncResult > CreateAsync ( string  address,
IVariant  args 
)

Creates a node with arguments asynchronously.

Parameters
addressAddress of the node.
argsRequest arguments.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Example

var userData = new Variant(42);
var task = client.CreateAsync(string, userData);
Provides the implementation for IVariant.
Definition: Variant.cs:19

◆ CreateSubscriptionAsync() [1/2]

Task< ISubscriptionAsyncResult > CreateSubscriptionAsync ( IVariant  subscriptionPropertiesFlatbuffers,
object  userData 
)

Creates an subscription asynchronously.

Parameters
subscriptionPropertiesFlatbuffersProperties of the subscription as flatbuffers.
userDataOptional user data can be provided, which is available in the subscription data changed event context.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Example

var userData = new Variant(42);
var builder = new FlatBufferBuilder(Variant.DefaultFlatbuffersInitialSize);
var properties = SubscriptionProperties.CreateSubscriptionProperties(
builder: builder,
idOffset: builder.CreateString("mySubscription"),
keepaliveInterval: KeepLiveIntervalMillis,
publishInterval: PublishIntervalMillis,
rulesOffset: default,
errorInterval: ErrorIntervalMillis);
builder.Finish(properties.Value);
var propertiesFlatbuffers = new Variant(builder);
var task = client.CreateSubscriptionAsync(propertiesFlatbuffers, userData);
static readonly int DefaultFlatbuffersInitialSize
Gets the default Flatbuffers initial size in bytes.
Definition: Variant.cs:748

◆ CreateSubscriptionAsync() [2/2]

Task< ISubscriptionAsyncResult > CreateSubscriptionAsync ( SubscriptionPropertiesT  subscriptionProperties,
object  userData 
)

Creates an subscription asynchronously.

Parameters
subscriptionPropertiesProperties of the subscription
userDataOptional user data can be provided, which is available in the subscription data changed event context.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Example

var userData = new Variant(42);
var props = new SubscriptionPropertiesT()
{
Id = "mySubscription",
};
var task = client.CreateSubscriptionAsync(propertiesFlatbuffers, userData);
The ISubscription interface.
static readonly uint DefaultKeepaliveIntervalMillis
The default keep alive interval in milli seconds.
static readonly uint DefaultErrorIntervalMillis
The default error interval in milli seconds.
static readonly uint DefaultPublishIntervalMillis
The default publish interval in milli seconds.

◆ Ping()

DLR_RESULT Ping ( )

Pings the remote.

Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.

◆ PingAsync()

Task< IClientAsyncResult > PingAsync ( )

Pings the remote asynchronously.

Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.

◆ ReadAsync() [1/2]

Task< IClientAsyncResult > ReadAsync ( string  address)

Reads a node value asynchronously.

Parameters
addressAddress of the node.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ ReadAsync() [2/2]

Task< IClientAsyncResult > ReadAsync ( string  address,
IVariant  args 
)

Reads a node value with arguments asynchronously.

Parameters
addressAddress of the node.
argsRequest arguments.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ ReadJsonAsync() [1/2]

Task< IClientAsyncResult > ReadJsonAsync ( string  address,
int  indentStep = 0 
)

Reads a node value as JSON asynchronously.

Parameters
addressAddress of the node.
indentStepIndentation length for json string.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ ReadJsonAsync() [2/2]

Task< IClientAsyncResult > ReadJsonAsync ( string  address,
IVariant  args,
int  indentStep = 0 
)

Reads a node value as JSON with arguments asynchronously.

Parameters
addressAddress of the node.
argsRequest arguments (JSON).
indentStepIndentation length for json string.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ ReadMetadataAsync()

Task< IClientAsyncResult > ReadMetadataAsync ( string  address)

Reads the metadata of a node asynchronously.

Parameters
addressAddress of the node.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ Remove()

DLR_RESULT Remove ( string  address)

Removes a node.

Parameters
addressAddress of the node.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ RemoveAsync()

Task< IClientAsyncResult > RemoveAsync ( string  address)

Removes a node asynchronously.

Parameters
addressAddress of the node.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ SetTimeout()

DLR_RESULT SetTimeout ( DLR_TIMEOUT_SETTING  timeout,
uint  value 
)

Sets the timeout of each request.

Parameters
timeoutTimeout to set.
valueValue to set.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.

◆ Write()

DLR_RESULT Write ( string  address,
IVariant  writeValue 
)

Writes the value to a node.

Parameters
addressAddress of the node.
writeValueValue to write.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ WriteAsync()

Task< IClientAsyncResult > WriteAsync ( string  address,
IVariant  writeValue 
)

Writes a value to a node asynchronously.

Parameters
addressAddress of the node.
writeValueValue to set.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ WriteJsonAsync()

Task< IClientAsyncResult > WriteJsonAsync ( string  address,
string  json 
)

Writes a JSON value to a node asynchronously.

Parameters
addressAddress of the node.
jsonJSON value to write.
Returns
The task.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Member Data Documentation

◆ DLR_RESULT

Writes a JSON value to a node.

Parameters
addressAddress of the node.
jsonJSON value to write.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Definition at line 265 of file IClient.cs.

◆ result

DLR_RESULT result

Reads a node value.

Creates a subscription.

Removes a list of nodes.

Creates a list of nodes with arguments.

Creates a node with arguments.

Browses a list of nodes.

Browses a node.

Writes a list of values to a list of nodes.

Reads the metadata from a list of nodes.

Reads the metadata of a node.

Reads a node value as JSON with arguments.

Reads a node value as JSON.

Reads values from a list of nodes with arguments.

Reads values from a list of nodes.

Reads a node value with arguments.

Parameters
addressAddress of the node.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressAddress of the node.
argsRequest arguments.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
argsRequest arguments.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
ArgumentExceptionInvalid arguments.
Parameters
addressAddress of the node.
indentStepIndentation length for json string.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressAddress of the node.
argsRequest arguments (JSON).
indentStepIndentation length for json string.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
writeValuesValues to write.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
ArgumentExceptionInvalid arguments.
Parameters
addressesAddress of the nodes.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
argsRequest arguments.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
subscriptionPropertiesProperties of the subscription.
userDataOptional user data can be provided, which is available in the subscription data changed event context.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

var userData = new Variant(42); var props = new SubscriptionPropertiesT() { Id = "mySubscription", PublishInterval = ISubscription.DefaultPublishIntervalMillis, KeepaliveInterval = ISubscription.DefaultKeepaliveIntervalMillis, ErrorInterval = ISubscription.DefaultErrorIntervalMillis, }; var (result, subscription) = client.CreateSubscription(propertiesFlatbuffers, userData);

Parameters
subscriptionPropertiesFlatbuffersProperties of the subscription as flatbuffers.
userDataOptional user data can be provided, which is available in the subscription data changed event context.
Returns
The result.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

var userData = new Variant(42); var builder = new FlatBufferBuilder(Variant.DefaultFlatbuffersInitialSize); var properties = SubscriptionProperties.CreateSubscriptionProperties( builder: builder, idOffset: builder.CreateString("mySubscription"), keepaliveInterval: KeepLiveIntervalMillis, publishInterval: PublishIntervalMillis, rulesOffset: default, errorInterval: ErrorIntervalMillis); builder.Finish(properties.Value); var propertiesFlatbuffers = new Variant(builder); var (result, subscription) = client.CreateSubscription(propertiesFlatbuffers, userData);

Definition at line 66 of file IClient.cs.

Property Documentation

◆ AuthToken

IVariant AuthToken
get

Gets the authentication token (JWT) as string.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.
InvalidOperationExceptionOperation not allowed.

Definition at line 34 of file IClient.cs.

◆ ConnectionStatus

DLR_RESULT ConnectionStatus
get

Gets the connection status.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Definition at line 27 of file IClient.cs.

◆ IsConnected

bool IsConnected
get

Checks the connection.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Definition at line 21 of file IClient.cs.

◆ System

IDatalayerSystem System
get

Gets the system.

Definition at line 15 of file IClient.cs.


The documentation for this interface was generated from the following file: