An API for using MQTT over multiple transports for mbed OS 5
Fork of MQTT by
MQTTClient.cpp@13:fd82db992024, 2014-04-11 (annotated)
- Committer:
- Ian Craggs
- Date:
- Fri Apr 11 22:46:37 2014 +0100
- Revision:
- 13:fd82db992024
- Parent:
- 12:cc7f2d62a393
- Parent:
- 11:db15da110a37
Merged changes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
icraggs | 6:4d312a49200b | 1 | /******************************************************************************* |
icraggs | 6:4d312a49200b | 2 | * Copyright (c) 2014 IBM Corp. |
sam_grove | 0:fe461e4d7afe | 3 | * |
icraggs | 6:4d312a49200b | 4 | * All rights reserved. This program and the accompanying materials |
icraggs | 6:4d312a49200b | 5 | * are made available under the terms of the Eclipse Public License v1.0 |
icraggs | 6:4d312a49200b | 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. |
sam_grove | 0:fe461e4d7afe | 7 | * |
icraggs | 6:4d312a49200b | 8 | * The Eclipse Public License is available at |
icraggs | 6:4d312a49200b | 9 | * http://www.eclipse.org/legal/epl-v10.html |
icraggs | 6:4d312a49200b | 10 | * and the Eclipse Distribution License is available at |
icraggs | 6:4d312a49200b | 11 | * http://www.eclipse.org/org/documents/edl-v10.php. |
sam_grove | 0:fe461e4d7afe | 12 | * |
icraggs | 6:4d312a49200b | 13 | * Contributors: |
icraggs | 6:4d312a49200b | 14 | * Ian Craggs - initial API and implementation and/or initial documentation |
icraggs | 6:4d312a49200b | 15 | *******************************************************************************/ |
sam_grove | 0:fe461e4d7afe | 16 | |
icraggs | 2:dcfdd2abfe71 | 17 | #include "MQTTClient.h" |
icraggs | 2:dcfdd2abfe71 | 18 | #include "MQTTPacket.h" |
icraggs | 2:dcfdd2abfe71 | 19 | |
icraggs | 9:01b8cc7d94cc | 20 | MQTT::PacketId::PacketId() |
icraggs | 9:01b8cc7d94cc | 21 | { |
icraggs | 9:01b8cc7d94cc | 22 | next = 0; |
icraggs | 9:01b8cc7d94cc | 23 | } |
icraggs | 9:01b8cc7d94cc | 24 | |
icraggs | 9:01b8cc7d94cc | 25 | int MQTT::PacketId::getNext() |
icraggs | 9:01b8cc7d94cc | 26 | { |
icraggs | 9:01b8cc7d94cc | 27 | return next = (next == MAX_PACKET_ID) ? 1 : ++next; |
Ian Craggs |
12:cc7f2d62a393 | 28 | } |
Ian Craggs |
12:cc7f2d62a393 | 29 |