RKH
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rkhfwk_evtpool.h File Reference

Specifies the event pool interface. More...

#include "rkhitl.h"
Include dependency graph for rkhfwk_evtpool.h:

Go to the source code of this file.

Functions

void rkh_evtPool_init ()
 Encapsulates the initialization of event pool manager. More...
 
RKHEvtPool * rkh_evtPool_getPool (void *stoStart, rui16_t stoSize, RKH_ES_T evtSize)
 Encapsulates the creation of an event pool. More...
 
rui8_t rkh_evtPool_getBlockSize (RKHEvtPool *const me)
 Encapsulates how RKH should obtain the block size of an event pool. More...
 
RKH_EVT_Trkh_evtPool_get (RKHEvtPool *const me)
 Encapsulates how RKH should obtain an event evt from the event pool me. More...
 
void rkh_evtPool_put (RKHEvtPool *const me, RKH_EVT_T *evt)
 Encapsulates how RKH should return an event evt to the event pool me. More...
 
rui8_t rkh_evtPool_getNumUsed (RKHEvtPool *const me)
 Encapsulates how RKH should return the current number of memory blocks used in the pool me. More...
 
rui8_t rkh_evtPool_getNumMin (RKHEvtPool *const me)
 Encapsulates how RKH should return the lowest number of free blocks ever present in the pool me. This number provides valuable empirical data for proper sizing of the memory pool. More...
 
rui8_t rkh_evtPool_getNumBlock (RKHEvtPool *const me)
 Encapsulates how RKH should return the total number of blocks in the pool me. More...
 

Detailed Description

Specifies the event pool interface.

Typically, these platform-dependent functions, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.

Definition in file rkhfwk_evtpool.h.

Function Documentation

void rkh_evtPool_init ( )

Encapsulates the initialization of event pool manager.

Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.
RKHEvtPool* rkh_evtPool_getPool ( void *  stoStart,
rui16_t  stoSize,
RKH_ES_T  evtSize 
)

Encapsulates the creation of an event pool.

Parameters
[in]stoStartstorage start. Pointer to memory from which memory blocks (events) are allocated.
[in]stoSizestorage size. Size of the memory pool storage in bytes.
[in]evtSizeevent size. This number determines the size of each memory block in the pool.
Returns
A pointer to assigned event pool.
Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.
rui8_t rkh_evtPool_getBlockSize ( RKHEvtPool *const  me)

Encapsulates how RKH should obtain the block size of an event pool.

Parameters
[in]mepointer to previously allocated memory pool structure.
Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.
RKH_EVT_T* rkh_evtPool_get ( RKHEvtPool *const  me)

Encapsulates how RKH should obtain an event evt from the event pool me.

Parameters
[in]mepointer to previously allocated memory pool structure.
Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.
void rkh_evtPool_put ( RKHEvtPool *const  me,
RKH_EVT_T evt 
)

Encapsulates how RKH should return an event evt to the event pool me.

Parameters
[in]mepointer to previously allocated memory pool structure.
[in]evtpointer to the returned event.
Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.
rui8_t rkh_evtPool_getNumUsed ( RKHEvtPool *const  me)

Encapsulates how RKH should return the current number of memory blocks used in the pool me.

Parameters
[in]mepointer to previously allocated memory pool structure.
Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.
rui8_t rkh_evtPool_getNumMin ( RKHEvtPool *const  me)

Encapsulates how RKH should return the lowest number of free blocks ever present in the pool me. This number provides valuable empirical data for proper sizing of the memory pool.

Parameters
[in]mepointer to previously allocated memory pool structure.
Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.
rui8_t rkh_evtPool_getNumBlock ( RKHEvtPool *const  me)

Encapsulates how RKH should return the total number of blocks in the pool me.

Parameters
[in]mepointer to previously allocated memory pool structure.
Note
Platform-dependent function. Typically, must be define it in the specific implementation file to a particular platform. However, only the ports to the external OS/RTOS usually need some code to bolt the framework to the external OS/RTOS.