05/27/2020
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?
05/30/2017
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.
05/27/2020
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.
1 Guest(s)