Apama  10.15.1.2
AP_EventEncoder_Functions Struct Reference

AP_EventEncoder_Functions. More...

#include <EventCodec.h>

Public Attributes

AP_EventCodecError(* sendNormalisedEvent )(struct AP_EventEncoder *encoder, AP_NormalisedEvent *event, AP_TimestampSet *timeStamp)
 sendNormalisedEvent More...
 
AP_EventCodecError(* flushUpstream )(struct AP_EventEncoder *encoder)
 flushUpstream More...
 
const AP_char8 *(* getLastError )(struct AP_EventEncoder *encoder)
 getLastError More...
 
void(* addEventTransport )(struct AP_EventEncoder *encoder, const AP_char8 *name, struct AP_EventTransport *transport)
 addEventTransport More...
 
void(* removeEventTransport )(struct AP_EventEncoder *encoder, const AP_char8 *name)
 removeEventTransport More...
 

Detailed Description

AP_EventEncoder_Functions.

Table of client visible functions exported by the encoder part of a codec library instance. These functions declare the only operations that may be performed by users of an encoder.

Note that all of these functions take an initial AP_EventEncoder* argument; this is analogous to the (hidden) 'this' pointer passed to a C++ object when a member function is invoked on it.

Member Data Documentation

◆ addEventTransport

void(* AP_EventEncoder_Functions::addEventTransport) (struct AP_EventEncoder *encoder, const AP_char8 *name, struct AP_EventTransport *transport)

addEventTransport

Add a named event transport to the set of transports known to the encoder.

If the named transport already exists, it should be replaced.

Parameters
encoderThe event encoder instance
nameThe name of the transport to be added.
transportThe transport object itself

◆ flushUpstream

AP_EventCodecError(* AP_EventEncoder_Functions::flushUpstream) (struct AP_EventEncoder *encoder)

flushUpstream

Flush any pending normalised events into the attached event transport. If event processing in the encoder is synchronous (as it usually will be) this function need not do anything except return AP_EventCodec_OK.

Parameters
encoderThe event encoder instance
Returns
Event codec error code. If this is not AP_EventCodec_OK, the getLastError() function of the encoder should be called to get a more detailed description of what went wrong.

◆ getLastError

const AP_char8*(* AP_EventEncoder_Functions::getLastError) (struct AP_EventEncoder *encoder)

getLastError

Return the encoder's stored error message, if any. The message string is owned by the encoder so should not be modified or freed by the caller.

Parameters
encoderThe event encoder instance
Returns
The last error message generated by the encoder

◆ removeEventTransport

void(* AP_EventEncoder_Functions::removeEventTransport) (struct AP_EventEncoder *encoder, const AP_char8 *name)

removeEventTransport

Remove a named event transport from the set of transports known to the encoder.

If the named transport does not exist, the function should do nothing.

Parameters
encoderThe event encoder instance
nameThe name of the transport to be removed

◆ sendNormalisedEvent

AP_EventCodecError(* AP_EventEncoder_Functions::sendNormalisedEvent) (struct AP_EventEncoder *encoder, AP_NormalisedEvent *event, AP_TimestampSet *timeStamp)

sendNormalisedEvent

Called by the Semantic Mapper to encode an event and send it on to the event transport.

Parameters
encoderThe event encoder instance
eventThe event to be encoded. Ownership is transferred to the callee.
timeStampTimestamps associated with this event. Ownership is transferred to the callee.
Returns
Event codec error code. If this is not AP_EventCodec_OK, the getLastError() function of the encoder should be called to get a more detailed description of what went wrong.

The documentation for this struct was generated from the following file: