Message Pool
This module includes the platform abstraction for the message pool.
Summary
Typedefs |
|
---|---|
otMessageBuffer
|
typedefstruct otMessageBuffer
Represents an OpenThread message buffer. |
Functions |
|
---|---|
otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer)
|
void
Is used to free a buffer back to the platform managed buffer pool.
|
otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize)
|
void
Initialize the platform implemented message pool.
|
otPlatMessagePoolNew(otInstance *aInstance)
|
Allocate a buffer from the platform managed buffer pool.
|
otPlatMessagePoolNumFreeBuffers(otInstance *aInstance)
|
uint16_t
Get the number of free buffers.
|
Structs |
|
---|---|
otMessageBuffer |
Represents an OpenThread message buffer. |
Typedefs
Functions
otPlatMessagePoolFree
void otPlatMessagePoolFree( otInstance *aInstance, otMessageBuffer *aBuffer )
Is used to free a buffer back to the platform managed buffer pool.
Is used when OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatMessagePoolInit
void otPlatMessagePoolInit( otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize )
Initialize the platform implemented message pool.
Is used when OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
is enabled.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatMessagePoolNew
otMessageBuffer * otPlatMessagePoolNew( otInstance *aInstance )
Allocate a buffer from the platform managed buffer pool.
Is used when OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
is enabled.
The returned buffer instance MUST have at least aBufferSize
bytes (as specified in otPlatMessagePoolInit()
).
Details | |||
---|---|---|---|
Parameters |
|
||
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.
Is used when OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT
is enabled.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The number of buffers currently free and available to OpenThread.
|
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.