SELKIELogger  1.0.0
MQTTTest.c File Reference

Test MQTT broker connection and subscriptions. More...

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <time.h>
#include <unistd.h>
#include <version.h>
#include "SELKIELoggerBase.h"
#include "SELKIELoggerMQTT.h"
Include dependency graph for MQTTTest.c:

Go to the source code of this file.

Functions

void signalShutdown (int signnum)
 Set safe shutdown flag. More...
 
int main (int argc, char *argv[])
 

Variables

bool shutdown = false
 Set true to start clean shutdown.
 

Detailed Description

Test MQTT broker connection and subscriptions.

Definition in file MQTTTest.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Connects to MQTT broker, subscribing to topics given on the command line.

Topics will be printed to stdout when received, optionally dumping messages not matching subscription topics (i.e. messages matching wildcards)

Parameters
[in]argcArgument count
[in]argvArguments
Returns
-1 on error, otherwise 0

Definition at line 56 of file MQTTTest.c.