Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
sol_mqtt_config Struct Reference

Server Configuration. More...

#include <sol-mqtt.h>

Data Fields

uint16_t api_version
 Should always be set to SOL_MQTT_CONFIG_API_VERSION. More...
 
const struct sol_certca_cert
 CA Certificate for SSL connections. More...
 
bool clean_session
 If set, the broker will drop all messages and subscriptions when the client disconnects. More...
 
const struct sol_certclient_cert
 Client certificate for SSL connections. More...
 
const char * client_id
 NULL terminated string that should be used as client ID. More...
 
const void * data
 User data provided to the callbacks. More...
 
const struct sol_mqtt_handlers handlers
 Handlers to be used with this connection. More...
 
const char * host
 The host address of the MQTT broker. More...
 
time_t keep_alive
 Time interval between PING messages that should be sent by the broker to the client in miliseconds. More...
 
const char * password
 NULL terminated string with the password. More...
 
uint16_t port
 The host port to connect. More...
 
const struct sol_certprivate_key
 Private key for SSL connections. More...
 
const char * username
 NULL terminated string with the username. More...
 
const struct sol_mqtt_messagewill
 A message that the broker should send when the client disconnects. More...
 

Detailed Description

Server Configuration.

Examples:
/src/samples/iio+network/iio-gyroscope-console-and-mqtt-publish.c, /src/samples/mqtt/mqtt-publish.c, and /src/samples/mqtt/mqtt-subscribe.c.

Field Documentation

uint16_t sol_mqtt_config::api_version
const struct sol_cert* sol_mqtt_config::ca_cert

CA Certificate for SSL connections.

bool sol_mqtt_config::clean_session

If set, the broker will drop all messages and subscriptions when the client disconnects.

Must be set if no client id is provided.

const struct sol_cert* sol_mqtt_config::client_cert

Client certificate for SSL connections.

const char* sol_mqtt_config::client_id

NULL terminated string that should be used as client ID.

If not set, clean_session must be set to true.

const void* sol_mqtt_config::data

User data provided to the callbacks.

const struct sol_mqtt_handlers sol_mqtt_config::handlers

Handlers to be used with this connection.

const char* sol_mqtt_config::host
time_t sol_mqtt_config::keep_alive

Time interval between PING messages that should be sent by the broker to the client in miliseconds.

const char* sol_mqtt_config::password

NULL terminated string with the password.

uint16_t sol_mqtt_config::port
const struct sol_cert* sol_mqtt_config::private_key

Private key for SSL connections.

const char* sol_mqtt_config::username

NULL terminated string with the username.

const struct sol_mqtt_message* sol_mqtt_config::will

A message that the broker should send when the client disconnects.


The documentation for this struct was generated from the following file: