Table of Contents

Method GetMqttClientAgentAsync

Namespace
Kepware.Api.ClientHandler
Assembly
Kepware.Api.dll

GetMqttClientAgentAsync(string, CancellationToken)

Gets an MQTT Client agent with the specified name.

public Task<MqttClientAgent?> GetMqttClientAgentAsync(string name, CancellationToken cancellationToken = default)

Parameters

name string

The name of the agent.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<MqttClientAgent>

The loaded MqttClientAgent or null if not found.

Exceptions

ArgumentException

Thrown when the name is null or empty.