Message Pool
This module includes the platform abstraction for the message pool.
Functions |
|
void | otPlatMessagePoolInit ( otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize) |
Initialize the platform implemented message pool.
|
|
otMessage * | otPlatMessagePoolNew ( otInstance *aInstance) |
Allocate a buffer from the platform managed buffer pool.
|
|
void | otPlatMessagePoolFree ( otInstance *aInstance, otMessage *aBuffer) |
This function is used to free a Buffer back to the platform managed buffer pool.
|
|
uint16_t | otPlatMessagePoolNumFreeBuffers ( otInstance *aInstance) |
Get the number of free buffers.
|
Detailed Description
This module includes the platform abstraction for the message pool.
Function Documentation
◆ otPlatMessagePoolFree()
void otPlatMessagePoolFree | ( | otInstance * |
aInstance,
|
otMessage * |
aBuffer
|
||
) |
This function is used to free a Buffer back to the platform managed buffer pool.
- Parameters
-
[in] aInstance
A pointer to the OpenThread instance. [in] aBuffer
The Buffer to free.
◆ otPlatMessagePoolInit()
void otPlatMessagePoolInit | ( | otInstance * |
aInstance,
|
uint16_t |
aMinNumFreeBuffers,
|
||
size_t |
aBufferSize
|
||
) |
Initialize the platform implemented message pool.
- Parameters
-
[in] aInstance
A pointer to the OpenThread instance. [in] aMinNumFreeBuffers
An uint16 containing the minimum number of free buffers desired by OpenThread. [in] aBufferSize
The size in bytes of a Buffer object.
◆ otPlatMessagePoolNew()
otMessage * otPlatMessagePoolNew | ( | otInstance * |
aInstance
|
) |
Allocate a buffer from the platform managed buffer pool.
- Parameters
-
[in] aInstance
A pointer to the OpenThread instance.
- Returns
- A pointer to the Buffer or NULL if no Buffers are available.
◆ otPlatMessagePoolNumFreeBuffers()
uint16_t otPlatMessagePoolNumFreeBuffers | ( | otInstance * |
aInstance
|
) |
Get the number of free buffers.
- Parameters
-
[in] aInstance
A pointer to the OpenThread instance.
- Returns
- The number of buffers currently free and available to OpenThread.