EonaCat.OPC.Classic 0.0.1

Prefix Reserved
dotnet add package EonaCat.OPC.Classic --version 0.0.1
                    
NuGet\Install-Package EonaCat.OPC.Classic -Version 0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EonaCat.OPC.Classic" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EonaCat.OPC.Classic" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="EonaCat.OPC.Classic" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EonaCat.OPC.Classic --version 0.0.1
                    
#r "nuget: EonaCat.OPC.Classic, 0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EonaCat.OPC.Classic@0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EonaCat.OPC.Classic&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=EonaCat.OPC.Classic&version=0.0.1
                    
Install as a Cake Tool

EonaCat.OPC.Classic

EonaCat OPC Classic Data Access (DA) client and COM Automation server for Windows.

OPC Classic DA is COM/DCOM based. The library targets net8.0-windows and produces a COM host alongside EonaCat.OPC.Classic.dll.

Features

  • DA items - named item identifiers with a value, quality, and timestamp.
  • Browse, read and write - managed DA client and server APIs for the core DA workflow.
  • Data changes - subscribe to item updates from an in-process DA server.
  • COM Automation - a COM-visible server class with ProgID EonaCat.OPC.Classic.DaServer for Windows automation clients.
  • DCOM activation - the DA client activates a server by ProgID, optionally on a remote machine, subject to the machine's DCOM configuration.

Creating a server

using EonaCat.OPC.Classic;

var server = new DaServer();
server.AddItem("Plant.Counter", 0);
server.AddItem("Plant.Status", "starting");

server.Write("Plant.Counter", 1);

DaServer is the managed server model. Values carry DaQuality.Good by default and every write is stamped with UTC time. Use ItemChanged to observe writes.

Creating a client

using EonaCat.OPC.Classic;

using var client = new DaClient();
client.Connect(server); // In-process server.

var value = client.Read("Plant.Counter");
Console.WriteLine(value.Value);
client.Write("Plant.Status", "running");

using var subscription = client.Subscribe((sender, change) =>
    Console.WriteLine(change.Value.ItemId + " changed"));

To activate a registered COM server, use its ProgID and optionally its DCOM host:

await client.ConnectAsync("EonaCat.OPC.Classic.DaServer");
await client.ConnectAsync("Vendor.OPC.DAServer", "opc-host");

COM registration

Build the library, then register the generated COM host using the regsvr32 matching the target process architecture:

regsvr32 .\EonaCat.OPC.Classic\bin\Debug\net8.0-windows\EonaCat.OPC.Classic.comhost.dll

On remote hosts, configure DCOM launch, activation, and access permissions for the identity running the client and server. OPC Classic DA interoperability also requires matching 32-bit or 64-bit COM registration.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-windows7.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.

Version Downloads Last Updated
0.0.1 107 9/2/2026