#include "MQTTClient.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 | 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 |
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,...) |
void | mysleep (int seconds) |
START_TIME_TYPE | start_clock (void) |
int | test1 (struct Options options) |
void | test1_connectionLost (void *context, char *cause) |
void | test1_deliveryComplete (void *context, MQTTClient_deliveryToken token) |
int | test1_messageArrived (void *context, char *topicName, int topicLen, MQTTClient_message *m) |
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] |
MQTTClient | test1_c1 |
int | tests = 0 |
FILE * | xml |
Tests for the MQ Telemetry MQTT C client
Definition in file test_sync_session_present.c.
#define ARRAY_SIZE | ( | a | ) | (sizeof(a) / sizeof(a[0])) |
Definition at line 38 of file test_sync_session_present.c.
Definition at line 288 of file test_sync_session_present.c.
Definition at line 289 of file test_sync_session_present.c.
#define LOGA_DEBUG 0 |
Definition at line 188 of file test_sync_session_present.c.
#define LOGA_INFO 1 |
Definition at line 189 of file test_sync_session_present.c.
#define mqsleep sleep |
Definition at line 249 of file test_sync_session_present.c.
#define START_TIME_TYPE struct timeval |
Definition at line 250 of file test_sync_session_present.c.
long elapsed | ( | START_TIME_TYPE | start_time | ) |
Definition at line 277 of file test_sync_session_present.c.
void getopts | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 78 of file test_sync_session_present.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 463 of file test_sync_session_present.c.
void myassert | ( | char * | filename, |
int | lineno, | ||
char * | description, | ||
int | value, | ||
char * | format, | ||
... | |||
) |
Definition at line 313 of file test_sync_session_present.c.
void MyLog | ( | int | LOGA_level, |
char * | format, | ||
... | |||
) |
Definition at line 193 of file test_sync_session_present.c.
void mysleep | ( | int | seconds | ) |
Definition at line 334 of file test_sync_session_present.c.
START_TIME_TYPE start_clock | ( | void | ) |
Definition at line 252 of file test_sync_session_present.c.
int test1 | ( | struct Options | options | ) |
Definition at line 369 of file test_sync_session_present.c.
void test1_connectionLost | ( | void * | context, |
char * | cause | ||
) |
Definition at line 350 of file test_sync_session_present.c.
void test1_deliveryComplete | ( | void * | context, |
MQTTClient_deliveryToken | token | ||
) |
Definition at line 355 of file test_sync_session_present.c.
int test1_messageArrived | ( | void * | context, |
char * | topicName, | ||
int | topicLen, | ||
MQTTClient_message * | m | ||
) |
Definition at line 360 of file test_sync_session_present.c.
void usage | ( | void | ) |
Definition at line 40 of file test_sync_session_present.c.
void write_test_result | ( | void | ) |
Definition at line 299 of file test_sync_session_present.c.
char* cur_output = output |
Definition at line 296 of file test_sync_session_present.c.
int failures = 0 |
Definition at line 292 of file test_sync_session_present.c.
START_TIME_TYPE global_start_time |
Definition at line 294 of file test_sync_session_present.c.
struct Options options |
char output[3000] |
Definition at line 295 of file test_sync_session_present.c.
MQTTClient test1_c1 |
Definition at line 348 of file test_sync_session_present.c.
int tests = 0 |
Definition at line 291 of file test_sync_session_present.c.
FILE* xml |
Definition at line 293 of file test_sync_session_present.c.