![](/media/cache/group/u-blox_logo_trans.png.50x50_q85.png)
Version of HelloMQTT with u-blox cellular (C027 and C030) boards added.
Dependencies: C12832 MQTT easy-connect ublox-at-cellular-interface-ext ublox-cellular-base ublox-cellular-driver-gen ublox-ppp-cellular-interface ublox-at-cellular-interface-n2xx ublox-cellular-base-n2xx
Fork of HelloMQTT by
Diff: main.cpp
- Revision:
- 9:5beb8609e9f7
- Parent:
- 8:a3e3113054a1
- Child:
- 12:086a9314e8a5
--- a/main.cpp Tue May 20 15:08:05 2014 +0000 +++ b/main.cpp Thu May 22 23:58:34 2014 +0000 @@ -34,21 +34,22 @@ int arrivedcount = 0; -void messageArrived(MQTT::Message* message) +void messageArrived(MQTT::MessageData& md) { + MQTT::Message &message = md.message; lcd.cls(); lcd.locate(0,3); - printf("Message arrived: qos %d, retained %d, dup %d, packetid %d\n", message->qos, message->retained, message->dup, message->id); - printf("Payload %.*s\n", message->payloadlen, (char*)message->payload); + printf("Message arrived: qos %d, retained %d, dup %d, packetid %d\n", message.qos, message.retained, message.dup, message.id); + printf("Payload %.*s\n", message.payloadlen, (char*)message.payload); ++arrivedcount; - lcd.puts((char*)message->payload); + lcd.puts((char*)message.payload); } int main(int argc, char* argv[]) { MQTTEthernet ipstack = MQTTEthernet(); - float version = 0.46; + float version = 0.47; char* topic = "mbed-sample"; lcd.printf("Version is %f\n", version);