Apama Documentation : Developing Apama Applications : Developing Correlator Plug-ins : Writing a Plug-in in C or C++
Writing a Plug-in in C or C++
 
A simple plug-in in C++
Calling the test function from EPL
A simple C plug-in
Parameter-less plug-in functions
The Apama EPL Plug-in APIs for C and a C++ make it possible for developers to write event correlator plug-ins either in C or in C++.
As long as certain conventions are followed, writing a plug-in is very straightforward. In essence, a plug-in consists of a set of static C or C++ functions (representing the functionality that the developer wishes to invoke from within EPL code) and some necessary initialization functions.
C++ compilers vary extensively in their support for the ISO C++ standard and in how they support linking. For this reason, Apama supports the writing of C++ plug-ins only with specific compilers. For a list of the supported C++ compilers, see Software AG's Knowledge Center in Empower at https://empower.softwareag.com.
On the other-hand, C has been standardized for many years, and for this reason the C API should work with the majority of modern C/C++ compilers on all platforms.
The EPL Plug-in APIs are versioned. For a correlator plug-in to be compatible with an event correlator they both need to support the same plug-in interface version. Plug-ins built with earlier versions of the APIs need to be re-compiled and re-linked. Note that the API version number is separate from the product version number and only increases when the plug-in API is changed.
The APIs comprise the relevant header files, correlator_plugin.hpp and correlator_plugin.h, and are accompanied by a set of sample applications.
To configure the build for a correlator plug-in:
*On Linux, copying and customizing an Apama makefile from a sample application is the easiest method.
*On Windows, you might find it easiest to copy an Apama sample project. If you prefer to use a project you already have, be sure to add $(APAMA_HOME)\include as an include directory. To do this in Visual Studio, select your project and then select Project Properties > C/C++ > General > Additional Include Directories.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback