OPCFoundation.NetStandard.Opc.Ua.LADS.Client
2.0.2
Prefix Reserved
dotnet add package OPCFoundation.NetStandard.Opc.Ua.LADS.Client --version 2.0.2
NuGet\Install-Package OPCFoundation.NetStandard.Opc.Ua.LADS.Client -Version 2.0.2
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.LADS.Client" Version="2.0.2" />
<PackageVersion Include="OPCFoundation.NetStandard.Opc.Ua.LADS.Client" Version="2.0.2" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.LADS.Client" />
paket add OPCFoundation.NetStandard.Opc.Ua.LADS.Client --version 2.0.2
#r "nuget: OPCFoundation.NetStandard.Opc.Ua.LADS.Client, 2.0.2"
#:package OPCFoundation.NetStandard.Opc.Ua.LADS.Client@2.0.2
#addin nuget:?package=OPCFoundation.NetStandard.Opc.Ua.LADS.Client&version=2.0.2
#tool nuget:?package=OPCFoundation.NetStandard.Opc.Ua.LADS.Client&version=2.0.2
OPC UA LADS client
OPCFoundation.NetStandard.Opc.Ua.LADS.Client is the typed client for OPC
30500-1 Laboratory and Analytical Device Standard (LADS). The client discovers
LADS devices, reads functional units and their functions, starts programs and
downloads the result files they produce. Every
method call goes through the source-generated LADS ObjectType proxies, so a
client does not depend on the method NodeIds of a particular server.
LadsClient lads = session.GetLadsClient(telemetry);
LadsDevice device = await lads.GetFirstDeviceAsync(ct);
LadsFunctionalUnit unit = await device.GetFirstFunctionalUnitAsync(ct);
string runId = await unit.StartProgramAsync(
LadsProgramRequest.For("Calibration")
.WithProperty("Operator", "lab-1")
.WithSample(containerId: "Plate-7", sampleId: "S-0042"),
ct);
await unit.WaitForStateAsync("Stopped", TimeSpan.FromMinutes(5), cancellationToken: ct);
LadsResult? result = await unit.FindResultAsync(runId, ct);
ByteString content = await lads.ReadResultFileAsync(result!.Files[0], ct);
Handles and snapshots
The client separates navigation from data. LadsDevice, LadsFunctionalUnit
and LadsFunction are handles: they carry a NodeId and a browse name, and
every operation on them reads or calls the server. ReadAsync on a handle
returns an immutable snapshot record (LadsDeviceSnapshot,
LadsFunctionalUnitSnapshot, LadsFunctionSnapshot) that holds the values
read at that moment. A snapshot is not updated afterwards; read again or
observe the values to follow changes.
Each handle operation is also available on LadsClient with the NodeId as the
first argument, for callers that already know the node, such as
lads.StopAsync(functionalUnitId) or lads.OpenCoverAsync(coverId).
lads.Device(id), lads.FunctionalUnit(id) and lads.Function(id) create a
handle for a known NodeId without browsing.
Discovery
GetDevicesAsync browses DeviceSet (OPC 10000-100) and Machines
(OPC 40001-1) and keeps the objects whose type is LADSDeviceType or a
subtype. A device that both folders reference is returned once.
FindDeviceAsync and GetDeviceAsync select a device by browse name;
GetDeviceAsync throws when no device matches.
GetFunctionalUnitsAsync follows FunctionalUnitSet, and GetFunctionsAsync
follows FunctionSet, including the function sets nested in a function up to
LadsClientOptions.MaximumFunctionDepth. Each LadsFunction reports the most
specific of the 20 standard function types it implements as a
LadsFunctionKind, and its Path relative to the functional unit, for
example Heater/Temperature. LadsFunctionalUnit.GetFunctionAsync accepts
either the path or the browse name.
Reading
| Call | Reads |
|---|---|
ReadDeviceAsync, LadsDevice.ReadAsync |
identification, device state, operation mode, device health |
ReadFunctionalUnitAsync, LadsFunctionalUnit.ReadAsync |
functional unit state, running state, active program, function snapshots |
ReadFunctionAsync, LadsFunction.ReadAsync |
sensor values, target and current values, function state |
GetProgramTemplatesAsync |
the templates in ProgramTemplateSet |
ReadActiveProgramAsync |
the progress of the running program |
GetResultsAsync, ReadResultAsync |
the results in ResultSet with their files |
GetMaintenanceTasksAsync |
the maintenance tasks of a device |
ReadOperationCountersAsync |
the operation counters of a device |
A function snapshot contains the variables its type defines.
LadsFunctionSnapshot.ValueOf("SensorValue") returns the value of a member,
and a missing optional member returns a null Variant instead of an error.
Commands
LadsDevice.GetLockAsync and LadsClient.GetLockAsync(deviceId) resolve an
optional DI Lock and return the shared DiLockClient on the same borrowed
session. Check the integer results of InitLock and ExitLock; another session
receives BadLocked for protected writes and methods. A device without this
optional functionality returns BadNotSupported. The DI device lock is
separate from a cover function's equipment lock.
LadsFunctionalUnit exposes the state machine methods of the functional unit:
StartAsync, StartProgramAsync, StopAsync, AbortAsync, ClearAsync,
HoldAsync, UnholdAsync, SuspendAsync, UnsuspendAsync, ResetAsync and
ToCompleteAsync. StartProgramAsync returns the device program run id,
which FindResultAsync uses to locate the result after the run.
GetRunningMethodsAsync returns the optional methods that exist, with their
current executable and user-executable attributes. A snapshot is not a
reservation to issue a physical command.
LadsFunction exposes the methods of control functions (StartAsync,
StartAsync(targetValue), StopAsync, AbortAsync,
ModifyTargetValueByAsync, ResetTotalizerAsync, plus optional running
Hold/Unhold, Suspend/Unsuspend, ToComplete and Reset) and of covers
(OpenAsync, CloseAsync, LockAsync, UnlockAsync, ResetAsync).
LadsDevice calls the device state and operation mode transitions
(GotoOperateAsync, GotoProcessingAsync and so on). The client calls
StartMaintenanceTaskAsync, StopMaintenanceTaskAsync and
ResetMaintenanceTaskAsync on a maintenance task.
A call on a node that lacks the required state machine fails with
BadNotSupported. A transition that the server rejects in the current state
fails with the status code the server returns.
Observing
LadsFunction.ObserveAsync and LadsClient.ObserveFunctionAsync monitor the
sensor, control and state variables of a function and return an
IAsyncEnumerable<LadsValueChange>, starting with the current values.
LadsFunctionalUnit.ObserveStateAsync returns the state changes of the
functional unit, and WaitForStateAsync completes when the state machine
reaches the named state or throws TimeoutException.
ObserveRunningStateAsync and WaitForRunningStateAsync address the running
substate. On a server configured to retain Complete, wait for that substate,
then use Reset, Stop or Abort rather than waiting for an automatic stop.
LadsFunction temperature = await unit.GetFunctionAsync("Temperature", ct);
await foreach (LadsValueChange change in temperature.ObserveAsync(cancellationToken: ct))
{
Console.WriteLine($"{change.Name}: {change.Value.WrappedValue}");
}
Observation uses the default streaming subscription of a ManagedSession.
On any other session, pass an IStreamingSubscription explicitly; without
one, observation fails with BadInvalidState.
Result files
DownloadResultFileAsync writes a result file into a stream and
ReadResultFileAsync returns its content as a ByteString. Both read the
FileType object of the result file in chunks of
LadsClientOptions.FileChunkSize and limit the download to
LadsClientOptions.MaximumFileSize bytes. A result file that only has a URL has no
FileType object; LadsResultFile.CanDownload is then false and the
download fails with BadNotSupported.
Hosting
services.AddOpcUa()
.AddClient(...)
.AddLadsClient(options => options with { SamplingInterval = TimeSpan.FromSeconds(1) });
Func<CancellationToken, Task<LadsClient>> createLads = provider
.GetRequiredService<Func<CancellationToken, Task<LadsClient>>>();
LadsClient lads = await createLads(ct);
AddLadsClient registers a LadsClientFactory and a
Func<CancellationToken, Task<LadsClient>> together with the Device
Integration client. A LadsClientOptions singleton registered separately is
also honored. Outside dependency injection, use
new LadsClientFactory(openSession, telemetry, options) or
session.GetLadsClient(telemetry, options).
For the server side use Opc.Ua.LADS.Server; the model lives in
Opc.Ua.LADS.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- BitFaster.Caching (>= 2.6.1)
- BouncyCastle.Cryptography (>= 2.7.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.13)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- Microsoft.Bcl.TimeProvider (>= 10.0.13)
- Microsoft.Extensions.Compliance.Abstractions (>= 10.11.0)
- Microsoft.Extensions.Configuration (>= 10.0.13)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Diagnostics (>= 10.0.13)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Http.Resilience (>= 10.11.0)
- Microsoft.Extensions.Logging (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.13)
- Microsoft.Extensions.Telemetry (>= 10.11.0)
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.11.0)
- OPCFoundation.NetStandard.Opc.Ua.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.Di.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.LADS (>= 2.0.2)
- System.Buffers (>= 4.6.1)
- System.Collections.Immutable (>= 9.0.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.13)
- System.Formats.Asn1 (>= 10.0.13)
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.Text.Json (>= 10.0.13)
- System.Threading.Channels (>= 10.0.13)
- System.Threading.RateLimiting (>= 10.0.13)
- System.Threading.Tasks.Extensions (>= 4.6.3)
-
net10.0
- BitFaster.Caching (>= 2.6.1)
- Microsoft.Bcl.TimeProvider (>= 10.0.13)
- Microsoft.Extensions.Compliance.Abstractions (>= 10.11.0)
- Microsoft.Extensions.Configuration (>= 10.0.13)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Diagnostics (>= 10.0.13)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Http.Resilience (>= 10.11.0)
- Microsoft.Extensions.Logging (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.13)
- Microsoft.Extensions.Telemetry (>= 10.11.0)
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.11.0)
- OPCFoundation.NetStandard.Opc.Ua.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.Di.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.LADS (>= 2.0.2)
- System.Threading.RateLimiting (>= 10.0.13)
-
net8.0
- BitFaster.Caching (>= 2.6.1)
- Microsoft.Bcl.TimeProvider (>= 10.0.13)
- Microsoft.Extensions.Compliance.Abstractions (>= 10.11.0)
- Microsoft.Extensions.Configuration (>= 10.0.13)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Diagnostics (>= 10.0.13)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Http.Resilience (>= 10.11.0)
- Microsoft.Extensions.Logging (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.13)
- Microsoft.Extensions.Telemetry (>= 10.11.0)
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.11.0)
- OPCFoundation.NetStandard.Opc.Ua.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.Di.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.LADS (>= 2.0.2)
- System.Collections.Immutable (>= 9.0.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.13)
- System.Formats.Asn1 (>= 10.0.13)
- System.Text.Json (>= 10.0.13)
- System.Threading.Channels (>= 10.0.13)
- System.Threading.RateLimiting (>= 10.0.13)
-
net9.0
- BitFaster.Caching (>= 2.6.1)
- Microsoft.Bcl.TimeProvider (>= 10.0.13)
- Microsoft.Extensions.Compliance.Abstractions (>= 10.11.0)
- Microsoft.Extensions.Configuration (>= 10.0.13)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Diagnostics (>= 10.0.13)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Http.Resilience (>= 10.11.0)
- Microsoft.Extensions.Logging (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.13)
- Microsoft.Extensions.Telemetry (>= 10.11.0)
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.11.0)
- OPCFoundation.NetStandard.Opc.Ua.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.Di.Client (>= 2.0.2)
- OPCFoundation.NetStandard.Opc.Ua.LADS (>= 2.0.2)
- System.Diagnostics.DiagnosticSource (>= 10.0.13)
- System.Formats.Asn1 (>= 10.0.13)
- System.Text.Json (>= 10.0.13)
- System.Threading.Channels (>= 10.0.13)
- System.Threading.RateLimiting (>= 10.0.13)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OPCFoundation.NetStandard.Opc.Ua.LADS.Client:
| Package | Downloads |
|---|---|
|
OPCFoundation.NetStandard.Opc.Ua.Mcp.LADS
OPC UA LADS device discovery, snapshots, program, state machine, result and maintenance tools. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.2 | 74 | 11/11/2026 |