The Cayenne MQTT mbed Library provides functions to easily connect to the Cayenne IoT project builder.
Dependents: Cayenne-ESP8266Interface Cayenne-WIZnet_Library Cayenne-WIZnetInterface Cayenne-X-NUCLEO-IDW01M1 ... more
MQTTPublish.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 * Xiang Rong - 442039 Add makefile to Embedded C client 00016 *******************************************************************************/ 00017 00018 #ifndef MQTTPUBLISH_H_ 00019 #define MQTTPUBLISH_H_ 00020 00021 #if !defined(DLLImport) 00022 #define DLLImport 00023 #endif 00024 #if !defined(DLLExport) 00025 #define DLLExport 00026 #endif 00027 00028 DLLExport int MQTTSerialize_publish(unsigned char* buf, size_t buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid, 00029 MQTTString topicName, unsigned char* payload, size_t payloadlen); 00030 00031 DLLExport int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName, 00032 unsigned char** payload, size_t* payloadlen, unsigned char* buf, size_t len); 00033 00034 DLLExport int MQTTSerialize_puback(unsigned char* buf, size_t buflen, unsigned short packetid); 00035 DLLExport int MQTTSerialize_pubrel(unsigned char* buf, size_t buflen, unsigned char dup, unsigned short packetid); 00036 DLLExport int MQTTSerialize_pubcomp(unsigned char* buf, size_t buflen, unsigned short packetid); 00037 00038 #endif /* MQTTPUBLISH_H_ */
Generated on Wed Jul 13 2022 15:49:28 by 1.7.2