An API for using MQTT over multiple transports
Dependencies: FP MQTTPacket
Dependents: Cellular_HelloMQTT IoTStarterKit GSwifiInterface_HelloMQTT IBMIoTClientEthernetExample ... more
This library is part of the EclipseTM Paho project; specifically the embedded client.
The goals of this API are:
- to be independent of any system library: hence templates parameters for networking, timer and threading classes
- not to rely on heap storage, only automatic (I think this is a good thing)
- to limit memory use, for instance by defining the size of the buffers and arrays used at object creation time
MQTTEthernet.h@36:2f1ada427e56, 2014-08-01 (annotated)
- Committer:
- icraggs
- Date:
- Fri Aug 01 14:45:25 2014 +0000
- Revision:
- 36:2f1ada427e56
- Parent:
- 31:a51dd239b78e
- Child:
- 41:b7e86fa6dbb8
Update types to match MQTTPacket changes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
icraggs | 29:833386b16f3e | 1 | |
icraggs | 29:833386b16f3e | 2 | #if !defined(MQTTETHERNET_H) |
icraggs | 29:833386b16f3e | 3 | #define MQTTETHERNET_H |
icraggs | 29:833386b16f3e | 4 | |
icraggs | 29:833386b16f3e | 5 | #include "MQTT_mbed.h" |
icraggs | 29:833386b16f3e | 6 | #include "EthernetInterface.h" |
icraggs | 31:a51dd239b78e | 7 | #include "MQTTSocket.h" |
icraggs | 29:833386b16f3e | 8 | |
icraggs | 31:a51dd239b78e | 9 | class MQTTEthernet : public MQTTSocket |
icraggs | 29:833386b16f3e | 10 | { |
icraggs | 29:833386b16f3e | 11 | public: |
icraggs | 29:833386b16f3e | 12 | MQTTEthernet() |
icraggs | 29:833386b16f3e | 13 | { |
icraggs | 29:833386b16f3e | 14 | eth.init(); // Use DHCP |
icraggs | 29:833386b16f3e | 15 | eth.connect(); |
icraggs | 29:833386b16f3e | 16 | } |
icraggs | 29:833386b16f3e | 17 | |
icraggs | 29:833386b16f3e | 18 | private: |
icraggs | 29:833386b16f3e | 19 | |
icraggs | 29:833386b16f3e | 20 | EthernetInterface eth; |
icraggs | 29:833386b16f3e | 21 | |
icraggs | 29:833386b16f3e | 22 | }; |
icraggs | 29:833386b16f3e | 23 | |
icraggs | 29:833386b16f3e | 24 | |
icraggs | 29:833386b16f3e | 25 | #endif |