MQTT configuration structure.
Configuration struct for a MQTT instance. This structure should be initialized by the mqtt_get_config_defaults function before being modified by the user application.
#include <mqtt.h>
Data Fields | |
uint16_t | keep_alive |
Time value for the keep alive time out. More... | |
uint16_t | port |
TCP port of MQTT. More... | |
unsigned char * | read_buffer |
Rx buffer. More... | |
uint32_t | read_buffer_size |
Maximum size of the receive buffer. More... | |
unsigned char * | send_buffer |
Rx buffer. More... | |
uint32_t | send_buffer_size |
Send buffer size in the MQTT service. More... | |
uint8_t | tls |
A flag for the whether using the TLS socket or not. More... | |
uint16_t mqtt_config::keep_alive |
Time value for the keep alive time out.
Unit is seconds. Default value is 600. (10minutes)
Referenced by mqtt_get_config_defaults(), and mqtt_init().
uint16_t mqtt_config::port |
TCP port of MQTT.
Default value is 1883.
Referenced by mqtt_connect(), and mqtt_get_config_defaults().
unsigned char* mqtt_config::read_buffer |
Rx buffer.
Default value is NULL.
Referenced by configure_mqtt(), mqtt_get_config_defaults(), and mqtt_init().
uint32_t mqtt_config::read_buffer_size |
Maximum size of the receive buffer.
If receiving data over this value, Connection is to be disconnected. Default value is 0.
Referenced by configure_mqtt(), mqtt_get_config_defaults(), and mqtt_init().
unsigned char* mqtt_config::send_buffer |
Rx buffer.
Default value is NULL.
Referenced by configure_mqtt(), mqtt_get_config_defaults(), and mqtt_init().
uint32_t mqtt_config::send_buffer_size |
Send buffer size in the MQTT service.
This buffer is located in the stack. Therefore, the size of the buffer increases the speed will increase, but it may cause a stack overflow. It MUST bigger than 5. Default value is 32.
Referenced by configure_mqtt(), mqtt_get_config_defaults(), and mqtt_init().
uint8_t mqtt_config::tls |
A flag for the whether using the TLS socket or not.
Default value is 0.
Referenced by mqtt_connect(), and mqtt_get_config_defaults().