Soletta™ Framework
|
MQTT Publish client. More...
Functions | |
int | main (int argc, char *argv[]) |
static void | on_connect (void *data, struct sol_mqtt *mqtt) |
static void | on_disconnect (void *data, struct sol_mqtt *mqtt) |
static bool | publish_callback (void *data) |
static bool | try_reconnect (void *data) |
Variables | |
static struct sol_mqtt_message | message |
static struct sol_timeout * | timeout |
static char * | topic |
MQTT Publish client.
Sample client that connects a broker at host:port and publishes the provided message once every 1 second.
int main | ( | int | argc, |
char * | argv[] | ||
) |
References sol_mqtt_message::api_version, sol_mqtt_config::api_version, sol_mqtt_config::host, message, on_connect(), on_disconnect(), sol_mqtt_message::payload, sol_mqtt_config::port, SOL_BUFFER_INIT_CONST, SOL_INF, sol_init(), SOL_MQTT_CONFIG_API_VERSION, sol_mqtt_connect(), sol_mqtt_disconnect(), SOL_MQTT_HANDLERS_API_VERSION, SOL_MQTT_MESSAGE_API_VERSION, SOL_MQTT_QOS_EXACTLY_ONCE, sol_run(), SOL_SET_API_VERSION, sol_shutdown(), sol_timeout_del(), SOL_WRN, timeout, topic, and sol_mqtt_message::topic.
|
static |
References publish_callback(), SOL_MQTT_CONNECTED, sol_mqtt_get_connection_status(), sol_timeout_add(), SOL_WRN, timeout, and try_reconnect().
Referenced by main().
|
static |
References SOL_INF, sol_timeout_add(), and try_reconnect().
Referenced by main().
|
static |
References message, SOL_INF, sol_mqtt_publish(), SOL_NULL_CHECK, and SOL_WRN.
Referenced by on_connect().
|
static |
References sol_mqtt_reconnect().
Referenced by on_connect(), and on_disconnect().
|
static |
Referenced by main(), and publish_callback().
|
static |
Referenced by main(), and on_connect().
|
static |
Referenced by main().