Defines, Structures, Typedefs, Functions. More...
Files | |
file | clEventApi.h |
Header file of Event Manager Related APIs. | |
file | clEventErrors.h |
Header file of Event Manager Error Codes. | |
file | clEventExtApi.h |
Header file of Event Manager Related APIs. |
Classes | |
struct | ClEventCallbacksT |
The callback structure supplied by an EO to the EM containing the callback functions that can be invoked by the EM. More... | |
struct | ClEventFilterArrayT |
The event filter array structure defines one or more filters. More... | |
struct | ClEventFilterT |
The event filter structure defines the filter type and the filter pattern to be applied on an event pattern when filtering events on an event channel. More... | |
struct | ClEventPatternArrayT |
The type of an event pattern array. More... | |
struct | ClEventPatternT |
An Event pattern may contain a name (for example: a process name, checkpoint name, service instance name, and so on). More... |
Macros | |
#define | CL_EVENT_CHANNEL_CREATE (0x8) |
Creates an event channel if it does not exist. | |
#define | CL_EVENT_CHANNEL_PUBLISHER (0x4) |
Opens an event channel for publishing events. | |
#define | CL_EVENT_CHANNEL_SUBSCRIBER (0x2) |
Opens an event channel for subscribing events. | |
#define | CL_EVENT_ERR_ALREADY_INITIALIZED (0x10e) /* 0x10e */ |
The Event Library has already been initialized by this EO. | |
#define | CL_EVENT_ERR_BAD_FLAGS (0x103) /* 0x103 */ |
The flags specified are invalid - out of range or not compatible with each other. | |
#define | CL_EVENT_ERR_BAD_HANDLE (0x105) /* 0x105 */ |
The event handle specified is invalid - has not been allocated or has been already deleted. | |
#define | CL_EVENT_ERR_CHANNEL_ALREADY_OPENED (0x108) /* 0x108 */ |
The channel has been already openend by the EO. | |
#define | CL_EVENT_ERR_CHANNEL_NOT_OPENED (0x109) /* 0x109 */ |
The channel specified by the channel handle has not been opened. | |
#define | CL_EVENT_ERR_DUPLICATE_SUBSCRIPTION (0x10a) /* 0x10a */ |
The EO has already subscribed on the specified channel using the given subscription ID. | |
#define | CL_EVENT_ERR_EXIST (0x112) /* 0x112 */ |
The specified resource such as Subscription ID, Channel, and so on already exists. | |
#define | CL_EVENT_ERR_INFO_WALK_STOP (0x10d) /* 0x10d */ |
This return code is used to check the normal termination of the event info walk. | |
#define | CL_EVENT_ERR_INIT (0x114) /* 0x114 */ |
The ChannelOpen Callback is NULL. | |
#define | CL_EVENT_ERR_INIT_NOT_DONE (0x100) /* 0x100 */ |
Event Library has not been initialized. | |
#define | CL_EVENT_ERR_INTERNAL (0x101) /* 0x101 */ |
An unexpected error has occured in the Event Library and it may not be able to process the request. | |
#define | CL_EVENT_ERR_INVALID_CHANNEL_HANDLE (0x104) /* 0x104 */ |
The channel handle passed is invalid - the channel has not been created. | |
#define | CL_EVENT_ERR_INVALID_PARAM (0x102) /* 0x102 */ |
The parameter passed to the API is invalid. | |
#define | CL_EVENT_ERR_NO_MEM (0x106) /* 0x106 */ |
The Event Library is out of memory and no memory can be allocated at this point in time. | |
#define | CL_EVENT_ERR_NO_RESOURCE (0x113) /* 0x113 */ |
The Event Library is out of some resource other than memory like file descriptors. | |
#define | CL_EVENT_ERR_NO_SPACE (0x110) /* 0x110 */ |
The memory allocated by the user for the event data (payload) is insufficient. | |
#define | CL_EVENT_ERR_NOT_OPENED_FOR_PUBLISH (0x10c) /* 0x10c */ |
The channel has not been opened for publish and an attempt to subscribe was made on the same. | |
#define | CL_EVENT_ERR_NOT_OPENED_FOR_SUBSCRIPTION (0x10b) /* 0x10b */ |
The channel has not been opened for subscription and an attempt to subscribe was made on the same. | |
#define | CL_EVENT_ERR_NULL_PTR (0x107) /* 0x107 */ |
The parameter passed to the API is NULL. | |
#define | CL_EVENT_ERR_STOP_WALK (0x10f) /* 0x10f */ |
This return code is used to check the normal termination of a walk to remove subscribers. | |
#define | CL_EVENT_ERR_VERSION (0x111) /* 0x111 */ |
The version specified is not supported or is incorrect. | |
#define | CL_EVENT_GLOBAL_CHANNEL (0x1) |
Opens a global event channel. | |
#define | CL_EVENT_HIGHEST_PRIORITY (0x0) |
Highest priority. | |
#define | CL_EVENT_LOCAL_CHANNEL (0x0) |
Opens a local event channel. | |
#define | CL_EVENT_LOWEST_PRIORITY (0x3) |
Lowest priority. | |
#define | CL_EVENT_NON_ZERO_MATCH CL_EVENT_PASS_ALL_FILTER+1 |
This is extension to SAF filter ClEventFilterTypeT to provide non-zero matching. | |
#define | CL_EVENT_VERSION {(ClUint8T)'B', 0x1, 0x1} |
Latest Supported SAF Version for Event Service. | |
#define | CL_EVENTS_RC(ERR_ID) (CL_RC(CL_CID_EVENTS, ERR_ID)) |
Appends the Event Component ID to the Error Code. |
Typedefs | |
typedef ClHandleT | ClEventChannelHandleT |
The type of a handle to an open event channel. | |
typedef void(* | ClEventChannelOpenCallbackT )(ClInvocationT invocation, ClEventChannelHandleT channelHandle, ClRcT error) |
Open channel callback. | |
typedef ClUint8T | ClEventChannelOpenFlagsT |
Event Channel open flag. | |
typedef void(* | ClEventDeliverCallbackT )(ClEventSubscriptionIdT subscriptionId, ClEventHandleT eventHandle, ClSizeT eventDataSize) |
Event delivery callback. | |
typedef ClHandleT | ClEventHandleT |
The type of a handle to an event. | |
typedef ClUint64T | ClEventIdT |
The type of an event identifier. | |
typedef ClHandleT | ClEventInitHandleT |
The type of the handle supplied by the EM to an EO during the initialization of the EM library. | |
typedef ClUint8T | ClEventPriorityT |
Event priority type - it ranges from CL_EVENT_LOWEST_PRIORITY to CL_EVENT_HIGHEST_PRIORITY . | |
typedef ClUint32T | ClEventSubscriptionIdT |
The type of an identifier for a particular subscription by a particular EO on a particular event channel. |
Enumerations | |
enum | ClEventFilterTypeT { CL_EVENT_PREFIX_FILTER = 1, CL_EVENT_SUFFIX_FILTER = 2, CL_EVENT_EXACT_FILTER = 3, CL_EVENT_PASS_ALL_FILTER = 4 } |
Filter Related Information. More... |
Functions | |
ClRcT | clEventAllocate (CL_IN ClEventChannelHandleT channelHandle, CL_OUT ClEventHandleT *pEventHandle) |
Allocates an event header. | |
ClRcT | clEventAttributesGet (CL_IN ClEventHandleT eventHandle, CL_IN ClEventPatternArrayT *pPatternArray, CL_OUT ClEventPriorityT *pPriority, CL_OUT ClTimeT *pRetentionTime, CL_OUT ClNameT *pPublisherName, CL_OUT ClTimeT *pPublishTime, CL_OUT ClEventIdT *pEventId) |
Returns the event attributes. | |
ClRcT | clEventAttributesSet (CL_IN ClEventHandleT eventHandle, CL_IN const ClEventPatternArrayT *pPatternArray, CL_IN ClEventPriorityT priority, CL_IN ClTimeT retentionTime, CL_IN const ClNameT *pPublisherName) |
Sets the event attributes. | |
ClRcT | clEventChannelClose (CL_IN ClEventChannelHandleT channelHandle) |
Closes an event channel. | |
ClRcT | clEventChannelOpen (CL_IN ClEventInitHandleT evtHandle, CL_IN const ClNameT *pEvtChannelName, CL_IN ClEventChannelOpenFlagsT evtChannelOpenFlag, CL_IN ClTimeT timeout, CL_OUT ClEventChannelHandleT *pChannelHandle) |
Opens an event channel. | |
ClRcT | clEventChannelOpenAsync (CL_IN ClEventInitHandleT evtHandle, CL_IN ClInvocationT invocation, CL_IN const ClNameT *pEvtChannelName, CL_IN ClEventChannelOpenFlagsT channelOpenFlags) |
Opens an event channel asynchronously. | |
ClRcT | clEventChannelUnlink (CL_IN ClEventInitHandleT evtHandle, CL_IN const ClNameT *pEvtChannelName) |
Deletes an event channel. | |
ClRcT | clEventCookieGet (CL_IN ClEventHandleT eventHandle, CL_OUT void **ppCookie) |
Returns the cookie. | |
ClRcT | clEventDataGet (CL_IN ClEventHandleT eventHandle, CL_INOUT void *pEventData, CL_INOUT ClSizeT *pEventDataSize) |
Returns data associated with an earlier event. | |
ClRcT | clEventDispatch (ClEventInitHandleT evtHandle, ClDispatchFlagsT dispatchFlags) |
Invokes the pending callback in context of the EO. | |
ClRcT | clEventExtAttributesGet (CL_IN ClEventHandleT eventHandle, CL_OUT ClUint32T *pEventType, CL_OUT ClEventPriorityT *pPriority, CL_OUT ClTimeT *pRetentionTime, CL_OUT ClNameT *pPublisherName, CL_OUT ClTimeT *pPublishTime, CL_OUT ClEventIdT *pEventId) |
Returns event attributes designated by eventHandle. | |
ClRcT | clEventExtAttributesSet (CL_IN ClEventHandleT eventHandle, CL_IN ClUint32T eventType, CL_IN ClEventPriorityT priority, CL_IN ClTimeT retentionTime, CL_IN const ClNameT *pPublisherName) |
Sets event attributes. | |
ClRcT | clEventExtSubscribe (CL_IN ClEventChannelHandleT channelHandle, CL_IN ClUint32T eventType, CL_IN ClEventSubscriptionIdT subscriptionId, CL_IN void *pCookie) |
Subscribes to an event identified by event type (constant integer instead of filter). | |
ClRcT | clEventExtWithRbeSubscribe (CL_IN const ClEventChannelHandleT channelHandle, CL_IN ClRuleExprT *pRbeExpr, CL_IN ClEventSubscriptionIdT subscriptionID, CL_IN void *pCookie) |
Subscribes to an event identified by an RBE. | |
ClRcT | clEventFinalize (CL_IN ClEventInitHandleT evtHandle) |
Finalizes EM library. | |
ClRcT | clEventFree (CL_IN ClEventHandleT eventHandle) |
Frees an event header. | |
ClRcT | clEventInitialize (CL_OUT ClEventInitHandleT *pEvtHandle, CL_IN const ClEventCallbacksT *pEvtCallbacks, CL_INOUT ClVersionT *pVersion) |
Initializes EM library. | |
ClRcT | clEventPublish (CL_IN ClEventHandleT eventHandle, CL_IN const void *pEventData, CL_IN ClSizeT eventDataSize, CL_OUT ClEventIdT *pEventId) |
Publishes an event. | |
ClRcT | clEventSelectionObjectGet (ClEventInitHandleT evtHandle, ClSelectionObjectT *pSelectionObject) |
Helps detect pending callbacks. | |
ClRcT | clEventSubscribe (CL_IN ClEventChannelHandleT channelHandle, CL_IN const ClEventFilterArrayT *pFilters, CL_IN ClEventSubscriptionIdT subscriptionId, CL_IN void *pCookie) |
Subscribes to an event identified by an event type (filter). | |
ClRcT | clEventUnsubscribe (CL_IN ClEventChannelHandleT channelHandle, CL_IN ClEventSubscriptionIdT subscriptionId) |
Unsubscribes from an event. |
Defines, Structures, Typedefs, Functions.
#define CL_EVENT_ERR_INVALID_CHANNEL_HANDLE (0x104) /* 0x104 */ |
The channel handle passed is invalid - the channel has not been created.
It may be closed/deleted/unlinked.
typedef void(* ClEventChannelOpenCallbackT)(ClInvocationT invocation, ClEventChannelHandleT channelHandle, ClRcT error) |
Open channel callback.
invocation | This parameter was supplied by an EO in the corresponding invocation of the clEventChannelOpenAsync() function and is used by the EM in this callback. It allows the EO to match the invocation of the function with the invocation of this callback. |
channelHandle | The handle that designates the event channel. |
error | This parameter indicates whether the clEventChannelOpenAsync function executed successfully. |
typedef ClUint8T ClEventChannelOpenFlagsT |
Event Channel open flag.
It can have one of the following values:
CL_EVENT_LOCAL_CHANNEL
CL_EVENT_GLOBAL_CHANNEL
CL_EVENT_CHANNEL_PUBLISHER
CL_EVENT_CHANNEL_SUBSCRIBER
CL_EVENT_CHANNEL_CREATE
evtChannelOpenFlags | (in) The requested access modes and scope of the event channel. The value of this flag is obtained by a bitwise or can be set as one of the following: |
CL_EVENT_CHANNEL_PUBLISHER:
to enable the EO to use the event channel handle returned by the clEventPublish function. CL_EVENT_CHANNEL_SUBSCRIBER:
to enable the EO to use the event channel handle returned by the clEventSubscribe function. CL_EVENT_CHANNEL_CREATE:
to open and create an event channel that does not exist. CL_EVENT_GLOBAL_CHANNEL
and CL_EVENT_LOCAL_CHANNEL
flags specify the scope of the event channel. typedef void(* ClEventDeliverCallbackT)(ClEventSubscriptionIdT subscriptionId, ClEventHandleT eventHandle, ClSizeT eventDataSize) |
Event delivery callback.
subscriptionId | An identifier that an EO supplied to an invocation of clEventSubscribe() to determine which subscription resulted in the delivery of the event. |
eventHandle | The handle to the event delivered by this callback. |
ClSizeT | The size of the data associated with the event. |
typedef ClUint64T ClEventIdT |
The type of an event identifier.
Values ranging from 0 to 1000 have special meanings and cannot be used by the event service to identify regular events.
typedef ClHandleT ClEventInitHandleT |
The type of the handle supplied by the EM to an EO during the initialization of the EM library.
The EO uses this to whenever it invokes an EM function so that the EM can recognize the EO.
typedef ClUint32T ClEventSubscriptionIdT |
The type of an identifier for a particular subscription by a particular EO on a particular event channel.
This identifier is used to associate the delivery of events for that subscription to the EO.
enum ClEventFilterTypeT |
Filter Related Information.
ClRcT clEventAllocate | ( | CL_IN ClEventChannelHandleT | channelHandle, |
CL_OUT ClEventHandleT * | pEventHandle | ||
) |
Allocates an event header.
channelHandle | Handle of the event channel on which the event is to be published. It must be obtained earlier either by clEventChannelOpen() function or clEvtChannelOpenCallback() function. |
pEventHandle | (out) Pointer to the handle for the newly allocated event. The invoking EO is responsible to allocate memory for the eventHandle before calling this function. The EM will assign the value of the eventHandle when this function is invoked. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_NO_MEM | On memory allocation failure. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
ClRcT clEventAttributesGet | ( | CL_IN ClEventHandleT | eventHandle, |
CL_IN ClEventPatternArrayT * | pPatternArray, | ||
CL_OUT ClEventPriorityT * | pPriority, | ||
CL_OUT ClTimeT * | pRetentionTime, | ||
CL_OUT ClNameT * | pPublisherName, | ||
CL_OUT ClTimeT * | pPublishTime, | ||
CL_OUT ClEventIdT * | pEventId | ||
) |
Returns the event attributes.
eventHandle | Handle of the event for which attributes are to be retrieved. |
pPatternArray | (in/out) Pointer to a structure that describes the event pattern array and the number of patterns to be retrieved.
|
pPriority | (out) Pointer to the priority of the event. |
pRetentionTime | (out) Pointer to the duration for which the publisher will retain the event. |
pPublisherName | (out) Pointer to the name of the event publisher. |
pPublishTime | (out) Pointer to the time when the publisher published the event. NOTE: The nodes may required to synched wrt time to use this parameter effectively. |
pEventId | (out) Pointer to the event identifier. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NO_SPACE | The buffer provided by the process is too small to hold the data associated with the delivered event. |
ClRcT clEventAttributesSet | ( | CL_IN ClEventHandleT | eventHandle, |
CL_IN const ClEventPatternArrayT * | pPatternArray, | ||
CL_IN ClEventPriorityT | priority, | ||
CL_IN ClTimeT | retentionTime, | ||
CL_IN const ClNameT * | pPublisherName | ||
) |
Sets the event attributes.
eventHandle | Handle of the event for which attributes are to be set. |
pPatternArray | Pointer to a structure that contains the array of pattern to be copied into the event pattern array and the number of such pattern. |
priority | Priority of the event. |
retentionTime | Duration for which the event will be retained. NOTE: Event Retention is not currently supported and this arguments has no effect. |
pPublisherName | Pointer to the name of the event publisher. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NOT_OPENED_FOR_PUBLISH | CL_EVENT_CHANNEL_PUBLISHER flag was not set for the event channel on which the event to be published was allocated, i.e, the event channel was not opened for publisher access. |
ClRcT clEventChannelClose | ( | CL_IN ClEventChannelHandleT | channelHandle | ) |
Closes an event channel.
channelHandle | Handle of the event channel to close. It must have been obtained by an earlier invocation of either clEventChannelOpen() function or clEvtChannelOpenCallback() function. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
ClRcT clEventChannelOpen | ( | CL_IN ClEventInitHandleT | evtHandle, |
CL_IN const ClNameT * | pEvtChannelName, | ||
CL_IN ClEventChannelOpenFlagsT | evtChannelOpenFlag, | ||
CL_IN ClTimeT | timeout, | ||
CL_OUT ClEventChannelHandleT * | pChannelHandle | ||
) |
Opens an event channel.
evtHandle | The handle obtained by the clEventInitialize() function designating this particular initialization of the EM. |
pEvtChannelName | Pointer to the name of the event channel to identify the channel. |
evtChannelOpenFlags | The requested access modes and scope of the event channel. The value of this flag is obtained by a bitwise or can be set as one of the following:
|
timeout | Time-out for calling this function. Note: An event channel can be created even after the time-out has expired. |
pChannelHandle | (out) Pointer to the handle of the event channel, provided by the invoking EO in the address space of the EO. If the event channel is opened successfully, the EM stores the handle in pChannelHandle. This handle is used by the EO to access the channel in subsequent invocations of the Event Service functions. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_BAD_FLAGS | On passing an invalid flag. |
CL_EVENT_ERR_NULL_PTR | On passing a NULL pointer. |
CL_EVENT_ERR_NO_MEM | On memory allocation failure. |
CL_EVENT_ERR_CHANNEL_ALREADY_OPENED | If a channel is already opened by an EO with the same name and scope. |
CL_EVENT_CHANNEL_CREATE
flag is set in channelOpenFlags, the event channel is created. This function is a blocking operation and returns a new event channel handle.ClRcT clEventChannelOpenAsync | ( | CL_IN ClEventInitHandleT | evtHandle, |
CL_IN ClInvocationT | invocation, | ||
CL_IN const ClNameT * | pEvtChannelName, | ||
CL_IN ClEventChannelOpenFlagsT | channelOpenFlags | ||
) |
Opens an event channel asynchronously.
evtHandle | Handle obtained by the clEventInitialize() function designating this particular initialization of the EM. |
invocation | It allows the invoking component to match the invocation of clEventChannelOpenAsync() function with the corresponding callback. |
pEvtChannelName | Pointer to the name of the event channel that identifies the event channel. |
evtChannelOpenFlags | The requested access modes and scope of the event channel. The value of this flag is obtained bitwise or can be set as one of the following:
|
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_BAD_FLAGS | On passing an invalid flag. |
CL_EVENT_ERR_NULL_PTR | On passing a NULL pointer. |
CL_EVENT_ERR_NO_MEM | On memory allocation failure. |
CL_EVENT_ERR_CHANNEL_ALREADY_OPENED | If a channel is already opened by an EO with the same name and scope. |
CL_EVENT_CHANNEL_CREATE
flag is set in the channelOpenFlags parameter, the event channel is created. ClRcT clEventChannelUnlink | ( | CL_IN ClEventInitHandleT | evtHandle, |
CL_IN const ClNameT * | pEvtChannelName | ||
) |
Deletes an event channel.
evtHandle | Handle obtained by the invocation of clEventInitialize() designating this particular initialization of the EM. |
pEvtChannelName | Pointer to the name of the event channel to be unlinked. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_CHANNEL_CREATE
flag set. This way, a new instance of the event channel is created while the old instance of the event channel has been still not deleted.ClRcT clEventCookieGet | ( | CL_IN ClEventHandleT | eventHandle, |
CL_OUT void ** | ppCookie | ||
) |
Returns the cookie.
eventHandle | Handle to the event delivered by clEvtEventDeliverCallback(). |
ppCookie | (out) Cookie information while subscribing for event. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
ClRcT clEventDataGet | ( | CL_IN ClEventHandleT | eventHandle, |
CL_INOUT void * | pEventData, | ||
CL_INOUT ClSizeT * | pEventDataSize | ||
) |
Returns data associated with an earlier event.
eventHandle | Handle to the event delivered by clEvtEventDeliverCallback(). |
pEventData | (in/out) Pointer to a buffer provided by the EO in which the EM stores the data associated with the delivered event. If pEventData is NULL, the value of pEventDataSize provided by the invoking EO is ignored, and the buffer is provided by the EM library. The buffer must be deallocated by the calling EO after returning from the clEventDataGet call. NOTE: This argument cannot be NULL as the API needs a pointer to pointer to return allocated memory to the callee. This is a bug in the SAF sepcification B.01.01 and has been fixed in the newer version of the specification. The user is always required allocate and also free the memory. |
pEventDataSize | (in/out) If pEventData is not NULL, the in value of this parameter is same as the pEventData buffer provided by the invoking EO.
|
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NO_SPACE | The buffer provided by the process is too small to hold the data associated with the delivered event. |
ClRcT clEventDispatch | ( | ClEventInitHandleT | evtHandle, |
ClDispatchFlagsT | dispatchFlags | ||
) |
Invokes the pending callback in context of the EO.
evtHandle | The handle, obtained through the clEventInitialize() function, designating this particular initialization of the Event Service. |
dispatchFlags | Flags that specify the callback execution behavior clEventDispatch() function, which have the values CL_DISPATCH_ONE , CL_DISPATCH_ALL or CL_DISPATCH_BLOCKING , as defined in clCommon.h. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
ClRcT clEventExtAttributesGet | ( | CL_IN ClEventHandleT | eventHandle, |
CL_OUT ClUint32T * | pEventType, | ||
CL_OUT ClEventPriorityT * | pPriority, | ||
CL_OUT ClTimeT * | pRetentionTime, | ||
CL_OUT ClNameT * | pPublisherName, | ||
CL_OUT ClTimeT * | pPublishTime, | ||
CL_OUT ClEventIdT * | pEventId | ||
) |
Returns event attributes designated by eventHandle.
eventHandle | Handle of the event for which attributes are to be retrieved. |
pEventType | (out) Pointer to an event type. |
pPriority | (out) Pointer to the priority of the event. |
pRetentionTime | (out) Pointer to the duration for which the publisher will retain the event. |
pPublisherName | (out) Pointer to the name of the publisher of the event. |
pPublishTime | (out) Pointer to the time at which the publisher published the event. |
pEventId | (out) Pointer to the event identifier. |
CL_OK | The API completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | On initialization failure. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
ClRcT clEventExtAttributesSet | ( | CL_IN ClEventHandleT | eventHandle, |
CL_IN ClUint32T | eventType, | ||
CL_IN ClEventPriorityT | priority, | ||
CL_IN ClTimeT | retentionTime, | ||
CL_IN const ClNameT * | pPublisherName | ||
) |
Sets event attributes.
eventHandle | Handle of the event for which attributes are to be set. |
eventType | Event type that wants to publish on given channel. |
priority | Priority of the event. |
retentionTime | The duration till when the event will be retained. |
pPublisherName | Pointer to the name of the event publisher. |
CL_OK | The API completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | On initialization failure. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
ClRcT clEventExtSubscribe | ( | CL_IN ClEventChannelHandleT | channelHandle, |
CL_IN ClUint32T | eventType, | ||
CL_IN ClEventSubscriptionIdT | subscriptionId, | ||
CL_IN void * | pCookie | ||
) |
Subscribes to an event identified by event type (constant integer instead of filter).
channelHandle | Handle of the event channel on which the EO is subscribing to receive events. This parameter must be obtained earlier by clEventChannelOpen API or clEvtChannelOpenCallback() function. |
eventType | Event type within event channel. |
pSubscriptionId | Identifies a specific subscription on this instance of the opened event channel corresponding to the channelHandle and that is used as a parameter of clEvtEventDeliverCallback(). |
pCookie | Cookie passed by you, which can be sent back by the clEvtEventUtilsCookiGet() function. |
CL_OK | The API completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | On initialization failure. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NO_MEM | On memory allocation failure. |
CL_EVENT_ERR_NOT_OPENED_FOR_SUBSCRIPTION | The channel, identified by channelHandle, was not opened with the CL_EVENT_CHANNEL_SUBSCRIBER flag set, i.e, the event channel was not opened for subscriber access. |
CL_EVENT_CHANNEL_SUBSCRIBER
flag set for successful execution of this function. The memory associated with the filters is not deallocated by the clEventExtSubscribe function. It is the responsibility of the invoking EO to deallocate the memory when the clEventExtSubscribe function returns. ClRcT clEventExtWithRbeSubscribe | ( | CL_IN const ClEventChannelHandleT | channelHandle, |
CL_IN ClRuleExprT * | pRbeExpr, | ||
CL_IN ClEventSubscriptionIdT | subscriptionID, | ||
CL_IN void * | pCookie | ||
) |
Subscribes to an event identified by an RBE.
channelHandle | Handle of the event channel on which the EO is subscribing to receive events. This parameter must be obtained earlier by clEventChannelOpen() API or clEvtChannelOpenCallback() function. |
pRbeExpr | Pointer to RBE expression, allocated by the EO, that defines filter patterns using RBE expression. The EO may deallocate the memory for the filters when clEventExtWithRbeSubscribe returns. |
pSubscriptionId | Identifies a specific subscription on this instance of the opened event channel corresponding to the channelHandle and that is used as a parameter of clEvtEventDeliverCallback() function. |
pCookie | Cookie passed by you, which can be given back by the clEvtEventUtilsCookiGet() function. |
CL_OK | The API completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | On initialization failure. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NO_MEM | On memory allocation failure. |
CL_EVENT_ERR_NOT_OPENED_FOR_SUBSCRIPTION | The channel, identified by channelHandle, was not opened with the CL_EVENT_CHANNEL_SUBSCRIBER flag set, i.e, the event channel was not opened for subscriber access. |
CL_EVENT_CHANNEL_SUBSCRIBER
flag set for an invocation of this function to be successful. ClRcT clEventFinalize | ( | CL_IN ClEventInitHandleT | evtHandle | ) |
Finalizes EM library.
evtHandle | Handle obtained through clEventInitialize() function designating this particular initialization of the EM. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
ClRcT clEventFree | ( | CL_IN ClEventHandleT | eventHandle | ) |
Frees an event header.
eventHandle | Handle of the event for which memory is to be freed by the EM. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
ClRcT clEventInitialize | ( | CL_OUT ClEventInitHandleT * | pEvtHandle, |
CL_IN const ClEventCallbacksT * | pEvtCallbacks, | ||
CL_INOUT ClVersionT * | pVersion | ||
) |
Initializes EM library.
pEvtHandle | (out) Pointer to the handle designating this particular initialization of the EM to be returned. |
pEvtCallbacks | If evtCallbacks is set to NULL, no callback is registered; else, it is a pointer to ClEventCallbacksT structure, containing the callback functions of the EO that the EM may invoke. Only non-NULL callback functions in this structure will be registered. |
pVersion | (in/out) This can be either an input or an output parameter.
|
CL_OK | The function completed successfully. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_AIS_OK
is returned.ClRcT clEventPublish | ( | CL_IN ClEventHandleT | eventHandle, |
CL_IN const void * | pEventData, | ||
CL_IN ClSizeT | eventDataSize, | ||
CL_OUT ClEventIdT * | pEventId | ||
) |
Publishes an event.
eventHandle | Handle of the event to be published. The event must be allocated by the clEventAllocate() function or obtained vthrough the clEvtEventDeliverCallback() function. The patterns must be set by clEventAttributesSet() function, if changes are required. |
pEventData | Pointer to a buffer that contains additional event information for the event being published. This parameter is set to NULL if no additional information is associated with the event. The EO may deallocate the memory for pEventData when clEventPublish() function returns. |
eventDataSize | The number of bytes in the buffer pointed to by pEventData. This parameter is ignored if pEventData is NULL. |
pEventId | (out) Pointer to the identifier of the event. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NOT_OPENED_FOR_PUBLISH | CL_EVENT_CHANNEL_PUBLISHER flag was not set for the event channel on which the event to be published was allocated, i.e, the event channel was not opened for publisher access. |
CL_EVENT_CHANNEL_PUBLISHER
flag set for successful execution of this function. ClRcT clEventSelectionObjectGet | ( | ClEventInitHandleT | evtHandle, |
ClSelectionObjectT * | pSelectionObject | ||
) |
Helps detect pending callbacks.
evtHandle | The handle, obtained through the clEventInitialize() function, designating this particular initialization of the Event Service. |
pSelectionObject | (out) A pointer to the operating system handle that the invoking EO can use to detect pending callbacks. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
ClRcT clEventSubscribe | ( | CL_IN ClEventChannelHandleT | channelHandle, |
CL_IN const ClEventFilterArrayT * | pFilters, | ||
CL_IN ClEventSubscriptionIdT | subscriptionId, | ||
CL_IN void * | pCookie | ||
) |
Subscribes to an event identified by an event type (filter).
channelHandle | Handle of the event channel on which the EO is subscribing to receive events. The parameter channelHandle must have been obtained previously by either clEventChannelOpen() or clEvtChannelOpenCallback() functions. |
pFilters | Pointer to a ClEventFilterArrayT structure, allocated by the EO, that defines filter patterns to use to filter events received on the event channel. The EO may deallocate the memory for the filters when clEventSubscribe() returns. |
pSubscriptionId | Identifies a specific subscription on this instance of the opened event channel corresponding to the channelHandle and that is used as a parameter of clEvtEventDeliverCallback(). |
pCookie | Cookie passed by you, which can be given back by the clEvtEventUtilsCookiGet() function. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NO_MEM | On memory allocation failure. |
CL_EVENT_ERR_NOT_OPENED_FOR_SUBSCRIPTION | The channel, identified by channelHandle, was not opened with the CL_EVENT_CHANNEL_SUBSCRIBER flag set, i.e, the event channel was not opened for subscriber access. |
CL_EVENT_CHANNEL_SUBSCRIBER
flag set for successful execution of this function. ClRcT clEventUnsubscribe | ( | CL_IN ClEventChannelHandleT | channelHandle, |
CL_IN ClEventSubscriptionIdT | subscriptionId | ||
) |
Unsubscribes from an event.
channelHandle | The event channel for which the subscriber is requesting the EM to delete the subscription. This parameter must be obtained earlier by either clEventChannelOpen() function or clEvtChannelOpenCallback() function. |
subscriptionId | Identifier of the subscription. |
CL_OK | The function completed successfully. |
CL_EVENT_ERR_INIT_NOT_DONE | Event library has not been initialized. |
CL_EVENT_ERR_BAD_HANDLE | On passing an invalid handle. |
CL_EVENT_INTERNAL_ERROR | An unexpected problem occurred within the Event Manager. |
CL_EVENT_ERR_INVALID_PARAM | On passing an invalid parameter. |
CL_EVENT_ERR_NO_MEM | On memory allocation failure. |