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.
Constant | Description | Possible Values |
---|---|---|
MQTTc_CFG_ARG_CHK_EXT_EN | Includes 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
Constant | Description | Possible Values |
---|---|---|
MQTTc_CFG_DBG_TRACE_LEVEL | Trace level to use throughout the MQTTc stack. |
|
MQTTc_CFG_DBG_TRACE | Function used to output the MQTTc trace. | printf |
MQTTc_CFG_DBG_GLOBAL_BUF_EN | Enable/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_LEN | Length, in bytes, of the debug buffer. | Any numeric value. 512u, by default. |