Classes | Macros | Functions | Variables
test_mqtt4async.c File Reference
#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>
Include dependency graph for test_mqtt4async.c:

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,...)
 
START_TIME_TYPE start_clock (void)
 
int test1 (struct Options options)
 
void test1_onConnect1 (void *context, MQTTAsync_successData *response)
 
void test1_onConnect2 (void *context, MQTTAsync_successData *response)
 
void test1_onConnect3 (void *context, MQTTAsync_successData *response)
 
void test1_onDisconnect1 (void *context, MQTTAsync_successData *response)
 
void test1_onDisconnect2 (void *context, MQTTAsync_successData *response)
 
void test1_onDisconnect3 (void *context, MQTTAsync_successData *response)
 
int test2 (struct Options options)
 
void test2_onConnect1 (void *context, MQTTAsync_successData *response)
 
void test2_onDisconnect (void *context, MQTTAsync_successData *response)
 
void test2_onSubscribe1 (void *context, MQTTAsync_successData *response)
 
void test2_onSubscribe2 (void *context, MQTTAsync_failureData *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 test_finished = 0
 
int tests = 0
 
FILE * xml
 

Detailed Description

MQTT 3.1.1 Tests for the asynchronous Paho MQTT C client

Definition in file test_mqtt4async.c.

Macro Definition Documentation

#define ARRAY_SIZE (   a)    (sizeof(a) / sizeof(a[0]))

Definition at line 53 of file test_mqtt4async.c.

#define assert (   a,
  b,
  c,
  d 
)    myassert(__FILE__, __LINE__, a, b, c, d)

Definition at line 225 of file test_mqtt4async.c.

#define assert1 (   a,
  b,
  c,
  d,
 
)    myassert(__FILE__, __LINE__, a, b, c, d, e)

Definition at line 226 of file test_mqtt4async.c.

#define LOGA_DEBUG   0

Definition at line 137 of file test_mqtt4async.c.

#define LOGA_INFO   1

Definition at line 138 of file test_mqtt4async.c.

#define mqsleep   sleep

Definition at line 186 of file test_mqtt4async.c.

#define START_TIME_TYPE   struct timeval

Definition at line 187 of file test_mqtt4async.c.

Function Documentation

long elapsed ( START_TIME_TYPE  start_time)

Definition at line 214 of file test_mqtt4async.c.

void getopts ( int  argc,
char **  argv 
)

Definition at line 79 of file test_mqtt4async.c.

int main ( int  argc,
char **  argv 
)

Definition at line 595 of file test_mqtt4async.c.

void myassert ( char *  filename,
int  lineno,
char *  description,
int  value,
char *  format,
  ... 
)

Definition at line 251 of file test_mqtt4async.c.

void MyLog ( int  LOGA_level,
char *  format,
  ... 
)

Definition at line 142 of file test_mqtt4async.c.

START_TIME_TYPE start_clock ( void  )

Definition at line 189 of file test_mqtt4async.c.

int test1 ( struct Options  options)

Definition at line 403 of file test_mqtt4async.c.

void test1_onConnect1 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 376 of file test_mqtt4async.c.

void test1_onConnect2 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 329 of file test_mqtt4async.c.

void test1_onConnect3 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 282 of file test_mqtt4async.c.

void test1_onDisconnect1 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 351 of file test_mqtt4async.c.

void test1_onDisconnect2 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 304 of file test_mqtt4async.c.

void test1_onDisconnect3 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 273 of file test_mqtt4async.c.

int test2 ( struct Options  options)

Definition at line 537 of file test_mqtt4async.c.

void test2_onConnect1 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 498 of file test_mqtt4async.c.

void test2_onDisconnect ( void *  context,
MQTTAsync_successData response 
)

Definition at line 459 of file test_mqtt4async.c.

void test2_onSubscribe1 ( void *  context,
MQTTAsync_successData response 
)

Definition at line 485 of file test_mqtt4async.c.

void test2_onSubscribe2 ( void *  context,
MQTTAsync_failureData response 
)

Definition at line 468 of file test_mqtt4async.c.

void usage ( void  )

Definition at line 55 of file test_mqtt4async.c.

void write_test_result ( void  )

Definition at line 237 of file test_mqtt4async.c.

Variable Documentation

char* cur_output = output

Definition at line 233 of file test_mqtt4async.c.

int failures = 0

Definition at line 229 of file test_mqtt4async.c.

START_TIME_TYPE global_start_time

Definition at line 231 of file test_mqtt4async.c.

struct Options options
Initial value:
=
{
"m2m.eclipse.org:1883",
NULL,
0,
0,
0,
1,
}
char output[3000]

Definition at line 232 of file test_mqtt4async.c.

int test_finished = 0

Definition at line 234 of file test_mqtt4async.c.

int tests = 0

Definition at line 228 of file test_mqtt4async.c.

FILE* xml

Definition at line 230 of file test_mqtt4async.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49