#include "MQTTAsync.h"#include <string.h>#include <stdlib.h>#include <sys/time.h>#include <sys/socket.h>#include <unistd.h>#include <errno.h>#include <stdarg.h>#include <time.h>#include <sys/timeb.h>
Go to the source code of this file.
Classes | |
| struct | client_data |
| struct | Options |
Macros | |
| #define | ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) |
| #define | assert(a, b, c, d) myassert(__FILE__, __LINE__, a, b, c, d) |
| #define | assert1(a, b, c, d, e) myassert(__FILE__, __LINE__, a, b, c, d, e) |
| #define | LOGA_DEBUG 0 |
| #define | LOGA_INFO 1 |
| #define | mqsleep sleep |
| #define | START_TIME_TYPE struct timeval |
| #define | TEST3_CLIENTS 10 |
Functions | |
| long | elapsed (START_TIME_TYPE start_time) |
| void | getopts (int argc, char **argv) |
| int | main (int argc, char **argv) |
| void | myassert (char *filename, int lineno, char *description, int value, char *format,...) |
| void | MyLog (int LOGA_level, char *format,...) |
| START_TIME_TYPE | start_clock (void) |
| int | test1 (struct Options options) |
| int | test1_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
| void | test1_onConnect (void *context, MQTTAsync_successData *response) |
| void | test1_onConnectFailure (void *context, MQTTAsync_failureData *response) |
| void | test1_onDisconnect (void *context, MQTTAsync_successData *response) |
| void | test1_onSubscribe (void *context, MQTTAsync_successData *response) |
| void | test1_onUnsubscribe (void *context, MQTTAsync_successData *response) |
| int | test2 (struct Options options) |
| void | test2_onConnect (void *context, MQTTAsync_successData *response) |
| void | test2_onFailure (void *context, MQTTAsync_failureData *response) |
| int | test3 (struct Options options) |
| int | test3_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
| void | test3_onConnect (void *context, MQTTAsync_successData *response) |
| void | test3_onDisconnect (void *context, MQTTAsync_successData *response) |
| void | test3_onFailure (void *context, MQTTAsync_failureData *response) |
| void | test3_onPublish (void *context, MQTTAsync_successData *response) |
| void | test3_onSubscribe (void *context, MQTTAsync_successData *response) |
| void | test3_onUnsubscribe (void *context, MQTTAsync_successData *response) |
| int | test4 (struct Options options) |
| int | test4_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
| void | test4_onConnect (void *context, MQTTAsync_successData *response) |
| void | test4_onPublish (void *context, MQTTAsync_successData *response) |
| void | test4_onSubscribe (void *context, MQTTAsync_successData *response) |
| void | test5_onConnect (void *context, MQTTAsync_successData *response) |
| void | test5_onConnectFailure (void *context, MQTTAsync_failureData *response) |
| int | test5a (struct Options options) |
| int | test5b (struct Options options) |
| int | test5c (struct Options options) |
| void | trace_callback (enum MQTTASYNC_TRACE_LEVELS level, char *message) |
| void | usage (void) |
Variables | |
| int | failures = 0 |
| START_TIME_TYPE | global_start_time |
| struct Options | options |
| int | test2_onFailure_called = 0 |
| void * | test4_payload = NULL |
| int | test4_payloadlen = 0 |
| int | test5_onConnect_called = 0 |
| int | test5_onFailure_called = 0 |
| volatile int | test_finished = 0 |
| char * | test_topic = "async test topic" |
| int | tests = 0 |
Tests for the Paho MQTT Async C client
Definition in file test8.c.
| #define TEST3_CLIENTS 10 |
| long elapsed | ( | START_TIME_TYPE | start_time | ) |
| void myassert | ( | char * | filename, |
| int | lineno, | ||
| char * | description, | ||
| int | value, | ||
| char * | format, | ||
| ... | |||
| ) |
| START_TIME_TYPE start_clock | ( | void | ) |
| int test1_messageArrived | ( | void * | context, |
| char * | topicName, | ||
| int | topicLen, | ||
| MQTTAsync_message * | message | ||
| ) |
| void test1_onConnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test1_onConnectFailure | ( | void * | context, |
| MQTTAsync_failureData * | response | ||
| ) |
| void test1_onDisconnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test1_onSubscribe | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test1_onUnsubscribe | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test2_onConnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test2_onFailure | ( | void * | context, |
| MQTTAsync_failureData * | response | ||
| ) |
| int test3_messageArrived | ( | void * | context, |
| char * | topicName, | ||
| int | topicLen, | ||
| MQTTAsync_message * | message | ||
| ) |
| void test3_onConnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test3_onDisconnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test3_onFailure | ( | void * | context, |
| MQTTAsync_failureData * | response | ||
| ) |
| void test3_onPublish | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test3_onSubscribe | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test3_onUnsubscribe | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| int test4_messageArrived | ( | void * | context, |
| char * | topicName, | ||
| int | topicLen, | ||
| MQTTAsync_message * | message | ||
| ) |
| void test4_onConnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test4_onPublish | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test4_onSubscribe | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test5_onConnect | ( | void * | context, |
| MQTTAsync_successData * | response | ||
| ) |
| void test5_onConnectFailure | ( | void * | context, |
| MQTTAsync_failureData * | response | ||
| ) |
| void trace_callback | ( | enum MQTTASYNC_TRACE_LEVELS | level, |
| char * | message | ||
| ) |
| START_TIME_TYPE global_start_time |
| struct Options options |