Fork of MQTT library
MQTTFormat.h@48:326380990a95, 2016-09-27 (annotated)
- Committer:
- elmkom
- Date:
- Tue Sep 27 15:47:27 2016 +0000
- Revision:
- 48:326380990a95
- Parent:
- 47:21d6fba046df
Add proximity sensor; increase mqtt buffer size to 512
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JMF | 47:21d6fba046df | 1 | /******************************************************************************* |
JMF | 47:21d6fba046df | 2 | * Copyright (c) 2014 IBM Corp. |
JMF | 47:21d6fba046df | 3 | * |
JMF | 47:21d6fba046df | 4 | * All rights reserved. This program and the accompanying materials |
JMF | 47:21d6fba046df | 5 | * are made available under the terms of the Eclipse Public License v1.0 |
JMF | 47:21d6fba046df | 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. |
JMF | 47:21d6fba046df | 7 | * |
JMF | 47:21d6fba046df | 8 | * The Eclipse Public License is available at |
JMF | 47:21d6fba046df | 9 | * http://www.eclipse.org/legal/epl-v10.html |
JMF | 47:21d6fba046df | 10 | * and the Eclipse Distribution License is available at |
JMF | 47:21d6fba046df | 11 | * http://www.eclipse.org/org/documents/edl-v10.php. |
JMF | 47:21d6fba046df | 12 | * |
JMF | 47:21d6fba046df | 13 | * Contributors: |
JMF | 47:21d6fba046df | 14 | * Ian Craggs - initial API and implementation and/or initial documentation |
JMF | 47:21d6fba046df | 15 | *******************************************************************************/ |
JMF | 47:21d6fba046df | 16 | #if !defined(MQTTFORMAT_H) |
JMF | 47:21d6fba046df | 17 | #define MQTTFORMAT_H |
JMF | 47:21d6fba046df | 18 | #include "StackTrace.h" |
JMF | 47:21d6fba046df | 19 | #include "MQTTPacket.h" |
JMF | 47:21d6fba046df | 20 | |
JMF | 47:21d6fba046df | 21 | #if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */ |
JMF | 47:21d6fba046df | 22 | extern "C" { |
JMF | 47:21d6fba046df | 23 | #endif |
JMF | 47:21d6fba046df | 24 | |
JMF | 47:21d6fba046df | 25 | const char* MQTTPacket_getName(unsigned short packetid); |
JMF | 47:21d6fba046df | 26 | int MQTTStringFormat_connect(char* strbuf, int strbuflen, MQTTPacket_connectData* data); |
JMF | 47:21d6fba046df | 27 | int MQTTStringFormat_connack(char* strbuf, int strbuflen, unsigned char connack_rc, unsigned char sessionPresent); |
JMF | 47:21d6fba046df | 28 | int MQTTStringFormat_publish(char* strbuf, int strbuflen, unsigned char dup, int qos, unsigned char retained, |
JMF | 47:21d6fba046df | 29 | unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen); |
JMF | 47:21d6fba046df | 30 | int MQTTStringFormat_ack(char* strbuf, int strbuflen, unsigned char packettype, unsigned char dup, unsigned short packetid); |
JMF | 47:21d6fba046df | 31 | int MQTTStringFormat_subscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, int count, |
JMF | 47:21d6fba046df | 32 | MQTTString topicFilters[], int requestedQoSs[]); |
JMF | 47:21d6fba046df | 33 | int MQTTStringFormat_suback(char* strbuf, int strbuflen, unsigned short packetid, int count, int* grantedQoSs); |
JMF | 47:21d6fba046df | 34 | int MQTTStringFormat_unsubscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, |
JMF | 47:21d6fba046df | 35 | int count, MQTTString topicFilters[]); |
JMF | 47:21d6fba046df | 36 | char* MQTTFormat_toClientString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); |
JMF | 47:21d6fba046df | 37 | char* MQTTFormat_toServerString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); |
JMF | 47:21d6fba046df | 38 | |
JMF | 47:21d6fba046df | 39 | #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */ |
JMF | 47:21d6fba046df | 40 | } |
JMF | 47:21d6fba046df | 41 | #endif |
JMF | 47:21d6fba046df | 42 | #endif |