philipp2604.LiteUa
1.3.0
dotnet add package philipp2604.LiteUa --version 1.3.0
NuGet\Install-Package philipp2604.LiteUa -Version 1.3.0
<PackageReference Include="philipp2604.LiteUa" Version="1.3.0" />
<PackageVersion Include="philipp2604.LiteUa" Version="1.3.0" />
<PackageReference Include="philipp2604.LiteUa" />
paket add philipp2604.LiteUa --version 1.3.0
#r "nuget: philipp2604.LiteUa, 1.3.0"
#:package philipp2604.LiteUa@1.3.0
#addin nuget:?package=philipp2604.LiteUa&version=1.3.0
#tool nuget:?package=philipp2604.LiteUa&version=1.3.0
LiteUa 🔗
LiteUa is a native, lightweight, and dependency-free OPC UA Client Library written entirely in C# from scratch.
Unlike other libraries that wrap the official OPC Foundation .NET Stack (which imposes GPL licensing constraints) or commercial SDKs, LiteUa implements the OPC UA binary protocol directly on top of TCP. This makes it extremely fast, lean, and permissive-license friendly.
⚠️ Work In Progress (WIP)
This library is currently in an early development stage. While the core functionality (Secure Connection, Read/Write, Subscriptions) is implemented and tested, it does not yet cover the entire 1000+ page OPC UA specification. Use with caution in production environments.
🚀 Why LiteUa?
- Zero 3rd Party Dependencies: The core library is built directly on
System.Net.SocketsandSystem.Buffers. No dependency on the official OPC Foundation Stack. No GPL viral licensing issues. - Pure C#: Fully managed code without native wrappers.
- High Performance: Features a built-in
UaClientPoolfor request-heavy scenarios. - Resilient: Includes a
SubscriptionClientwith automatic reconnection and self-healing capabilities. - Tested: Everything is tested using integration tests against Siemens S7-1200 (modeled OPC Server interface) and S7-1500 controllers (standard Simatic OPC Server interface).
📦 Dependencies & Licenses
While the LiteUa core library is strictly dependency-free to ensure ease of licensing, the Test Projects utilize external packages (e.g., xUnit, Microsoft.NET.Test.Sdk) to ensure code quality and protocol correctness.
For a full list of dependencies used in the test environment, please refer to: 📄 THIRD-PARTY-PACKAGES.md
✨ Implemented Features
LiteUa covers the most important features required for HMI/SCADA and IoT connectivity:
🔐 Security & Connectivity
- OPC UA TCP Transport: Efficient Chunking and Message handling.
- Secure Channel: Support for
SignandSignAndEncrypt. - Policies: Full implementation of
Basic256Sha256(RSA-OAEP, AES-CBC, HMAC-SHA256). - Authentication:
AnonymousandUserName(including encrypted password transmission). - Certificate Management: Handling of X.509 Certificates and Server Signature validation.
📡 Core Services
- Read / Write: Support for Scalars, Arrays, and complex Structures (UDTs).
- Browse: Recursive browsing with Bulk support and automatic Paging (ContinuationPoints).
- Method Calls: Call methods directly on the server with typed argument mapping.
- Subscriptions: Monitoring of data changes (DataChangeNotification) with KeepAlive logic.
🛠 Architecture
- Type Registry: Dynamic decoding of custom structures (ExtensionObjects) without code generation.
- Connection Pool: Thread-safe pooling for high-throughput transactional operations.
- Async/Await: Fully asynchronous API design supporting
CancellationTokens.
🚧 Limitations / Roadmap
The following features are not (yet) implemented:
- Events & Alarms (EventNotificationList).
- History Access (HDA).
- Complex Discovery Services (GDS).
- XML Encoding (only Binary is supported).
- Other Security Policies / Algorithms than Basic256Sha256.
📦 Architecture
The library is split into logical layers:
- Builtin: OPC Type definitions (
Variant,DataValue,NodeId). - Client: Client classes for data access, pooling and subscriptions.
- Encoding: Classes for binary encoding and decoding.
- Security: Everything security related (policies, certificate factory, ...).
- Stack: Implementation of the OPC UA stack / services.
- Transport: The underlying TCP connection logic.
🤝 Contributing
Contributions are welcome! Since this is a "from scratch" implementation, please ensure any PRs maintain the zero-dependency philosophy for the main library.
⚖️ License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
You are free to use, modify, and distribute this software in commercial and private applications.
Built with ❤️ and a lot of reverse engineering.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.