Library for MQTT

Committer:
pavleradojkovic
Date:
Mon Jun 20 16:24:43 2022 +0000
Revision:
0:ba7e439238ab
Inital commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pavleradojkovic 0:ba7e439238ab 1 # Eclipse Paho MQTT C/C++ client for Embedded platforms
pavleradojkovic 0:ba7e439238ab 2
pavleradojkovic 0:ba7e439238ab 3 This repository contains the source code for the [Eclipse Paho](http://eclipse.org/paho) MQTT C/C++ client library for Embedded platorms.
pavleradojkovic 0:ba7e439238ab 4
pavleradojkovic 0:ba7e439238ab 5 It is dual licensed under the EPL and EDL (see about.html and notice.html for more details). You can choose which of these licenses you want to use the code under. The EDL allows you to embed the code into your application, and distribute your application in binary or source form without contributing any of your code, or any changes you make back to Paho. See the EDL for the exact conditions.
pavleradojkovic 0:ba7e439238ab 6
pavleradojkovic 0:ba7e439238ab 7 There are three sub-projects:
pavleradojkovic 0:ba7e439238ab 8
pavleradojkovic 0:ba7e439238ab 9 1. MQTTPacket - simple de/serialization of MQTT packets, plus helper functions
pavleradojkovic 0:ba7e439238ab 10 2. MQTTClient - high(er) level C++ client, plus
pavleradojkovic 0:ba7e439238ab 11 3. MQTTClient-C - high(er) level C client (pretty much a clone of the C++ client)
pavleradojkovic 0:ba7e439238ab 12
pavleradojkovic 0:ba7e439238ab 13 The *MQTTPacket* directory contains the lowest level C library with the smallest requirements. This supplies simple serialization
pavleradojkovic 0:ba7e439238ab 14 and deserialization routines. They serve as a base for the higher level libraries, but can also be used on their own
pavleradojkovic 0:ba7e439238ab 15 It is mainly up to you to write and read to and from the network.
pavleradojkovic 0:ba7e439238ab 16
pavleradojkovic 0:ba7e439238ab 17 The *MQTTClient* directory contains the next level C++ library. This networking code is contained in separate classes so that you can plugin the
pavleradojkovic 0:ba7e439238ab 18 network of your choice. Currently there are implementations for Linux, Arduino and mbed. ARM mbed was the first platform for which this was written,
pavleradojkovic 0:ba7e439238ab 19 where the conventional language choice is C++, which explains the language choice. I have written a starter [Porting Guide](http://modelbasedtesting.co.uk/2014/08/25/porting-a-paho-embedded-c-client/).
pavleradojkovic 0:ba7e439238ab 20
pavleradojkovic 0:ba7e439238ab 21 The *MQTTClient-C* directory contains a C equivalent of MQTTClient, for those platforms where C++ is not supported or the convention. As far
pavleradojkovic 0:ba7e439238ab 22 as possible it is a direct translation from *MQTTClient*.
pavleradojkovic 0:ba7e439238ab 23
pavleradojkovic 0:ba7e439238ab 24 ## Build requirements / compilation
pavleradojkovic 0:ba7e439238ab 25
pavleradojkovic 0:ba7e439238ab 26 CMake builds for the various packages have been introduced, along with Travis-CI configuration for automated build & testing. The basic
pavleradojkovic 0:ba7e439238ab 27 method of building on Linux is:
pavleradojkovic 0:ba7e439238ab 28
pavleradojkovic 0:ba7e439238ab 29 ```
pavleradojkovic 0:ba7e439238ab 30 mkdir build.paho
pavleradojkovic 0:ba7e439238ab 31 cd build.paho
pavleradojkovic 0:ba7e439238ab 32 cmake ..
pavleradojkovic 0:ba7e439238ab 33 make
pavleradojkovic 0:ba7e439238ab 34 ```
pavleradojkovic 0:ba7e439238ab 35
pavleradojkovic 0:ba7e439238ab 36 The travis-build.sh file has the full build and test sequence for Linux.
pavleradojkovic 0:ba7e439238ab 37
pavleradojkovic 0:ba7e439238ab 38
pavleradojkovic 0:ba7e439238ab 39 ## Usage and API
pavleradojkovic 0:ba7e439238ab 40
pavleradojkovic 0:ba7e439238ab 41 See the samples directories for examples of intended use. Doxygen config files for each package are available in the doc directory.
pavleradojkovic 0:ba7e439238ab 42
pavleradojkovic 0:ba7e439238ab 43 ## Runtime tracing
pavleradojkovic 0:ba7e439238ab 44
pavleradojkovic 0:ba7e439238ab 45 The *MQTTClient* API has debug tracing for MQTT packets sent and received - turn this on by setting the MQTT_DEBUG preprocessor definition.
pavleradojkovic 0:ba7e439238ab 46
pavleradojkovic 0:ba7e439238ab 47
pavleradojkovic 0:ba7e439238ab 48 ## Reporting bugs
pavleradojkovic 0:ba7e439238ab 49
pavleradojkovic 0:ba7e439238ab 50 This project uses GitHub Issues here: [github.com/eclipse/paho.mqtt.embedded-c/issues](https://github.com/eclipse/paho.mqtt.embedded-c/issues) to track ongoing development and issues.
pavleradojkovic 0:ba7e439238ab 51
pavleradojkovic 0:ba7e439238ab 52 ## More information
pavleradojkovic 0:ba7e439238ab 53
pavleradojkovic 0:ba7e439238ab 54 Discussion of the Paho clients takes place on the [Eclipse Mattermost Paho channel](https://mattermost.eclipse.org/eclipse/channels/paho) and the [Eclipse paho-dev mailing list](https://dev.eclipse.org/mailman/listinfo/paho-dev).
pavleradojkovic 0:ba7e439238ab 55
pavleradojkovic 0:ba7e439238ab 56 General questions about the MQTT protocol are discussed in the [MQTT Google Group](https://groups.google.com/forum/?hl=en-US&fromgroups#!forum/mqtt).
pavleradojkovic 0:ba7e439238ab 57
pavleradojkovic 0:ba7e439238ab 58 More information is available via the [MQTT community](http://mqtt.org).