ctrlX Data Layer .NET API  4.3.0
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< IClientAsyncResultBrowseAsync (string address)
 Browses a node asynchronously.
 
DLR_RESULT IBulkItem[] items BulkBrowse (string[] addresses)
 
Task< IClientAsyncBulkResultBulkBrowseAsync (string[] addresses)
 Browses a list of nodes asynchronously.
 
DLR_RESULT IBulkItem[] items BulkCreate (string[] addresses, IVariant[] args)
 
Task< IClientAsyncBulkResultBulkCreateAsync (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< IClientAsyncBulkResultBulkReadAsync (string[] addresses)
 Reads values from a list of nodes asynchronously.
 
Task< IClientAsyncBulkResultBulkReadAsync (string[] addresses, IVariant[] args)
 Reads values from a list of nodes with arguments asynchronously.
 
DLR_RESULT IBulkItem[] items BulkReadMetadata (string[] addresses)
 
Task< IClientAsyncBulkResultBulkReadMetadataAsync (string[] addresses)
 Reads the metadata from a list of nodes asynchronously.
 
DLR_RESULT IBulkItem[] items BulkRemove (string[] addresses)
 
Task< IClientAsyncBulkResultBulkRemoveAsync (string[] addresses)
 Removes a list of nodes asynchronously.
 
DLR_RESULT IBulkItem[] items BulkWrite (string[] addresses, IVariant[] writeValues)
 
Task< IClientAsyncBulkResultBulkWriteAsync (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< IClientAsyncResultCreateAsync (string address, IVariant args)
 Creates a node with arguments asynchronously.
 
DLR_RESULT ISubscription subscription CreateSubscription (IVariant subscriptionPropertiesFlatbuffers, object userData)
 
Task< ISubscriptionAsyncResultCreateSubscriptionAsync (IVariant subscriptionPropertiesFlatbuffers, object userData)
 Creates an subscription asynchronously.
 
DLR_RESULT Ping ()
 Pings the remote.
 
Task< IClientAsyncResultPingAsync ()
 Pings the remote asynchronously.
 
DLR_RESULT IVariant value Read (string address)
 
DLR_RESULT IVariant value Read (string address, IVariant args)
 
Task< IClientAsyncResultReadAsync (string address)
 Reads a node value asynchronously.
 
Task< IClientAsyncResultReadAsync (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< IClientAsyncResultReadJsonAsync (string address, int indentStep=0)
 Reads a node value as JSON asynchronously.
 
Task< IClientAsyncResultReadJsonAsync (string address, IVariant args, int indentStep=0)
 Reads a node value as JSON with arguments asynchronously.
 
DLR_RESULT IVariant value ReadMetadata (string address)
 
Task< IClientAsyncResultReadMetadataAsync (string address)
 Reads the metadata of a node asynchronously.
 
DLR_RESULT[] IVariant[] value ReadMulti (string[] addresses)
 
Task< IClientAsyncResult[]> ReadMultiAsync (string[] addresses)
 Reads values from a list of nodes asynchronously.
 
DLR_RESULT Remove (string address)
 Removes a node.
 
Task< IClientAsyncResultRemoveAsync (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< IClientAsyncResultWriteAsync (string address, IVariant writeValue)
 Writes a value to a node asynchronously.
 
IVariant error WriteJson (string address, string json)
 
Task< IClientAsyncResultWriteJsonAsync (string address, string json)
 Writes a JSON value to a node asynchronously.
 
DLR_RESULT[] WriteMulti (string[] addresses, IVariant[] writeValues)
 Writes a list of values to a list of nodes.
 
Task< IClientAsyncResult[]> WriteMultiAsync (string[] addresses, IVariant[] writeValues)
 Writes a list of values to a list of nodes asynchronously.
 

Public Attributes

 DLR_RESULT
 Writes a JSON value to a node.
 
DLR_RESULT result
 Reads a node value.
 
DLR_RESULT[] result
 Reads values from a list of nodes.
 

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 9 of file IClient.cs.

Member Function Documentation

◆ BrowseAsync()

Task< IClientAsyncResult > BrowseAsync ( string  address)

Browses a node asynchronously.

Parameters
addressAddress of the node.
Returns
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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:18

◆ CreateSubscriptionAsync()

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
Result of the method call.
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:730

◆ Ping()

DLR_RESULT Ping ( )

Pings the remote.

Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.

◆ PingAsync()

Task< IClientAsyncResult > PingAsync ( )

Pings the remote asynchronously.

Returns
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ ReadMultiAsync()

Task< IClientAsyncResult[]> ReadMultiAsync ( string[]  addresses)

Reads values from a list of nodes asynchronously.

Parameters
addressesAddresses of the nodes.
Returns
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
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
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

◆ WriteMulti()

DLR_RESULT[] WriteMulti ( string[]  addresses,
IVariant[]  writeValues 
)

Writes a list of values to a list of nodes.

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

◆ WriteMultiAsync()

Task< IClientAsyncResult[]> WriteMultiAsync ( string[]  addresses,
IVariant[]  writeValues 
)

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

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

Member Data Documentation

◆ DLR_RESULT

Writes a JSON value to a node.

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

Definition at line 309 of file IClient.cs.

◆ result [1/2]

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
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressAddress of the node.
argsRequest arguments.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
argsRequest arguments.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
ArgumentExceptionInvalid arguments.
Parameters
addressAddress of the node.
indentStepIndentation length for json string.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressAddress of the node.
argsRequest arguments (JSON).
indentStepIndentation length for json string.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
writeValuesValues to write.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
ArgumentExceptionInvalid arguments.
Parameters
addressesAddress of the nodes.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
addressesAddresses of the nodes.
argsRequest arguments.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.
Parameters
subscriptionPropertiesFlatbuffersProperties of the subscription as flatbuffers.
userDataOptional user data can be provided, which is available in the subscription data changed event context.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Definition at line 65 of file IClient.cs.

◆ result [2/2]

DLR_RESULT [] result

Reads values from a list of nodes.

Parameters
addressesAddresses of the nodes.
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Definition at line 105 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 33 of file IClient.cs.

◆ ConnectionStatus

DLR_RESULT ConnectionStatus
get

Gets the connection status.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Definition at line 26 of file IClient.cs.

◆ IsConnected

bool IsConnected
get

Checks the connection.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Definition at line 20 of file IClient.cs.

◆ System

IDatalayerSystem System
get

Gets the system.

Definition at line 14 of file IClient.cs.


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