Compile-Time Configuration

µC/MQTT-client compile-time configuration allows for enabling/disabling of available features. This gives it a variable memory footprint (RAM & ROM).

A template configuration file (mqtt-c_cfg.h) is included in the module package (see Directories and Files). This configuration should be copied into the application directory and included in the project. Here is the list of each configuration variables description and value. However, keep in mind that future releases of this module might include more configuration options.

Argument Checking Configuration

All API functions in μC/MQTT-client include code to validate arguments that are passed to it. Specifically, μC/MQTT-client checks to see if passed pointers are NULL, if arguments are within valid ranges, etc. The following constant configures additional argument checking.

Table - MQTTc Argument Checking Configuration
ConstantDescriptionPossible Values
MQTTc_CFG_ARG_CHK_EXT_ENIncludes generated code to check arguments for functions that can be called by the user as well as internal functions which receive arguments from an API that the user can call.DEF_ENABLED or DEF_DISABLED


Debug Configuration 

Table - MQTTc Debug Configurations
ConstantDescriptionPossible Values
MQTTc_CFG_DBG_TRACE_LEVEL Trace level to use throughout the MQTTc stack.

 TRACE_LEVEL_OFF (no trace)

TRACE_LEVEL_INFO (some traces)

TRACE_LEVEL_DBG (many traces)

MQTTc_CFG_DBG_TRACEFunction used to output the MQTTc trace.printf
MQTTc_CFG_DBG_GLOBAL_BUF_ENEnable/disable the debugging buffer feature, that copies some MQTT messages at interesting points for further analysis.DEF_ENABLED or DEF_DISABLED
MQTTc_CFG_DBG_GLOBAL_BUF_LENLength, in bytes, of the debug buffer.Any numeric value. 512u, by default.