Table of Contents

Method GetIotItemAsync

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

GetIotItemAsync(string, IotAgent, CancellationToken)

Gets an IoT Item by its server tag name under the given parent agent. The server tag is converted to the IoT Item name by replacing dots with underscores and stripping any leading underscore.

public Task<IotItem?> GetIotItemAsync(string serverTag, IotAgent parentAgent, CancellationToken cancellationToken = default)

Parameters

serverTag string

The dot-delimited server tag name (e.g., "Channel1.Device1.Tag1").

parentAgent IotAgent

The parent agent that owns the IoT Item.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IotItem>

The loaded IotItem or null if not found.

Exceptions

ArgumentException

Thrown when the server tag is null or empty.

ArgumentNullException

Thrown when the parent agent is null.