C++ EIBA OPC Client development
C++ EIBA OPC Client development
EIBA s.c.
Title
Category
Filename: EIBA C++ OPC Client development.doc
Version 1.0
Title– Category Version: 1.0
C++ EIBA OPC Client development.doc Date: 2006-02-14
Table of Contents
1 Introduction 3
1.1 C++ 3
1.2 General notes 3
1.3 3 Interfaces 3
1.4 OPCCommon Interface (opccomn-1.h / opccomn_i.c) 3
1.5 OPC Data Acces (opcda.h / opcda_i.c) 3
1.6 OPC Alarm & Event Interface (opc_ae.h / opc_ae_i.c // opcaedef.h) 3
1 Introduction
1.1 C++
Unlike VB, OPCFoundation recommends to develop OPC Clients in C++ without the automation
wrapper (opcdaauto.dll) (there is a way to use automation, but not yet used by EIBA).
This means a bigger degree of freedom since COM-Interfaces are directly accessed/programmed in C++
interface. But of course a down-side is that it might take longer to implement.
1.2 General notes
We are using COM here, so it is advised to read more and be customed with COM.
Client is responsible for memory management in COM programming. So don’t forget to clear memory
after using Interfaces with ‘out’ and ‘in/out’ parameters, including elements that is pointed to by them!
Also an interface from an OPC Server (object) used by the client to list all available and registered OPC
servers is found within. Note, however, that this can be done by registry reading also without having to
use this interface (see examples for more info.)