Developing Apama Applications > Developing Adapters > C/C++ Codec Plug-in Development
C/C++ Codec 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. Standard 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 iafcore$(APAMA_LIBRARY_VERSION).lib. To do this in Visual Studio, select your project and then select Project Properties > Linker > Input > Additional Dependencies and add:
iafcore$(APAMA_LIBRARY_VERSION).lib;apcommon$(APAMA_LIBRARY_VERSION).lib
Finally, select Project Properties > Linker > General > Additional Library Directories, and add $(APAMA_HOME)\lib.
Copyright © 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.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.