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
serverTagstringThe dot-delimited server tag name (e.g., "Channel1.Device1.Tag1").
parentAgentIotAgentThe parent agent that owns the IoT Item.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Exceptions
- ArgumentException
Thrown when the server tag is null or empty.
- ArgumentNullException
Thrown when the parent agent is null.