Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MQTT by
Diff: MQTTClient.cpp
- Revision:
- 9:01b8cc7d94cc
- Parent:
- 8:c46930bd6c82
- Child:
- 11:db15da110a37
- Child:
- 12:cc7f2d62a393
--- a/MQTTClient.cpp Wed Apr 09 13:48:20 2014 +0000
+++ b/MQTTClient.cpp Wed Apr 09 23:21:54 2014 +0000
@@ -23,3 +23,13 @@
((Client<Network, Timer, Thread>*) arg)->run(NULL);
}
+
+MQTT::PacketId::PacketId()
+{
+ next = 0;
+}
+
+int MQTT::PacketId::getNext()
+{
+ return next = (next == MAX_PACKET_ID) ? 1 : ++next;
+}
\ No newline at end of file
