Low level MQTTSN packet library, part of the Eclipse Paho project: http://eclipse.org/paho

Dependents:   MQTTSN sara-n200-hello-mqtt-sn MQTTSN_2

The master source for this project is held at: https://github.com/eclipse/paho.mqtt-sn.embedded-c

Committer:
icraggs
Date:
Wed Jan 06 14:19:27 2016 +0000
Revision:
1:7fa362fa563f
Parent:
0:c524a894b5e8
Internal function name changes to avoid name clashes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
icraggs 0:c524a894b5e8 1 /*******************************************************************************
icraggs 0:c524a894b5e8 2 * Copyright (c) 2014 IBM Corp.
icraggs 0:c524a894b5e8 3 *
icraggs 0:c524a894b5e8 4 * All rights reserved. This program and the accompanying materials
icraggs 0:c524a894b5e8 5 * are made available under the terms of the Eclipse Public License v1.0
icraggs 0:c524a894b5e8 6 * and Eclipse Distribution License v1.0 which accompany this distribution.
icraggs 0:c524a894b5e8 7 *
icraggs 0:c524a894b5e8 8 * The Eclipse Public License is available at
icraggs 0:c524a894b5e8 9 * http://www.eclipse.org/legal/epl-v10.html
icraggs 0:c524a894b5e8 10 * and the Eclipse Distribution License is available at
icraggs 0:c524a894b5e8 11 * http://www.eclipse.org/org/documents/edl-v10.php.
icraggs 0:c524a894b5e8 12 *
icraggs 0:c524a894b5e8 13 * Contributors:
icraggs 0:c524a894b5e8 14 * Ian Craggs - initial API and implementation and/or initial documentation
icraggs 0:c524a894b5e8 15 *******************************************************************************/
icraggs 0:c524a894b5e8 16
icraggs 0:c524a894b5e8 17 #if !defined(MQTTSNPUBLISH_H_)
icraggs 0:c524a894b5e8 18 #define MQTTSNPUBLISH_H_
icraggs 0:c524a894b5e8 19
icraggs 0:c524a894b5e8 20 int MQTTSNSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid,
icraggs 0:c524a894b5e8 21 MQTTSN_topicid topic, unsigned char* payload, int payloadlen);
icraggs 0:c524a894b5e8 22 int MQTTSNDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid,
icraggs 0:c524a894b5e8 23 MQTTSN_topicid* topic, unsigned char** payload, int* payloadlen, unsigned char* buf, int len);
icraggs 0:c524a894b5e8 24
icraggs 0:c524a894b5e8 25 int MQTTSNSerialize_puback(unsigned char* buf, int buflen, unsigned short topicid, unsigned short packetid,
icraggs 0:c524a894b5e8 26 unsigned char returncode);
icraggs 0:c524a894b5e8 27 int MQTTSNDeserialize_puback(unsigned short* topicid, unsigned short* packetid,
icraggs 0:c524a894b5e8 28 unsigned char* returncode, unsigned char* buf, int buflen);
icraggs 0:c524a894b5e8 29
icraggs 0:c524a894b5e8 30 int MQTTSNSerialize_pubrec(unsigned char* buf, int buflen, unsigned short packetid);
icraggs 0:c524a894b5e8 31 int MQTTSNSerialize_pubrel(unsigned char* buf, int buflen, unsigned short packetid);
icraggs 0:c524a894b5e8 32 int MQTTSNSerialize_pubcomp(unsigned char* buf, int buflen, unsigned short packetid);
icraggs 0:c524a894b5e8 33
icraggs 0:c524a894b5e8 34 int MQTTSNDeserialize_ack(unsigned char* packettype, unsigned short* packetid, unsigned char* buf, int buflen);
icraggs 0:c524a894b5e8 35
icraggs 0:c524a894b5e8 36 int MQTTSNSerialize_register(unsigned char* buf, int buflen, unsigned short topicid, unsigned short packetid,
icraggs 0:c524a894b5e8 37 MQTTSNString* topicname);
icraggs 0:c524a894b5e8 38 int MQTTSNDeserialize_register(unsigned short* topicid, unsigned short* packetid, MQTTSNString* topicname,
icraggs 0:c524a894b5e8 39 unsigned char* buf, int buflen);
icraggs 0:c524a894b5e8 40
icraggs 0:c524a894b5e8 41 int MQTTSNSerialize_regack(unsigned char* buf, int buflen, unsigned short topicid, unsigned short packetid,
icraggs 0:c524a894b5e8 42 unsigned char return_code);
icraggs 0:c524a894b5e8 43 int MQTTSNDeserialize_regack(unsigned short* topicid, unsigned short* packetid, unsigned char* return_code,
icraggs 0:c524a894b5e8 44 unsigned char* buf, int buflen);
icraggs 0:c524a894b5e8 45
icraggs 0:c524a894b5e8 46 #endif /* MQTTSNPUBLISH_H_ */
icraggs 0:c524a894b5e8 47