Method CreateChannelAsync
- Namespace
- Kepware.Api.ClientHandler
- Assembly
- Kepware.Api.dll
CreateChannelAsync(string, string, IDictionary<string, object>?, CancellationToken)
Creates a new channel with the specified name and driver.
public Task<Channel?> CreateChannelAsync(string name, string driverName, IDictionary<string, object>? properties = null, CancellationToken cancellationToken = default)
Parameters
name
stringThe name of the channel.
driverName
stringThe name of the driver.
properties
IDictionary<string, object>The properties to set on the channel.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<Channel>
A task that represents the asynchronous operation. The task result contains the created channel, or null if creation failed.
Exceptions
- ArgumentException
Thrown when the channel name or driver name is null or empty.