#include "MQTTAsync.h"#include <string.h>#include <stdlib.h>#include <sys/time.h>#include <unistd.h>#include <signal.h>#include <stdarg.h>#include <time.h>#include <sys/timeb.h>
Go to the source code of this file.
Macros | |
| #define | LOGA_ALWAYS 1 |
| #define | LOGA_DEBUG 0 |
| #define | LOGA_INFO 2 |
| #define | START_TIME_TYPE struct timeval |
Functions | |
| void | client_onCleaned (void *context, MQTTAsync_successData *response) |
| void | client_onCleanedDisconnected (void *context, MQTTAsync_successData *response) |
| void | client_onConnect (void *context, MQTTAsync_successData *response) |
| void | client_onFailure (void *context, MQTTAsync_failureData *response) |
| void | client_onReconnect (void *context, MQTTAsync_successData *response) |
| void | client_onReconnectFailure (void *context, MQTTAsync_failureData *response) |
| void | client_onSubscribe (void *context, MQTTAsync_successData *response) |
| void | connectionLost (void *context, char *cause) |
| void | control_connectionLost (void *context, char *cause) |
| int | control_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *m) |
| void | control_onConnect (void *context, MQTTAsync_successData *response) |
| void | control_onFailure (void *context, MQTTAsync_failureData *response) |
| void | control_onSubscribe (void *context, MQTTAsync_successData *response) |
| int | control_send (char *message) |
| int | control_wait (char *message) |
| int | control_which (char *message1, char *message2) |
| long | elapsed (START_TIME_TYPE start_time) |
| void | getopts (int argc, char **argv) |
| int | main (int argc, char **argv) |
| int | messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *m) |
| void | messageSent (void *context, MQTTAsync_successData *response) |
| void | MyLog (int LOGA_level, char *format,...) |
| void | MySleep (long milliseconds) |
| void | one_iteration (void) |
| int | recreateReconnect (void) |
| int | sendAndReceive (void) |
| START_TIME_TYPE | start_clock (void) |
| int | success (int count) |
| void | trace_callback (enum MQTTASYNC_TRACE_LEVELS level, char *message) |
| void | usage (void) |
| int | waitForCompletion (START_TIME_TYPE start_time) |
Variables | |
| int | arrivedCount = 0 |
| MQTTAsync | client |
| int | client_cleaned = 0 |
| static int | client_subscribed = 0 |
| MQTTAsync_connectOptions | conn_opts = MQTTAsync_connectOptions_initializer |
| int | connection_lost = 0 |
| MQTTAsync | control_client |
| int | control_found = 0 |
| static int | control_subscribed = 0 |
| int | errors = 0 |
| int | expectedCount = 0 |
| START_TIME_TYPE | global_start_time |
| long | last_completion_time = -1 |
| int | measuring = 0 |
| int | messagesSent = 0 |
| struct { | |
| char * clientid | |
| char * connection | |
| int connection_count | |
| char ** connections | |
| char * control_connection | |
| char * control_topic | |
| char * password | |
| int persistence | |
| int qos | |
| int retained | |
| int slot_no | |
| char * topic | |
| char * username | |
| int verbose | |
| } | opts |
| static char | pub_topic [200] |
| int | recreated = 0 |
| long | roundtrip_time = 0L |
| int | stopping = 0 |
| static char | sub_topic [200] |
| int | test_count = 1000 |
| char * | wait_message = NULL |
| char * | wait_message2 = NULL |
Async C client program for the MQTT v3 restart/recovery test suite.
Definition in file test6.c.
| void client_onCleaned | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void client_onCleanedDisconnected | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void client_onConnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void client_onFailure | ( | void * | context, |
| MQTTAsync_failureData * | response | ||
| ) |
| void client_onReconnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void client_onReconnectFailure | ( | void * | context, |
| MQTTAsync_failureData * | response | ||
| ) |
| void client_onSubscribe | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void control_connectionLost | ( | void * | context, |
| char * | cause | ||
| ) |
| int control_messageArrived | ( | void * | context, |
| char * | topicName, | ||
| int | topicLen, | ||
| MQTTAsync_message * | m | ||
| ) |
| void control_onConnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void control_onFailure | ( | void * | context, |
| MQTTAsync_failureData * | response | ||
| ) |
| void control_onSubscribe | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| long elapsed | ( | START_TIME_TYPE | start_time | ) |
| int messageArrived | ( | void * | context, |
| char * | topicName, | ||
| int | topicLen, | ||
| MQTTAsync_message * | m | ||
| ) |
| void messageSent | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| START_TIME_TYPE start_clock | ( | void | ) |
| void trace_callback | ( | enum MQTTASYNC_TRACE_LEVELS | level, |
| char * | message | ||
| ) |
| int waitForCompletion | ( | START_TIME_TYPE | start_time | ) |
| char* control_connection |
| START_TIME_TYPE global_start_time |
| struct { ... } opts |