#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 | PAYLOAD_LEN 500 |
#define | START_TIME_TYPE struct timeval |
Functions | |
long | elapsed (START_TIME_TYPE start_time) |
void | getopts (int argc, char **argv) |
void | handleTrace (enum MQTTASYNC_TRACE_LEVELS level, char *message) |
void | logProperties (MQTTProperties *props) |
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 | 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_failureData5 *response) |
void | test7cOnConnectSuccess (void *context, MQTTAsync_successData5 *response) |
void | usage (void) |
void | write_test_result (void) |
Variables | |
char * | cur_output = output |
int | failures = 0 |
START_TIME_TYPE | global_start_time |
struct Options | options |
char | output [3000] |
int | test7_messages_received = 0 |
int | test7_will_message_received = 0 |
int | test7c_connected = 0 |
int | test7Finished = 0 |
int | test7OnFailureCalled = 0 |
char | test_topic [50] |
int | tests = 0 |
char | unique [50] |
char | willTopic [100] |
FILE * | xml |
Offline buffering and automatic reconnect tests for the Paho Asynchronous MQTT C client
Definition in file test_persistence.c.
#define ARRAY_SIZE | ( | a | ) | (sizeof(a) / sizeof(a[0])) |
Definition at line 44 of file test_persistence.c.
Definition at line 192 of file test_persistence.c.
Definition at line 193 of file test_persistence.c.
#define LOGA_DEBUG 0 |
Definition at line 100 of file test_persistence.c.
#define LOGA_INFO 1 |
Definition at line 101 of file test_persistence.c.
#define MAXMSGS 30; |
Definition at line 195 of file test_persistence.c.
#define PAYLOAD_LEN 500 |
#define START_TIME_TYPE struct timeval |
Definition at line 156 of file test_persistence.c.
long elapsed | ( | START_TIME_TYPE | start_time | ) |
Definition at line 182 of file test_persistence.c.
void getopts | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 66 of file test_persistence.c.
void handleTrace | ( | enum MQTTASYNC_TRACE_LEVELS | level, |
char * | message | ||
) |
Definition at line 531 of file test_persistence.c.
void logProperties | ( | MQTTProperties * | props | ) |
Definition at line 243 of file test_persistence.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 537 of file test_persistence.c.
void myassert | ( | char * | filename, |
int | lineno, | ||
char * | description, | ||
int | value, | ||
char * | format, | ||
... | |||
) |
Definition at line 218 of file test_persistence.c.
void MyLog | ( | int | LOGA_level, |
char * | format, | ||
... | |||
) |
Definition at line 105 of file test_persistence.c.
void MySleep | ( | long | milliseconds | ) |
Definition at line 131 of file test_persistence.c.
START_TIME_TYPE start_clock | ( | void | ) |
Definition at line 158 of file test_persistence.c.
int test7 | ( | struct Options | options | ) |
Definition at line 346 of file test_persistence.c.
int test7_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTAsync_message * | message | ||
) |
Definition at line 295 of file test_persistence.c.
void test7cConnected | ( | void * | context, |
char * | cause | ||
) |
Definition at line 313 of file test_persistence.c.
void test7cOnConnectFailure | ( | void * | context, |
MQTTAsync_failureData5 * | response | ||
) |
Definition at line 321 of file test_persistence.c.
void test7cOnConnectSuccess | ( | void * | context, |
MQTTAsync_successData5 * | response | ||
) |
Definition at line 329 of file test_persistence.c.
void usage | ( | void | ) |
Definition at line 46 of file test_persistence.c.
void write_test_result | ( | void | ) |
Definition at line 205 of file test_persistence.c.
char* cur_output = output |
Definition at line 202 of file test_persistence.c.
int failures = 0 |
Definition at line 198 of file test_persistence.c.
START_TIME_TYPE global_start_time |
Definition at line 200 of file test_persistence.c.
struct Options options |
char output[3000] |
Definition at line 201 of file test_persistence.c.
int test7_messages_received = 0 |
Definition at line 291 of file test_persistence.c.
int test7_will_message_received = 0 |
Definition at line 290 of file test_persistence.c.
int test7c_connected = 0 |
Definition at line 289 of file test_persistence.c.
int test7Finished = 0 |
Definition at line 292 of file test_persistence.c.
int test7OnFailureCalled = 0 |
Definition at line 293 of file test_persistence.c.
char test_topic[50] |
Definition at line 282 of file test_persistence.c.
int tests = 0 |
Definition at line 197 of file test_persistence.c.
char unique[50] |
Definition at line 42 of file test_persistence.c.
char willTopic[100] |
Definition at line 281 of file test_persistence.c.
FILE* xml |
Definition at line 199 of file test_persistence.c.