Apama  10.15.1.2
AP_EventCodec_Functions Struct Reference

AP_EventCodec_Functions. More...

#include <EventCodec.h>

Public Attributes

AP_EventCodecError(* updateProperties )(struct AP_EventCodec *codec, AP_EventCodecProperties *properties, IAF_TimestampConfig *timestampConfig)
 updateProperties More...
 
const AP_char8 *(* getLastError )(struct AP_EventCodec *codec)
 getLastError More...
 
void(* getStatus )(struct AP_EventCodec *codec, AP_EventCodecStatus *status)
 getStatus More...
 

Detailed Description

AP_EventCodec_Functions.

Table of client visible functions exported by a codec library instance. These functions declare the only operations that may be performed by users of a codec (but note that separate function tables exist for encoding- and decoding-specific functions).

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

◆ getLastError

const AP_char8*(* AP_EventCodec_Functions::getLastError) (struct AP_EventCodec *codec)

getLastError

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

Parameters
codecThe event codec instance
Returns
The last error message generated by the codec

◆ getStatus

void(* AP_EventCodec_Functions::getStatus) (struct AP_EventCodec *codec, AP_EventCodecStatus *status)

getStatus

Fill in the supplied AP_EventCodecStatus structure with up-to-date status information for the codec. Note that any data pointed to by the returned structure (such as strings) remains owned by the codec. The caller must copy this data if it wishes to modify it.

Parameters
codecThe event codec instance
statusThe status structure to be filled in

◆ updateProperties

AP_EventCodecError(* AP_EventCodec_Functions::updateProperties) (struct AP_EventCodec *codec, AP_EventCodecProperties *properties, IAF_TimestampConfig *timestampConfig)

updateProperties

Update the configuration of the codec. The codec may assume that flushUpstream() and flushDownstream() have been called before this function is invoked. The recommended procedure for updating properties is to first compare the new property set with the existing stored properties – if there are no changes, no action should be taken. Any pointer to the old property set becomes invalid as soon as this function returns; any such pointers should therefore be discarded in favour of the supplied new properties.

Parameters
codecThe event codec instance
propertiesThe new codec property set derived from the IAF configuration file
timestampConfigTimestamp recording/logging settings
Returns
Event codec error code. If this is not AP_EventCodec_OK, the getLastError() function of the codec should be called to get a more detailed description of what went wrong.

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