Configuring UA COM Server Wrapper to be discoverable by DA Clients|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Configuring UA COM Server Wrapper to be discoverable by DA Clients
Avatar
Justin Lipps
Member
Members
Forum Posts: 5
Member Since:
05/27/2020
sp_UserOfflineSmall Offline
1
05/28/2020 - 07:05
sp_Permalink sp_Print

I'm attempting implement an OPC server that uses the UA COM Server Wrapper because of my need to allow
DA clients to access data from my UA server.

The OPC UA 10000-8 Spec Part 8 states that...

"Connectivity approaches include the one where Data Access COM Clients connect to a UA Data Access Server
with a CLSID just as if the target Server were a Data Access COM Server. However, the CLSID can be considered
virtual since it is defined to connect to intermediary components that ultimately connect to the UA Data Access
Server. Using this approach, the Data Access COM Client calls co-create instance with a virtual CLSID as described above.
This connects to the Data Access COM UA Proxy components."

The OPC DA 3.00 Spec states that...

"One or more of the following lines (inproc and/or local/remote and/or handler)
5. HKEY_CLASSES_ROOT\CLSID\{Your Server’s unique CLSID}\InprocServer32 = Full Path to DLL
6. HKEY_CLASSES_ROOT\CLSID\{YourServer’s unique CLSID}\LocalServer32 = Full Path to EXE
7. HKEY_CLASSES_ROOT\CLSID\{YourServer’s unique CLSID}\InprocHandler32 = Full Path to DLL"

My question is in the context of implementing the UA COM Server Wrapper, how do I register the CLSID in the windows registry
so that DA Clients will see my server as registered properly and will connect to it?

I've successfully configured the following:
1. HKEY_CLASSES_ROOT\Vendor.Drivername.Version = A Description of your server
2. HKEY_CLASSES_ROOT\Vendor.Drivername.Version\CLSID = {Your Server’s unique CLSID}
3. HKEY_CLASSES_ROOT\CLSID\{Your Server’s unique CLSID} = A Description of your server
4. HKEY_CLASSES_ROOT\CLSID\{Your Server’s unique CLSID}\ProgID = Vendor.Drivername.Version

However, I don't know what EXE to point the LocalServer32 to? Do I point it to the installer for my server?
My server will eventually run as a service, in that case, what is the expected configuration for this?

Avatar
Randy Armstrong
Admin
Forum Posts: 1511
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/28/2020 - 15:33
sp_Permalink sp_Print

You need a C++ wrapper to make a DA server available to clients. It is not possible to build a compliant COM DA server in pure .NET.

The sample includes a wrapper that self-registers. You should change the samples configuration to have a unique ProgID and CLASSID and use the self-registration code take care of creating the registry entries.

Avatar
Justin Lipps
Member
Members
Forum Posts: 5
Member Since:
05/27/2020
sp_UserOfflineSmall Offline
3
05/31/2020 - 11:20
sp_Permalink sp_Print

Ok, I'm a bit unclear on the wording of the UA spec given your answer and my next step, but as a starting point for my next question, the UA spec 10000-8 Annex A.1 states:

The COM UA Wrapper is an OPC UA Server that wraps an OPC DA Server and with that enables an OPC UA Client to access information from the DA Server. The COM UA Proxy enables an OPC DA Client to access information from an OPC UA Server.

The .NET server wrapper contains the following configuration line:

"...<ComClientConfiguration i:type="ComDaClientConfiguration">

<ServerUrl>opc.com://localhost/Server.Prog.Id</ServerUrl>
<ServerName>DA</ServerName>.."

Does this need to point to the C++ unique progID then? If this implementation can't talk to DA clients, what is the point of this progID?

Do I need to build 2 server implementations, one that uses the C++ "UA COM Server Class Library" and one that uses the .NET framework "UA COM Server Wrapper"?

Or do you recommend that I compile down the "UA COM Server Class Library" built in C++ and figure out how to access the static library from the .NET wrapper? Or should I build the whole thing in C++?

My end goal is to build an OPC server that allows both DA and UA clients to connect to it and the server will run as a windows service.

Thanks for your time and sorry if I'm asking too many questions in one go. I'm excited to get going with this tech, but am just figuring out the best plan of execution. Any advice is appreciated greatly.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Donghoon Choi, Andres Vergara
Guest(s) 41
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1396
Posts: 4717