Apama  10.5.4.1
AP_EventDecoder_Functions Struct Reference

AP_EventDecoder_Functions. More...

#include <EventCodec.h>

Public Attributes

AP_EventCodecError(* sendTransportEvent )(struct AP_EventDecoder *decoder, AP_TransportEvent event, AP_TimestampSet *timeStamp)
 sendTransportEvent More...
 
void(* setSemanticMapper )(struct AP_EventDecoder *decoder, AP_SemanticMapper *mapper)
 setSemanticMapper More...
 
AP_EventCodecError(* flushDownstream )(struct AP_EventDecoder *decoder)
 flushDownstream More...
 
const AP_char8 *(* getLastError )(struct AP_EventDecoder *decoder)
 getLastError More...
 

Detailed Description

AP_EventDecoder_Functions.

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

Note that all of these functions take an initial AP_EventDecoder* 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

◆ flushDownstream

AP_EventCodecError(* AP_EventDecoder_Functions::flushDownstream) (struct AP_EventDecoder *decoder)

flushDownstream

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

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

◆ getLastError

const AP_char8*(* AP_EventDecoder_Functions::getLastError) (struct AP_EventDecoder *decoder)

getLastError

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

Parameters
decoderThe event decoder instance
Returns
The last error message generated by the decoder

◆ sendTransportEvent

AP_EventCodecError(* AP_EventDecoder_Functions::sendTransportEvent) (struct AP_EventDecoder *decoder, AP_TransportEvent event, AP_TimestampSet *timeStamp)

sendTransportEvent

Called by the event transport to decode an event and send it on to the Semantic Mapper. It is assumed that the encoder and transport share the same definition of the content of the event, so that the transport can effectively interpret the event and free any dynamically-allocated memory.

Parameters
decoderThe event decoder instance
eventThe event to be decoded. 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 decoder should be called to get a more detailed description of what went wrong.

◆ setSemanticMapper

void(* AP_EventDecoder_Functions::setSemanticMapper) (struct AP_EventDecoder *decoder, AP_SemanticMapper *mapper)

setSemanticMapper

Set the Semantic Mapper object to be used by the decoder. Currently only a single Semantic Mapper is supported in each adapter instance.

Parameters
decoderThe event decoder instance
mapperThe Semantic Mapper to be used

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