#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.
|
#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 | msleep(A) usleep(A*1000) |
|
#define | SOCKET_ERROR -1 |
|
#define | START_TIME_TYPE struct timeval |
|
|
int | basic_test (void) |
|
void | cleanup (void) |
|
void | clearMessages (void) |
|
int | dollar_topics_test (void) |
|
void | getopts (int argc, char **argv) |
|
int | keepalive_test (void) |
|
int | main (int argc, char **argv) |
|
int | messageArrived (void *context, char *topicName, int topicLen, MQTTClient_message *m) |
|
void | myassert (char *filename, int lineno, char *description, int value, char *format,...) |
|
void | MyLog (int LOGA_level, char *format,...) |
|
int | offline_message_queueing_test (void) |
|
int | overlapping_subscriptions_test (void) |
|
int | redelivery_on_reconnect_test (void) |
|
int | retained_message_test (void) |
|
START_TIME_TYPE | start_clock (void) |
|
int | subscribe_failure_test (void) |
|
int | test6_socket_close (int socket) |
|
int | test6_socket_error (char *aString, int sock) |
|
void | usage (void) |
|
int | will_message_test (void) |
|
int | zero_length_clientid_test (void) |
|
|
int | failures = 0 |
|
int | messageCount = 0 |
|
messageStruct | messagesArrived [1000] |
|
char * | nosubscribe_topics [] = {"nosubscribe",} |
|
struct Options | options |
|
int | tests = 0 |
|
char * | topics [] = {"TopicA", "TopicA/B", "Topic/C", "TopicA/C", "/TopicA"} |
|
char * | wildtopics [] = {"TopicA/+", "+/C", "#", "/#", "/+", "+/+", "TopicA/#"} |
|
#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 msleep |
( |
|
A | ) |
usleep(A*1000) |
#define START_TIME_TYPE struct timeval |
void clearMessages |
( |
void |
| ) |
|
int dollar_topics_test |
( |
void |
| ) |
|
void getopts |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
int keepalive_test |
( |
void |
| ) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
int messageArrived |
( |
void * |
context, |
|
|
char * |
topicName, |
|
|
int |
topicLen, |
|
|
MQTTClient_message * |
m |
|
) |
| |
void myassert |
( |
char * |
filename, |
|
|
int |
lineno, |
|
|
char * |
description, |
|
|
int |
value, |
|
|
char * |
format, |
|
|
|
... |
|
) |
| |
void MyLog |
( |
int |
LOGA_level, |
|
|
char * |
format, |
|
|
|
... |
|
) |
| |
int offline_message_queueing_test |
( |
void |
| ) |
|
int overlapping_subscriptions_test |
( |
void |
| ) |
|
int redelivery_on_reconnect_test |
( |
void |
| ) |
|
int retained_message_test |
( |
void |
| ) |
|
int subscribe_failure_test |
( |
void |
| ) |
|
int test6_socket_close |
( |
int |
socket | ) |
|
int test6_socket_error |
( |
char * |
aString, |
|
|
int |
sock |
|
) |
| |
int will_message_test |
( |
void |
| ) |
|
int zero_length_clientid_test |
( |
void |
| ) |
|
char* nosubscribe_topics[] = {"nosubscribe",} |
Initial value:=
{
"tcp://localhost:1883",
"myclientid",
"myclientid2",
NULL,
NULL,
0,
1,
0,
0,
}
#define MQTTVERSION_3_1_1
char* topics[] = {"TopicA", "TopicA/B", "Topic/C", "TopicA/C", "/TopicA"} |
char* wildtopics[] = {"TopicA/+", "+/C", "#", "/#", "/+", "+/+", "TopicA/#"} |