| View previous topic :: View next topic |
| Author |
Message |
RMahnA2
Joined: 09 Jun 2003 Posts: 25
|
Posted: Wed Sep 01, 2004 11:49 am Post subject: OpcCom.Da vs. OpcRcw.Da |
|
|
I'm trying to understand the high level difference between the OpcCom.Da and OpcRcw.Da namespaces.
I know that the Rcw is a minimuim InterOp to a COM DA server and the OpcCom.Da and( OpcCom.Da20) are the part of the OPC .Net Api that interfaces to a COM DA server.
Can or should I be using the OPC .Net Api as an improved Rcw ?
Currently I'm only interested in "directly" accessing the OPC DA server. I see three approaches.
1. Interop with the newest OpcDaAuto
2. InterOp with OpcRcw.Da
3. Use OPC.Net API
I see #1 as legacy that's not recommended by the OPC Foundation for new applications etc.
#2 seems straight forward but I get the impression there is extra effort required to prepare for and cleanup after each call because of working at the bleeding edge of InterOp.
I'm hoping #3 has the least holes of the three to fall into.
I'm not ready to make the leap to the full OPC .Net Api. I only need DA. I 'm not using SOAP/XML. I'm trying to bridge into .Net and not have to also learn the in's and out's of the OPC .Net API.
Does the OPC .Net Api use the Rcw ?
With all the OPC Rcw's being loaded in my trivial application using OPC .Net API (opcnetapi and opcnetapi.com), I infer that's probably what's going on.
Did I miss a paper or other discussion on this somewhere ?
Thanks
PS:
My orignal question asked about OpcCom.Da.Wrapper. Looking closer I believe this namspace/object is used to implement .net OPC servers. So I've restructured the question to avoid confusing others.
Randy's answer still applies to my modified question.
Last edited by RMahnA2 on Thu Sep 02, 2004 7:55 am; edited 1 time in total |
|
| Back to top |
|
 |
Randy
Joined: 27 Feb 2003 Posts: 3523 Location: OPC Foundation
|
Posted: Wed Sep 01, 2004 3:58 pm Post subject: |
|
|
Using the RCWs directly requires a fair amount COM interop code that is error prone and can introduce memory faults and memory leaks if not done properly. The .NET API uses the RCWs and has code to handle the COM interop properly. You would have to duplicate months of development and testing if you try to write to the RCWs directly.
In addition, the .NET API introduces a higher level API (similar to what the VB6 wrapper did) that takes advantage of the .NET programming model. In other words, if you have a choice between learning the .NET API or learning how invoke COM directly in .NET, I would recommend learning the .NET API. |
|
| Back to top |
|
 |
|