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.
MQTTSNPublish.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 00017 #if !defined(MQTTSNPUBLISH_H_) 00018 #define MQTTSNPUBLISH_H_ 00019 00020 int MQTTSNSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid, 00021 MQTTSN_topicid topic, unsigned char* payload, int payloadlen); 00022 int MQTTSNDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, 00023 MQTTSN_topicid* topic, unsigned char** payload, int* payloadlen, unsigned char* buf, int len); 00024 00025 int MQTTSNSerialize_puback(unsigned char* buf, int buflen, unsigned short topicid, unsigned short packetid, 00026 unsigned char returncode); 00027 int MQTTSNDeserialize_puback(unsigned short* topicid, unsigned short* packetid, 00028 unsigned char* returncode, unsigned char* buf, int buflen); 00029 00030 int MQTTSNSerialize_pubrec(unsigned char* buf, int buflen, unsigned short packetid); 00031 int MQTTSNSerialize_pubcomp(unsigned char* buf, int buflen, unsigned short packetid); 00032 00033 int MQTTSNDeserialize_ack(unsigned char* packettype, unsigned short* packetid, unsigned char* buf, int buflen); 00034 00035 int MQTTSNSerialize_register(unsigned char* buf, int buflen, unsigned short topicid, unsigned short packetid, 00036 MQTTSNString* topicname); 00037 int MQTTSNDeserialize_register(unsigned short* topicid, unsigned short* packetid, MQTTSNString* topicname, 00038 unsigned char* buf, int buflen); 00039 00040 int MQTTSNSerialize_regack(unsigned char* buf, int buflen, unsigned short topicid, unsigned short packetid, 00041 unsigned char return_code); 00042 int MQTTSNDeserialize_regack(unsigned short* topicid, unsigned short* packetid, unsigned char* return_code, 00043 unsigned char* buf, int buflen); 00044 int MQTTSNSerialize_pubrel(unsigned char* buf, int buflen, unsigned short packetid); 00045 00046 #endif /* MQTTSNPUBLISH_H_ */
Generated on Thu Jul 14 2022 12:58:42 by
