eLooM for STM32 application  v3.3.0
A framework for multitasking low power embedded applications powerd by STM32
Loading...
Searching...
No Matches
IEventSrc_vtbl.h
Go to the documentation of this file.
1
22#ifndef INCLUDE_EVENTS_IEVENTSRCVTBL_H_
23#define INCLUDE_EVENTS_IEVENTSRCVTBL_H_
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
30
31
32typedef struct _IEventSrc_vtbl IEventSrc_vtbl;
33
42 uint32_t (*GetMaxListenerCount)(const IEventSrc *_this);
43 sys_error_code_t (*SendEvent)(const IEventSrc *_this, const IEvent *pxEvent, void *pvParams);
44};
45
49struct _IEventSrc {
54};
55
56
57// Public API declaration
58//***********************
59
60
61// Inline functions definition
62// ***************************
63
66 return _this->vptr->Init(_this);
67}
68
71 return _this->vptr->AddEventListener(_this, pListener);
72}
73
76 return _this->vptr->RemoveEventListener(_this, pListener);
77}
78
81 return _this->vptr->GetMaxListenerCount(_this);
82}
83
85sys_error_code_t IEventSrcSendEvent(const IEventSrc *_this, const IEvent *pxEvent, void *pvParams) {
86 return _this->vptr->SendEvent(_this, pxEvent, pvParams);
87}
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif /* INCLUDE_EVENTS_IEVENTSRCVTBL_H_ */
SYS_DEFINE_STATIC_INLINE sys_error_code_t IEventSrcAddEventListener(IEventSrc *_this, IEventListener *pListener)
Definition IEventSrc_vtbl.h:70
SYS_DEFINE_STATIC_INLINE uint32_t IEventSrcGetMaxListenerCount(const IEventSrc *_this)
Definition IEventSrc_vtbl.h:80
SYS_DEFINE_STATIC_INLINE sys_error_code_t IEventSrcRemoveEventListener(IEventSrc *_this, IEventListener *pListener)
Definition IEventSrc_vtbl.h:75
SYS_DEFINE_STATIC_INLINE sys_error_code_t IEventSrcSendEvent(const IEventSrc *_this, const IEvent *pxEvent, void *pvParams)
Definition IEventSrc_vtbl.h:85
SYS_DEFINE_STATIC_INLINE sys_error_code_t IEventSrcInit(IEventSrc *_this)
Definition IEventSrc_vtbl.h:65
Umbrella header for the basic system features.
Definition IEvent.h:48
Definition IEventListener_vtbl.h:49
Definition IEventSrc_vtbl.h:38
uint32_t(* GetMaxListenerCount)(const IEventSrc *_this)
Definition IEventSrc_vtbl.h:42
sys_error_code_t(* RemoveEventListener)(IEventSrc *_this, IEventListener *pListener)
Definition IEventSrc_vtbl.h:41
sys_error_code_t(* SendEvent)(const IEventSrc *_this, const IEvent *pxEvent, void *pvParams)
Definition IEventSrc_vtbl.h:43
sys_error_code_t(* Init)(IEventSrc *_this)
Definition IEventSrc_vtbl.h:39
sys_error_code_t(* AddEventListener)(IEventSrc *_this, IEventListener *pListener)
Definition IEventSrc_vtbl.h:40
Definition IEventSrc_vtbl.h:49
const IEventSrc_vtbl * vptr
Definition IEventSrc_vtbl.h:53
uint16_t sys_error_code_t
Definition syserror.h:41
#define SYS_DEFINE_STATIC_INLINE
Definition systp.h:95