Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing EPL Plug-ins | EPL Plug-ins in C and C++ Written Prior to 10.0 | 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
Note: The information in this section is deprecated. It applies to the old API which will be removed in a future release. It is recommended that you use the new API for writing EPL plug-ins in C++.
The samples for the old API, which are still referenced in this documentation, have been removed from the product and can thus no longer be found in the samples directory of your Apama installation.
The Apama EPL plug-in APIs for C and a C++ make it possible for developers to write EPL 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 an EPL plug-in to be compatible with a 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 an EPL 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-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.