Apama 10.15.1 | Connecting Apama Applications to External Components | Working with IAF Plug-ins | C/C++ Codec Plug-in Development
 
C/C++ Codec Plug-in Development
 
The C/C++ codec plug-in development specification
Transport example
Getting started with codec layer plug-in development
The codec layer is a layer of abstraction between the transport layer and the IAF's Semantic Mapper. It consists of one or more plug-in libraries that perform message encoding and/or decoding. Decoders translate downstream messages retrieved by the transport layer into the standard normalized event format on which the Semantic Mapper's rules run. Encoders work in the opposite direction, encoding upstream normalized events into an appropriate format for transport layer plug-ins to send on. See The Integration Adapter Framework for a full introduction to codec plug-ins and the IAF's architecture.
This topic includes the C/C++ codec plug-in development specification and additional information for developers of C/C++ event codecs. Java Codec Plug-in Development provides analogous information about developing codec plug-ins in Java.
Before developing a new codec plug-in, it is worth considering whether one of the standard Apama IAF plug-ins could be used instead. Codec IAF Plug-ins provides more information on the standard IAF codec plug-ins: StringCodec and NullCodec. The StringCodec plug-in codes normalized events as formatted text strings. The NullCodec plug-in is useful in situations where it does not make sense to decouple the codec and transport layers, and allows transport plug-ins to communicate with the Semantic Mapper directly using normalized events.
To configure the build for a codec 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.
Also, link against apiaf.lib. To do this in Visual Studio, select your project and then select Project Properties > Linker > Input > Additional Dependencies and add:
apiaf.lib;apcommon.lib
Finally, select Project Properties > Linker > General > Additional Library Directories, and add $(APAMA_HOME)\lib.