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.
mqtt_client_packet.h
00001 /** 00002 * @file mqtt_client_packet.h 00003 * @brief MQTT packet parsing and formatting 00004 * 00005 * @section License 00006 * 00007 * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved. 00008 * 00009 * This file is part of CycloneTCP Open. 00010 * 00011 * This program is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU General Public License 00013 * as published by the Free Software Foundation; either version 2 00014 * of the License, or (at your option) any later version. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software Foundation, 00023 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00024 * 00025 * @author Oryx Embedded SARL (www.oryx-embedded.com) 00026 * @version 1.7.6 00027 **/ 00028 00029 #ifndef _MQTT_CLIENT_PACKET_H 00030 #define _MQTT_CLIENT_PACKET_H 00031 00032 //Dependencies 00033 #include "core/net.h" 00034 #include "mqtt/mqtt_client.h" 00035 00036 //MQTT client related functions 00037 error_t mqttClientReceivePacket(MqttClientContext *context); 00038 error_t mqttClientProcessPacket(MqttClientContext *context); 00039 00040 error_t mqttClientProcessConnAck(MqttClientContext *context, 00041 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00042 00043 error_t mqttClientProcessPubAck(MqttClientContext *context, 00044 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00045 00046 error_t mqttClientProcessPublish(MqttClientContext *context, 00047 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00048 00049 error_t mqttClientProcessPubRec(MqttClientContext *context, 00050 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00051 00052 error_t mqttClientProcessPubRel(MqttClientContext *context, 00053 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00054 00055 error_t mqttClientProcessPubComp(MqttClientContext *context, 00056 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00057 00058 error_t mqttClientProcessSubAck(MqttClientContext *context, 00059 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00060 00061 error_t mqttClientProcessUnsubAck(MqttClientContext *context, 00062 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00063 00064 error_t mqttClientProcessPingResp(MqttClientContext *context, 00065 bool_t dup, MqttQosLevel qos, bool_t retain, size_t remainingLen); 00066 00067 error_t mqttClientFormatConnect(MqttClientContext *context, 00068 bool_t cleanSession); 00069 00070 error_t mqttClientFormatPublish(MqttClientContext *context, const char_t *topic, 00071 const void *message, size_t length, MqttQosLevel qos, bool_t retain); 00072 00073 error_t mqttClientFormatPubAck(MqttClientContext *context, uint16_t packetId); 00074 error_t mqttClientFormatPubRec(MqttClientContext *context, uint16_t packetId); 00075 error_t mqttClientFormatPubRel(MqttClientContext *context, uint16_t packetId); 00076 error_t mqttClientFormatPubComp(MqttClientContext *context, uint16_t packetId); 00077 00078 error_t mqttClientFormatSubscribe(MqttClientContext *context, 00079 const char_t *topic, MqttQosLevel qos); 00080 00081 error_t mqttClientFormatUnsubscribe(MqttClientContext *context, 00082 const char_t *topic); 00083 00084 error_t mqttClientFormatPingReq(MqttClientContext *context); 00085 error_t mqttClientFormatDisconnect(MqttClientContext *context); 00086 00087 #endif 00088
Generated on Tue Jul 12 2022 17:10:15 by
