MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
The functions used by the MQTT client to get and return buffers.

Overview

The MQTT client needs buffers for both transmitting and receiving messages. Whenever it needs a buffer, it invokes mqttconfigGET_FREE_BUFFER_FXN function to get a buffer and after it is done it invokes mqttconfigRETURN_BUFFER_FXN to return the buffer. By default, BUFFERPOOL_GetFreeBuffer and BUFFERPOOL_ReturnBuffer functions are used to get and return buffers from the central buffer pool. The user can change the buffer management functions for MQTT client by defining mqttconfigGET_FREE_BUFFER_FXN and mqttconfigRETURN_BUFFER_FXN macros. The user should implement the two functions having signatures same as BUFFERPOOL_GetFreeBuffer and BUFFERPOOL_ReturnBuffer and then define the macros in BufferPoolConfig.h:

* uint8_t* UserDefined_GetFreeBuffer( uint32_t *pulBufferLength );
* void UserDefined_ReturnBuffer( uint8_t * const pucBuffer );
*
* #define mqttconfigGET_FREE_BUFFER_FXN UserDefined_GetFreeBuffer
* #define mqttconfigRETURN_BUFFER_FXN UserDefined_ReturnBuffer
*