Apama 10.2 | Apama Documentation | Connecting Apama Applications to External Components | Working with IAF Plug-ins | C/C++ Transport Plug-in Development | The C/C++ transport plug-in development specification | Other transport definitions
 
Other transport definitions
EventTransport.h also provides some additional definitions that the event transport author needs to be aware of.
First of these is the set of error codes that can be returned by the transport's functions:
/**
* 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.
*/
typedef enum {
  AP_EventTransport_OK = 0,           /* 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 */
} AP_EventTransportError;
Next is a definition for a configuration property. This corresponds to the properties that can be passed in as initialization or re-configuration parameters from the configuration file of the IAF.
/**
* AP_EventTransportProperty
*
* A single transport property, corresponding to a <property> element
* in the adapter configuration file.
*/
typedef struct {
  AP_char8* name;
  AP_char8* value;
} AP_EventTransportProperty;
Properties are passed to the event transport within an AP_EventTransportProperties structure:
/**
* AP_EventTransportProperties
*
* Properties for the transport, extracted from the <transport> element
* in the adapter configuration file.
*/
typedef struct {
  AP_char8* name;
  AP_EventTransportProperty** properties;
} AP_EventTransportProperties;
Finally, the status of a transport is reported in an AP_EventTransportStatus structure:
/**
* AP_EventTransportStatus
*
* Transport status information structure, filled in by the getStatus call.
*/
typedef struct {
  AP_char8* status;
  AP_uint64 totalReceived;
  AP_uint64 totalSent;
  AP_NormalisedEvent* statusDictionary;
} AP_EventTransportStatus;

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.
Innovation Release