blob: 68da4b0f777a686acc521303c624019ceefeb0f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# mqtt
A simple MQTT library written in C.
# Building
Building the library requires CMake and a C compiler.
$ mkdir build
$ cd build
$ cmake ..
$ make
# Creating the single file library
Creating the single file library requires python (both 2 and 3 are ok).
Execute in the build directory you created above:
$ cmake -DMQTT_AMALGAMATE=ON .
$ make amalgamate
Now the amalgamation (`mqtt.c` and `mqtt.h`) is found in
`<project_root>/amalgamation` directory.
# Dumping sent/received data
Define `STREAM_HEXDUMP_READ` and `STREAM_HEXDUMP_WRITE` to make the library dump
read or written written data respectively to stdout. Nice for debugging.
# Logging
Define `LOG_LEVEL` to one of `DEBUG`, `INFO`, `WARNING` or `ERROR` to make the
library output logging information.
# Tools
There are publish/subscribe tools included in the `tools` directory and they are
built by default.
|