Classes | Macros | Functions | Variables
test15.c File Reference
#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>
Include dependency graph for test15.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)
 
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,...)
 
START_TIME_TYPE start_clock (void)
 
int test1 (struct Options options)
 
void test1_sendAndReceive (MQTTClient *c, int qos, char *test_topic)
 
int test2 (struct Options options)
 
void test2_deliveryComplete (void *context, MQTTClient_deliveryToken dt)
 
int test2_messageArrived (void *context, char *topicName, int topicLen, MQTTClient_message *message)
 
void test2_sendAndReceive (MQTTClient *c, int qos, char *test_topic)
 
int test3 (struct Options options)
 
int test4 (struct Options options)
 
int test4_run (int qos, int start_mqtt_version, int restore_mqtt_version)
 
int test5 (struct Options options)
 
int test6 (struct Options options)
 
void test6_connectionLost (void *context, char *cause)
 
void test6_deliveryComplete (void *context, MQTTClient_deliveryToken token)
 
int test6_messageArrived (void *context, char *topicName, int topicLen, MQTTClient_message *m)
 
int test6a (struct Options options)
 
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]
 
volatile int test2_arrivedcount = 0
 
int test2_deliveryCompleted = 0
 
MQTTClient_message test2_pubmsg = MQTTClient_message_initializer
 
MQTTClient test6_c1
 
MQTTClient test6_c2
 
volatile int test6_connection_lost_called = 0
 
char * test6_will_message = "will message from Client-1"
 
volatile int test6_will_message_arrived = 0
 
char * test6_will_topic = "C Test 2: will topic"
 
int tests = 0
 
FILE * xml
 

Detailed Description

Tests for the MQTT C client

Definition in file test15.c.

Macro Definition Documentation

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

Definition at line 41 of file test15.c.

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

Definition at line 246 of file test15.c.

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

Definition at line 247 of file test15.c.

#define LOGA_DEBUG   0

Definition at line 146 of file test15.c.

#define LOGA_INFO   1

Definition at line 147 of file test15.c.

#define mqsleep   sleep

Definition at line 207 of file test15.c.

#define START_TIME_TYPE   struct timeval

Definition at line 208 of file test15.c.

Function Documentation

long elapsed ( START_TIME_TYPE  start_time)

Definition at line 235 of file test15.c.

void getopts ( int  argc,
char **  argv 
)

Definition at line 71 of file test15.c.

void logProperties ( MQTTProperties props)

Definition at line 371 of file test15.c.

int main ( int  argc,
char **  argv 
)

Definition at line 1409 of file test15.c.

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

Definition at line 271 of file test15.c.

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

Definition at line 151 of file test15.c.

START_TIME_TYPE start_clock ( void  )

Definition at line 210 of file test15.c.

int test1 ( struct Options  options)

Definition at line 409 of file test15.c.

void test1_sendAndReceive ( MQTTClient c,
int  qos,
char *  test_topic 
)

Definition at line 298 of file test15.c.

int test2 ( struct Options  options)

Definition at line 651 of file test15.c.

void test2_deliveryComplete ( void *  context,
MQTTClient_deliveryToken  dt 
)

Definition at line 550 of file test15.c.

int test2_messageArrived ( void *  context,
char *  topicName,
int  topicLen,
MQTTClient_message message 
)

Definition at line 555 of file test15.c.

void test2_sendAndReceive ( MQTTClient c,
int  qos,
char *  test_topic 
)

Definition at line 584 of file test15.c.

int test3 ( struct Options  options)

Definition at line 736 of file test15.c.

int test4 ( struct Options  options)

Definition at line 1041 of file test15.c.

int test4_run ( int  qos,
int  start_mqtt_version,
int  restore_mqtt_version 
)

Definition at line 814 of file test15.c.

int test5 ( struct Options  options)

Definition at line 1066 of file test15.c.

int test6 ( struct Options  options)

Definition at line 1180 of file test15.c.

void test6_connectionLost ( void *  context,
char *  cause 
)

Definition at line 1152 of file test15.c.

void test6_deliveryComplete ( void *  context,
MQTTClient_deliveryToken  token 
)

Definition at line 1159 of file test15.c.

int test6_messageArrived ( void *  context,
char *  topicName,
int  topicLen,
MQTTClient_message m 
)

Definition at line 1167 of file test15.c.

int test6a ( struct Options  options)

Definition at line 1294 of file test15.c.

void usage ( void  )

Definition at line 43 of file test15.c.

void write_test_result ( void  )

Definition at line 257 of file test15.c.

Variable Documentation

char* cur_output = output

Definition at line 254 of file test15.c.

int failures = 0

Definition at line 250 of file test15.c.

START_TIME_TYPE global_start_time

Definition at line 252 of file test15.c.

struct Options options
Initial value:
=
{
"tcp://localhost:1883",
NULL,
"tcp://localhost:1884",
0,
0,
0,
1,
}
#define MQTTVERSION_5
Definition: MQTTAsync.h:207
char output[3000]

Definition at line 253 of file test15.c.

volatile int test2_arrivedcount = 0

Definition at line 546 of file test15.c.

int test2_deliveryCompleted = 0

Definition at line 547 of file test15.c.

Definition at line 548 of file test15.c.

MQTTClient test6_c1

Definition at line 1148 of file test15.c.

MQTTClient test6_c2

Definition at line 1148 of file test15.c.

volatile int test6_connection_lost_called = 0

Definition at line 1150 of file test15.c.

char* test6_will_message = "will message from Client-1"

Definition at line 1165 of file test15.c.

volatile int test6_will_message_arrived = 0

Definition at line 1149 of file test15.c.

char* test6_will_topic = "C Test 2: will topic"

Definition at line 1164 of file test15.c.

int tests = 0

Definition at line 249 of file test15.c.

FILE* xml

Definition at line 251 of file test15.c.



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