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.
MQTTFormat.h
00001 /******************************************************************************* 00002 * Copyright (c) 2014 IBM Corp. 00003 * 00004 * All rights reserved. This program and the accompanying materials 00005 * are made available under the terms of the Eclipse Public License v1.0 00006 * and Eclipse Distribution License v1.0 which accompany this distribution. 00007 * 00008 * The Eclipse Public License is available at 00009 * http://www.eclipse.org/legal/epl-v10.html 00010 * and the Eclipse Distribution License is available at 00011 * http://www.eclipse.org/org/documents/edl-v10.php. 00012 * 00013 * Contributors: 00014 * Ian Craggs - initial API and implementation and/or initial documentation 00015 *******************************************************************************/ 00016 #if !defined(MQTTFORMAT_H) 00017 #define MQTTFORMAT_H 00018 #include "StackTrace.h" 00019 #include "MQTTPacket.h" 00020 00021 #if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */ 00022 extern "C" { 00023 #endif 00024 00025 const char* MQTTPacket_getName(unsigned short packetid); 00026 int MQTTStringFormat_connect(char* strbuf, int strbuflen, MQTTPacket_connectData* data); 00027 int MQTTStringFormat_connack(char* strbuf, int strbuflen, unsigned char connack_rc, unsigned char sessionPresent); 00028 int MQTTStringFormat_publish(char* strbuf, int strbuflen, unsigned char dup, int qos, unsigned char retained, 00029 unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen); 00030 int MQTTStringFormat_ack(char* strbuf, int strbuflen, unsigned char packettype, unsigned char dup, unsigned short packetid); 00031 int MQTTStringFormat_subscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, int count, 00032 MQTTString topicFilters[], int requestedQoSs[]); 00033 int MQTTStringFormat_suback(char* strbuf, int strbuflen, unsigned short packetid, int count, int* grantedQoSs); 00034 int MQTTStringFormat_unsubscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, 00035 int count, MQTTString topicFilters[]); 00036 char* MQTTFormat_toClientString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); 00037 char* MQTTFormat_toServerString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); 00038 00039 #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */ 00040 } 00041 #endif 00042 #endif
Generated on Wed Jul 13 2022 01:56:50 by
1.7.2