mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
improve mqtt documentation
This commit is contained in:
parent
fbcdb4d9f1
commit
8fd90ea136
@ -67,16 +67,20 @@ struct altcp_tls_config;
|
|||||||
struct mqtt_connect_client_info_t {
|
struct mqtt_connect_client_info_t {
|
||||||
/** Client identifier, must be set by caller */
|
/** Client identifier, must be set by caller */
|
||||||
const char *client_id;
|
const char *client_id;
|
||||||
/** User name and password, set to NULL if not used */
|
/** User name, set to NULL if not used */
|
||||||
const char* client_user;
|
const char* client_user;
|
||||||
|
/** Password, set to NULL if not used */
|
||||||
const char* client_pass;
|
const char* client_pass;
|
||||||
/** keep alive time in seconds, 0 to disable keep alive functionality*/
|
/** keep alive time in seconds, 0 to disable keep alive functionality*/
|
||||||
u16_t keep_alive;
|
u16_t keep_alive;
|
||||||
/** will topic, set to NULL if will is not to be used,
|
/** will topic, set to NULL if will is not to be used,
|
||||||
will_msg, will_qos and will retain are then ignored */
|
will_msg, will_qos and will retain are then ignored */
|
||||||
const char* will_topic;
|
const char* will_topic;
|
||||||
|
/** will_msg, see will_topic */
|
||||||
const char* will_msg;
|
const char* will_msg;
|
||||||
|
/** will_qos, see will_topic */
|
||||||
u8_t will_qos;
|
u8_t will_qos;
|
||||||
|
/** will_retain, see will_topic */
|
||||||
u8_t will_retain;
|
u8_t will_retain;
|
||||||
#if LWIP_ALTCP && LWIP_ALTCP_TLS
|
#if LWIP_ALTCP && LWIP_ALTCP_TLS
|
||||||
/** TLS configuration for secure connections */
|
/** TLS configuration for secure connections */
|
||||||
@ -89,13 +93,21 @@ struct mqtt_connect_client_info_t {
|
|||||||
* Connection status codes */
|
* Connection status codes */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
/** Accepted */
|
||||||
MQTT_CONNECT_ACCEPTED = 0,
|
MQTT_CONNECT_ACCEPTED = 0,
|
||||||
|
/** Refused protocol version */
|
||||||
MQTT_CONNECT_REFUSED_PROTOCOL_VERSION = 1,
|
MQTT_CONNECT_REFUSED_PROTOCOL_VERSION = 1,
|
||||||
|
/** Refused identifier */
|
||||||
MQTT_CONNECT_REFUSED_IDENTIFIER = 2,
|
MQTT_CONNECT_REFUSED_IDENTIFIER = 2,
|
||||||
|
/** Refused server */
|
||||||
MQTT_CONNECT_REFUSED_SERVER = 3,
|
MQTT_CONNECT_REFUSED_SERVER = 3,
|
||||||
|
/** Refused user credentials */
|
||||||
MQTT_CONNECT_REFUSED_USERNAME_PASS = 4,
|
MQTT_CONNECT_REFUSED_USERNAME_PASS = 4,
|
||||||
|
/** Refused not authorized */
|
||||||
MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ = 5,
|
MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ = 5,
|
||||||
|
/** Disconnected */
|
||||||
MQTT_CONNECT_DISCONNECTED = 256,
|
MQTT_CONNECT_DISCONNECTED = 256,
|
||||||
|
/** Timeout */
|
||||||
MQTT_CONNECT_TIMEOUT = 257
|
MQTT_CONNECT_TIMEOUT = 257
|
||||||
} mqtt_connection_status_t;
|
} mqtt_connection_status_t;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user