Apama  10.15.1.2
AP_SemanticMapper_Functions Struct Reference

AP_SemanticMapper_Functions. More...

#include <SemanticMapper.h>

Public Attributes

AP_SemanticMapperError(* sendNormalisedEvent )(struct AP_SemanticMapper *mapper, AP_NormalisedEvent *event, AP_TimestampSet *timeStamp)
 sendNormalisedEvent More...
 
AP_SemanticMapperError(* parseApamaEvent )(struct AP_SemanticMapper *mapper, const AP_char8 *eventString, const AP_char8 *channelString, AP_NormalisedEvent ***returnArray)
 parseApamaEvent More...
 
AP_SemanticMapperError(* freeNormalizedArray )(struct AP_SemanticMapper *mapper, AP_NormalisedEvent **eventArray, AP_bool hasContent)
 freeNormalizedArray More...
 
AP_SemanticMapperError(* createApamaEventStrings )(struct AP_SemanticMapper *mapper, AP_NormalisedEvent *event, AP_char8 ***returnArrayPtr, AP_char8 ***channelArrayPtr)
 createApamaEventStrings More...
 
AP_SemanticMapperError(* freeStringArray )(struct AP_SemanticMapper *mapper, AP_char8 **eventArray, AP_bool hasContent)
 freeStringArray More...
 
const AP_char8 *(* getLastError )(struct AP_SemanticMapper *mapper)
 getLastError More...
 

Detailed Description

AP_SemanticMapper_Functions.

Table of client visible functions exported by a Semantic Mapper instance. These functions declare the only operations that may be performed by users of a Semantic Mapper.

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

◆ createApamaEventStrings

AP_SemanticMapperError(* AP_SemanticMapper_Functions::createApamaEventStrings) (struct AP_SemanticMapper *mapper, AP_NormalisedEvent *event, AP_char8 ***returnArrayPtr, AP_char8 ***channelArrayPtr)

createApamaEventStrings

Convert a customer-specific event into one (or more) Apama event strings. Ownership of the customer-specific event is passed to to this function which will handle deleting.

Parameters
mapperThe Semantic Mapper to send the event to.
eventThe event to send, represented as a set of name-value pairs. Ownership is transferred to the callee.
returnArrayPtrThe pointer populate with the array of Apama events.
channelArrayPtrThe pointer populate with the array of channel names.
Returns
Semantic Mapper error code. If this is not AP_SemanticMapper_OK, the getLastError() function should be called to get a more detailed description of what went wrong.

◆ freeNormalizedArray

AP_SemanticMapperError(* AP_SemanticMapper_Functions::freeNormalizedArray) (struct AP_SemanticMapper *mapper, AP_NormalisedEvent **eventArray, AP_bool hasContent)

freeNormalizedArray

Free a normalized event array. Elements will NOT be deleted.

Parameters
mapperThe Semantic Mapper to send the event to.
eventArrayThe array of normalized events to free (last element must be NULL).
hasContentAP_TRUE if the array has normalized events to be deleted.
Returns
Semantic Mapper error code. If this is not AP_SemanticMapper_OK, the getLastError() function should be called to get a more detailed description of what went wrong.

◆ freeStringArray

AP_SemanticMapperError(* AP_SemanticMapper_Functions::freeStringArray) (struct AP_SemanticMapper *mapper, AP_char8 **eventArray, AP_bool hasContent)

freeStringArray

Free an array of Apama event strings.

Parameters
mapperThe Semantic Mapper to send the event to.
eventArrayThe array of event strings to free (last element must be NULL).
hasContentAP_TRUE if the array has event strings to be deleted.
Returns
Semantic Mapper error code. If this is not AP_SemanticMapper_OK, the getLastError() function should be called to get a more detailed description of what went wrong.

◆ getLastError

const AP_char8*(* AP_SemanticMapper_Functions::getLastError) (struct AP_SemanticMapper *mapper)

getLastError

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

Parameters
mapperThe Semantic Mapper instance
Returns
The last error message generated by the mapper

◆ parseApamaEvent

AP_SemanticMapperError(* AP_SemanticMapper_Functions::parseApamaEvent) (struct AP_SemanticMapper *mapper, const AP_char8 *eventString, const AP_char8 *channelString, AP_NormalisedEvent ***returnArray)

parseApamaEvent

Convert an Apama event string into one (or more) normalized events.

Parameters
mapperThe Semantic Mapper to send the event to.
eventStringThe event to parse.
channelStringThe channel the event was received on, or NULL
returnArrayThe pointer to populate with the array of normalized events.
Returns
Semantic Mapper error code. If this is not AP_SemanticMapper_OK, the getLastError() function should be called to get a more detailed description of what went wrong.

◆ sendNormalisedEvent

AP_SemanticMapperError(* AP_SemanticMapper_Functions::sendNormalisedEvent) (struct AP_SemanticMapper *mapper, AP_NormalisedEvent *event, AP_TimestampSet *timeStamp)

sendNormalisedEvent

Send a customer-specific event to the Semantic Mapper. The event will be translated into a single Apama event that will be queued for injection into the Engine.

Parameters
mapperThe Semantic Mapper to send the event to.
eventThe event to send, represented as a set of name-value pairs. Ownership is transferred to the callee.
timeStampTimestamps associated with this event. Ownership is transferred to the callee.
Returns
Semantic Mapper error code. If this is not AP_SemanticMapper_OK, the getLastError() function should be called to get a more detailed description of what went wrong.

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