#include "MQTTAsync.h"
#include <string.h>
#include <stdlib.h>
#include "Thread.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 | 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 | MAXMSGS 30; |
#define | START_TIME_TYPE struct timeval |
Functions | |
void | assert3PendingTokens (MQTTAsync c) |
long | elapsed (START_TIME_TYPE start_time) |
void | getopts (int argc, char **argv) |
void | handleTrace (enum MQTTASYNC_TRACE_LEVELS level, char *message) |
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,...) |
void | MySleep (long milliseconds) |
START_TIME_TYPE | start_clock (void) |
int | test1 (struct Options options) |
int | test10 (struct Options options) |
int | test10_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test10cOnConnect (void *context, MQTTAsync_successData *response) |
void | test10dOnConnect (void *context, MQTTAsync_successData *response) |
void | test10donSubscribe (void *context, MQTTAsync_successData *response) |
void | test10OnFailure (void *context, MQTTAsync_failureData *response) |
int | test1_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test1cConnected (void *context, char *cause) |
void | test1cOnConnect (void *context, MQTTAsync_successData *response) |
void | test1cOnFailure (void *context, MQTTAsync_failureData *response) |
void | test1dOnConnect (void *context, MQTTAsync_successData *response) |
void | test1dOnFailure (void *context, MQTTAsync_failureData *response) |
void | test1donSubscribe (void *context, MQTTAsync_successData *response) |
int | test2 (struct Options options) |
int | test2_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test2cConnected (void *context, char *cause) |
void | test2cOnConnect (void *context, MQTTAsync_successData *response) |
void | test2cOnFailure (void *context, MQTTAsync_failureData *response) |
void | test2dOnConnect (void *context, MQTTAsync_successData *response) |
void | test2dOnFailure (void *context, MQTTAsync_failureData *response) |
void | test2donSubscribe (void *context, MQTTAsync_successData *response) |
int | test3 (struct Options options) |
int | test3_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test3cConnected (void *context, char *cause) |
void | test3cOnConnect (void *context, MQTTAsync_successData *response) |
void | test3cOnFailure (void *context, MQTTAsync_failureData *response) |
void | test3dOnConnect (void *context, MQTTAsync_successData *response) |
void | test3dOnFailure (void *context, MQTTAsync_failureData *response) |
void | test3donSubscribe (void *context, MQTTAsync_successData *response) |
int | test4 (struct Options options) |
int | test4_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test4cConnected (void *context, char *cause) |
void | test4cOnConnect (void *context, MQTTAsync_successData *response) |
void | test4cOnFailure (void *context, MQTTAsync_failureData *response) |
void | test4dOnConnect (void *context, MQTTAsync_successData *response) |
void | test4dOnFailure (void *context, MQTTAsync_failureData *response) |
void | test4donSubscribe (void *context, MQTTAsync_successData *response) |
int | test5 (struct Options options) |
int | test5_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test5cConnected (void *context, char *cause) |
void | test5cOnConnect (void *context, MQTTAsync_successData *response) |
void | test5cOnFailure (void *context, MQTTAsync_failureData *response) |
void | test5dOnConnect (void *context, MQTTAsync_successData *response) |
void | test5dOnFailure (void *context, MQTTAsync_failureData *response) |
void | test5donSubscribe (void *context, MQTTAsync_successData *response) |
int | test6 (struct Options options) |
int | test7 (struct Options options) |
int | test7_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test7cConnected (void *context, char *cause) |
void | test7cOnConnectFailure (void *context, MQTTAsync_failureData *response) |
void | test7cOnConnectSuccess (void *context, MQTTAsync_successData *response) |
void | test7dOnConnectFailure (void *context, MQTTAsync_failureData *response) |
void | test7dOnConnectSuccess (void *context, MQTTAsync_successData *response) |
void | test7donSubscribe (void *context, MQTTAsync_successData *response) |
int | test8 (struct Options options) |
int | test8_messageArrived (void *context, char *topicName, int topicLen, MQTTAsync_message *message) |
void | test8cOnConnect (void *context, MQTTAsync_successData *response) |
void | test8dOnConnect (void *context, MQTTAsync_successData *response) |
void | test8donSubscribe (void *context, MQTTAsync_successData *response) |
void | test8OnFailure (void *context, MQTTAsync_failureData *response) |
int | test9 (struct Options options) |
void | test9cOnConnect (void *context, MQTTAsync_successData *response) |
void | test9OnFailure (void *context, MQTTAsync_failureData *response) |
void | usage (void) |
void | waitForNoPendingTokens (MQTTAsync c) |
void | write_test_result (void) |
Offline buffering and automatic reconnect tests for the Paho Asynchronous MQTT C client
Definition in file test9.c.
long elapsed | ( | START_TIME_TYPE | start_time | ) |
void handleTrace | ( | enum MQTTASYNC_TRACE_LEVELS | level, |
char * | message | ||
) |
void myassert | ( | char * | filename, |
int | lineno, | ||
char * | description, | ||
int | value, | ||
char * | format, | ||
... | |||
) |
START_TIME_TYPE start_clock | ( | void | ) |
int test10_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test10cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test10dOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test10donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test10OnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
int test1_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test1cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test1cOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test1dOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test1dOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test1donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
int test2_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test2cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test2cOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test2dOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test2dOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test2donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
int test3_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test3cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test3cOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test3dOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test3dOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test3donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
int test4_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test4cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test4cOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test4dOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test4dOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test4donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
int test5_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test5cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test5cOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test5dOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test5dOnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test5donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
int test7_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test7cOnConnectFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test7cOnConnectSuccess | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test7dOnConnectFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test7dOnConnectSuccess | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test7donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
int test8_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
void test8cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test8dOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test8donSubscribe | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test8OnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
void test9cOnConnect | ( | void * | context, |
MQTTAsync_successData * | response | ||
) |
void test9OnFailure | ( | void * | context, |
MQTTAsync_failureData * | response | ||
) |
START_TIME_TYPE global_start_time |
struct Options options |