Apama  10.15.6.0
EventTransport.h
Go to the documentation of this file.
1 /*
2  * EventTransport.h
3  *
4  * External (client-visible) interface to Transport Integration Layer (TIL)
5  * plugin libraries within the Apama Integration Adapter Framework (IAF).
6  * This is the interface that must be implemented by all transport libraries
7  * in order to be successfully loaded and integrated by the IAF.
8  *
9  * $Copyright(c) 2002-2006, 2008, 2010, 2013-2014, 2016-2018, 2022 Cumulocity GmbH, Duesseldorf, Germany and/or its affiliates and/or their licensors.$
10  * Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Cumulocity GmbH.
11  *
12  */
13 
14 #ifndef AP_EVENT_TRANSPORT_H
15 #define AP_EVENT_TRANSPORT_H
16 
26 /*
27  * Define this here so EventCodec.h picks it up as well
28  */
29 typedef void* AP_TransportEvent;
30 
31 
32 #include <AP_Types.h>
33 #include <IAF_Platform.h>
34 #include <EventCodec.h>
35 #include <AP_TimestampSet.h>
36 #include <IAF_TimestampConfig.h>
37 
53 #define AP_EVENTTRANSPORT_VERSION 0x00040000
54 
55 
56 /*
57  * Names of functions exported from shared library. The IAF will search for
58  * these functions by name when the library is loaded, so you must use these
59  * *exact* names when implementing a transport library.
60  */
61 #define AP_EVENTTRANSPORT_INFO_FUNCTION_NAME AP_EventTransport_info
62 #define AP_EVENTTRANSPORT_CTOR_FUNCTION_NAME AP_EventTransport_ctor
63 #define AP_EVENTTRANSPORT_DTOR_FUNCTION_NAME AP_EventTransport_dtor
64 
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif /* __cplusplus */
69 
70 
71 /*
72  * Forward-declare some structures
73  */
74 struct AP_EventTransport;
75 struct AP_EventDecoder;
76 
77 
85 typedef enum {
99 
100 
107 typedef struct {
109  AP_char8* name;
111  AP_char8* value;
113 
114 
121 typedef struct {
123  AP_char8* name;
127 
128 
144 typedef struct {
149  AP_char8* status;
153  AP_uint64 totalReceived;
157  AP_uint64 totalSent;
172 
173 
174 
187 
209 
229  AP_EventTransportError (*sendTransportEvent)(struct AP_EventTransport* transport, AP_TransportEvent event, AP_TimestampSet* timeStamp);
230 
242  void (*addEventDecoder)(struct AP_EventTransport* transport, const AP_char8* name, struct AP_EventDecoder* decoder);
243 
254  void (*removeEventDecoder)(struct AP_EventTransport* transport, const AP_char8* name);
255 
270 
286 
324 
345 
356  const AP_char8* (*getLastError)(struct AP_EventTransport* transport);
357 
379  void (*getStatus)(struct AP_EventTransport* transport, AP_EventTransportStatus* status);
380 };
381 
382 
396 
400  void* reserved;
401 
407 };
408 typedef struct AP_EventTransport AP_EventTransport;
409 
410 
432 typedef AP_EVENTTRANSPORT_API void (AP_EVENTTRANSPORT_CALL* AP_EventTransportInfoPtr)(AP_uint32* version, AP_uint32* capabilities);
433 
434 
465 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);
466 
480 typedef AP_EVENTTRANSPORT_API void (AP_EVENTTRANSPORT_CALL* AP_EventTransportDtorPtr)(AP_EventTransport* obj);
481 
482 
483 #ifdef __cplusplus
484 } /* extern "C" */
485 #endif /* __cplusplus */
486 
487 
488 #endif /* AP_EVENT_TRANSPORT_H */
AP_EventTransportError
AP_EventTransportError.
Definition: EventTransport.h:85
AP_EventTransportStatus.
Definition: EventTransport.h:144
AP_EventTransportError(* flushUpstream)(struct AP_EventTransport *transport)
flushUpstream
Definition: EventTransport.h:269
AP_char8 * name
Transport property value.
Definition: EventTransport.h:123
AP_uint64 totalReceived
Total number of downstream events received since IAF was run.
Definition: EventTransport.h:153
void(* getStatus)(struct AP_EventTransport *transport, AP_EventTransportStatus *status)
getStatus
Definition: EventTransport.h:379
Trouble reading/writing the external transport.
Definition: EventTransport.h:91
AP_EventTransportError(* sendTransportEvent)(struct AP_EventTransport *transport, AP_TransportEvent event, AP_TimestampSet *timeStamp)
sendTransportEvent
Definition: EventTransport.h:229
AP_NormalisedEvent * statusDictionary
Additional status information about this transport.
Definition: EventTransport.h:170
void * reserved
Pointer to private internal data.
Definition: EventTransport.h:400
AP_EventTransportProperty.
Definition: EventTransport.h:107
AP_EventTransport_Functions.
Definition: EventTransport.h:186
Trouble sending transport event to decoder.
Definition: EventTransport.h:93
Some unspecified internal error occurred.
Definition: EventTransport.h:89
AP_char8 * name
Transport property name.
Definition: EventTransport.h:109
AP_EventTransportError(* stop)(struct AP_EventTransport *transport)
stop
Definition: EventTransport.h:344
AP_EventTransportError(* flushDownstream)(struct AP_EventTransport *transport)
flushDownstream
Definition: EventTransport.h:285
AP_EventTransportError(* start)(struct AP_EventTransport *transport)
start
Definition: EventTransport.h:323
AP_EventDecoder.
Definition: EventCodec.h:439
IAF_TimestampConfig.
Definition: IAF_TimestampConfig.h:28
AP_NormalisedEvent.
Definition: NormalisedEvent.h:453
Hires Timestamps.
Everything is fine.
Definition: EventTransport.h:87
AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportInfoPtr)(AP_uint32 *version, AP_uint32 *capabilities)
AP_EventTransportInfoPtr.
Definition: EventTransport.h:432
AP_uint64 totalSent
Total number of upstream events since the IAF was run.
Definition: EventTransport.h:157
AP_char8 * status
Free form text string containing a transport specific status message.
Definition: EventTransport.h:149
Hires Timestamps configuration support.
Transport could not start correctly.
Definition: EventTransport.h:97
struct AP_EventTransport_Functions * functions
Function table of transport library operations.
Definition: EventTransport.h:406
AP_EVENTTRANSPORT_API void(AP_EVENTTRANSPORT_CALL * AP_EventTransportDtorPtr)(AP_EventTransport *obj)
AP_EventTransportDtorPtr.
Definition: EventTransport.h:480
void(* removeEventDecoder)(struct AP_EventTransport *transport, const AP_char8 *name)
removeEventDecoder
Definition: EventTransport.h:254
AP_EventTransport.
Definition: EventTransport.h:395
void(* addEventDecoder)(struct AP_EventTransport *transport, const AP_char8 *name, struct AP_EventDecoder *decoder)
addEventDecoder
Definition: EventTransport.h:242
AP_TimestampSet.
Definition: AP_TimestampSet.h:305
AP_EventTransportProperties.
Definition: EventTransport.h:121
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.
Definition: EventTransport.h:465
AP_EventTransportProperty ** properties
Array of transport properties.
Definition: EventTransport.h:125
Transport was passed an invalid property set.
Definition: EventTransport.h:95
AP_EventTransportError(* updateProperties)(struct AP_EventTransport *transport, AP_EventTransportProperties *properties, IAF_TimestampConfig *timestampConfig)
updateProperties
Definition: EventTransport.h:208
AP_char8 * value
Transport property value.
Definition: EventTransport.h:111
EventCodec.