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
namestringThe name of the channel.
driverNamestringThe name of the driver.
propertiesIDictionary<string, object>The properties to set on the channel.
cancellationTokenCancellationTokenThe 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.