eLooM for STM32 application  v3.3.0
A framework for multitasking low power embedded applications powerd by STM32
Loading...
Searching...
No Matches
IEventSrc.h File Reference

Event Source interface. More...

+ Include dependency graph for IEventSrc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static sys_error_code_t IEventSrcInit (IEventSrc *_this)
 
static sys_error_code_t IEventSrcAddEventListener (IEventSrc *_this, IEventListener *pListener)
 
static sys_error_code_t IEventSrcRemoveEventListener (IEventSrc *_this, IEventListener *pListener)
 
static uint32_t IEventSrcGetMaxListenerCount (const IEventSrc *_this)
 
static sys_error_code_t IEventSrcSendEvent (const IEventSrc *_this, const IEvent *pxEvent, void *pvParams)
 

Detailed Description

Event Source interface.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
3.0.0
Date
Apr 6, 2017

An Event Source object provides the API to add / remove Event Listener objects, and to notify the registered listeners.

Attention

Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Function Documentation

◆ IEventSrcAddEventListener()

static sys_error_code_t IEventSrcAddEventListener ( IEventSrc _this,
IEventListener pListener 
)
inlinestatic

Register a listener with this event source.

Parameters
_this[IN] specifies a pointer to an IEventSrc object.
pListener[IN] specifies a pointer to an IEventListener object.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.

◆ IEventSrcGetMaxListenerCount()

static uint32_t IEventSrcGetMaxListenerCount ( const IEventSrc _this)
inlinestatic

Get the maximum number of IEventListener that can be registered with this event source.

Parameters
_this[IN] specifies a pointer to an IEventSrc object.
Returns
the maximum number of IEventListener that can be registered with _this event source

◆ IEventSrcInit()

static sys_error_code_t IEventSrcInit ( IEventSrc _this)
inlinestatic

Initialize an event source. This function should be called after the

Parameters
_this[IN] specifies a pointer to an IEventSrc object.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.

◆ IEventSrcRemoveEventListener()

static sys_error_code_t IEventSrcRemoveEventListener ( IEventSrc _this,
IEventListener pListener 
)
inlinestatic

Remove a listener from this event source,

Parameters
_this[IN] specifies a pointer to an IEventSrc object.
pListener[IN] specifies a pointer to an IEventListener object.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.

◆ IEventSrcSendEvent()

static sys_error_code_t IEventSrcSendEvent ( const IEventSrc _this,
const IEvent pxEvent,
void *  pvParams 
)
inlinestatic

Send an IEvent to all the registered IEventListener.

Parameters
_this[IN] specifies a pointer to an IEventSrc object.
pxEvent[IN] specifies a pointer to an IEvent object.
pvParams[IN] specifies a generic pointer that can be used by the application extend the semantic Event design pattern.
Returns
SYS_NO_ERROR_CODE if success, an subclass specific error code otherwise.