OpcSharp
Open Source, OPC UA, C#, Industrial Automation

OpcSharp

A free OPC UA SDK for C#. No dependencies, no ceremony. Plain C# that talks OPC UA.

Description

OpcSharp is a free OPC UA client SDK written in plain C#. No code generation, no XML config files, no dependency tree that breaks on Tuesdays. You add the package, connect to a server, and read nodes.

Most OPC UA stacks try to implement the entire specification. OpcSharp does not. It implements the parts people actually use: connecting, browsing, reading, writing, and subscribing to data changes. The rest of the spec is 1,200 pages of things you probably don’t need.

The client SDK is available now. It handles:

  • Session management: Connect, authenticate, reconnect on failure
  • Browse: Walk the address space, discover nodes
  • Read/Write: Get and set node values with proper type mapping
  • Subscriptions: Monitor data changes without polling
  • Security: Sign and encrypt with OPC UA security policies

The implementation is deliberate about what it includes. Every type is a plain C# struct or class. No reflection magic, no runtime code generation. You can read the source and understand what happens when you call a method.

GitHub: https://patdhlk.com/OpcSharp

Used Tools and Technologies

  • C#
  • OPC UA (IEC 62541)
  • Binary encoding (UA TCP)
  • X.509 certificates