Apama  10.7.2.2
EventTransport.h File Reference

External (client-visible) interface to Transport Integration Layer (TIL) plugin libraries within the Apama Integration Adapter Framework (IAF). More...

#include <AP_Types.h>
#include <IAF_Platform.h>
#include <EventCodec.h>
#include <AP_TimestampSet.h>
#include <IAF_TimestampConfig.h>

Go to the source code of this file.

Classes

struct  AP_EventTransportProperty
 AP_EventTransportProperty. More...
 
struct  AP_EventTransportProperties
 AP_EventTransportProperties. More...
 
struct  AP_EventTransportStatus
 AP_EventTransportStatus. More...
 
struct  AP_EventTransport_Functions
 AP_EventTransport_Functions. More...
 
struct  AP_EventTransport
 AP_EventTransport. More...
 

Macros

#define AP_EVENTTRANSPORT_VERSION   0x00040000
 Transport API version. More...
 

Typedefs

typedef AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportInfoPtr) (AP_uint32 *version, AP_uint32 *capabilities)
 AP_EventTransportInfoPtr. More...
 
typedef AP_EVENTTRANSPORT_API AP_EventTransport *(AP_EVENTTRANSPORT_CALL * AP_EventTransportCtorPtr) (AP_char8 *name, AP_EventTransportProperties *properties, AP_EventTransportError *err, AP_char8 **errMsg, IAF_TimestampConfig *timestampConfig)
 AP_EventTransportCtorPtr. More...
 
typedef AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportDtorPtr) (AP_EventTransport *obj)
 AP_EventTransportDtorPtr. More...
 

Enumerations

enum  AP_EventTransportError {
  AP_EventTransport_OK = 0, AP_EventTransport_InternalError, AP_EventTransport_TransportFailure, AP_EventTransport_DecodingFailure,
  AP_EventTransport_BadProperties, AP_EventTransport_CantStart
}
 AP_EventTransportError. More...
 

Detailed Description

External (client-visible) interface to Transport Integration Layer (TIL) plugin libraries within the Apama Integration Adapter Framework (IAF).

This is the interface that must be implemented by all transport libraries in order to be successfully loaded and integrated by the IAF.

Macro Definition Documentation

◆ AP_EVENTTRANSPORT_VERSION

#define AP_EVENTTRANSPORT_VERSION   0x00040000

Transport API version.

The upper 16 bits identify the major release of the API; the lower 16 bits indicate minor versions within that release. No changes that break backward binary compatibility will be made within a given major release of the API. That is, minor releases may add functionality and fix bugs, but will not change or remove any documented behaviour.

Version history: 1.0 First public version, released with Apama 2.2.0 1.1 Add versioning and multiple transport support for Apama 2.2.1 2.0 Force users to rebuild for VS7.1 2.1 Fixes for 3.0 to correct bug 5063 4.0 Addition of high-accuracy timestamps for latency measurement.

Typedef Documentation

◆ AP_EventTransportCtorPtr

typedef AP_EVENTTRANSPORT_API AP_EventTransport*(AP_EVENTTRANSPORT_CALL* AP_EventTransportCtorPtr) (AP_char8 *name, AP_EventTransportProperties *properties, AP_EventTransportError *err, AP_char8 **errMsg, IAF_TimestampConfig *timestampConfig)

AP_EventTransportCtorPtr.

Pointer to the constructor function for the transport library. Each TIL plugin library must export a function with this signature, named using the AP_EVENTTRANSPORT_CTOR_FUNCTION_NAME macro.

Constructs a new instance of the event transport. This function will be called by the adapter main program when the adapter starts up. The transport should be created in a 'stopped' state, such that it is not actively processing data from the external transport. A call to the start() function is required to begin processing.

Note that the input parameters (name, properties, timestampConfig) are owned by the caller. The IAF framework guarantees that propertes and timestampConfig will remain valid until after a subsequent call to updateProperties(), so it is safe to hold a pointer to this structure. You should, however, copy the name string if you wish to keep it. The contents of the output parameter errMsg belongs to the transport.

Parameters
nameThe name of this transport instance
propertiesTransport property set derived from the IAF config file
err'Out' parameter for error code if constructor fails
errMsg'Out' parameter for error message if constructor fails
timestampConfigTimestamp recording/logging settings
Returns
Pointer to a new transport instance or NULL if the constructor fails for some reason. In the case of failure, err and errMsg should be filled in with an appropriate error code and message describing the failure.

◆ AP_EventTransportDtorPtr

typedef AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL* AP_EventTransportDtorPtr) (AP_EventTransport *obj)

AP_EventTransportDtorPtr.

Pointer to the destructor function for the transport library. Each TIL plugin library must export a function with this signature, named using the AP_EVENTTRANSPORT_DTOR_FUNCTION_NAME macro.

Destroys an instance of the event transport that was previously created by AP_EventTransport_ctor. The transport may assume that it has been stopped and flushed before the destructor is called.

Parameters
transportThe event transport object to be destroyed

◆ AP_EventTransportInfoPtr

typedef AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL* AP_EventTransportInfoPtr) (AP_uint32 *version, AP_uint32 *capabilities)

AP_EventTransportInfoPtr.

Pointer to the info function for the tranport library. Each transport plugin library must export a function with this signature, named using the AP_EVENTTRANSPORT_INFO_FUNCTION_NAME macro.

Returns basic information about the transports implemented by this shared library, along with the transport API version it was built against.

Parameters
version'Out' parameter for version number of transport library. This should be the value of AP_EVENTTRANSPORT_VERSION that was defined in EventTransport.h when the transport was built. The IAF will check the version number to ensure that it can support all the capabilities offered by the transport
capabilities'Out' parameter for the capabilities of the transports provided by this library. Currently no such capabilities are defined, so the value of this field will be ignored by the IAF. However, all bits of the capabilities value are reserved for future use, so current transports should ensure that they set this value to zero.

Enumeration Type Documentation

◆ AP_EventTransportError

AP_EventTransportError.

Error codes that can be returned by transport library functions. The enumeration values follow the normal UNIX convention of zero == OK and non-zero == error.

Enumerator
AP_EventTransport_OK 

Everything is fine.

AP_EventTransport_InternalError 

Some unspecified internal error occurred.

AP_EventTransport_TransportFailure 

Trouble reading/writing the external transport.

AP_EventTransport_DecodingFailure 

Trouble sending transport event to decoder.

AP_EventTransport_BadProperties 

Transport was passed an invalid property set.

AP_EventTransport_CantStart 

Transport could not start correctly.