mqtt_sn_debug.h
Go to the documentation of this file.
1 /**
2  * @file mqtt_sn_debug.h
3  * @brief Data logging functions for debugging purpose (MQTT-SN)
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
28 
29 #ifndef _MQTT_SN_DEBUG_H
30 #define _MQTT_SN_DEBUG_H
31 
32 //Dependencies
33 #include "core/net.h"
34 #include "mqtt_sn/mqtt_sn_common.h"
35 
36 //C++ guard
37 #ifdef __cplusplus
38  extern "C" {
39 #endif
40 
41 //MQTT-SN related functions
42 error_t mqttSnDumpMessage(const uint8_t *message, size_t length);
43 
71 
73 
74 const char_t *mqttSnGetMessageName(uint16_t msgType);
76 
77 //C++ guard
78 #ifdef __cplusplus
79  }
80 #endif
81 
82 #endif
uint8_t returnCode
__start_packed struct @257 MqttSnWillTopicResp
WILLTOPICRESP message.
__start_packed struct @246 MqttSnPublish
PUBLISH message.
__start_packed struct @249 MqttSnPubRel
PUBREL message.
error_t mqttSnDumpAdvertise(const MqttSnAdvertise *message, size_t length)
Dump ADVERTISE message.
error_t mqttSnDumpWillMsg(const MqttSnWillMsg *message, size_t length)
Dump WILLMSG message.
char char_t
Definition: compiler_port.h:41
uint8_t flags
Definition: tcp.h:312
error_t mqttSnDumpWillMsgReq(const MqttSnWillMsgReq *message, size_t length)
Dump WILLMSGREQ message.
__start_packed struct @247 MqttSnPubAck
PUBACK message.
error_t mqttSnDumpSubscribe(const MqttSnSubscribe *message, size_t length)
Dump SUBSCRIBE message.
__start_packed struct @254 MqttSnUnsubAck
UNSUBACK message.
TCP/IP stack core.
error_t mqttSnDumpWillTopicResp(const MqttSnWillTopicResp *message, size_t length)
Dump WILLTOPICRESP message.
error_t mqttSnDumpPubRec(const MqttSnPubRec *message, size_t length)
Dump PUBREC message.
__start_packed struct @253 MqttSnUnsubscribe
UNSUBSCRIBE message.
uint8_t message[]
Definition: chap.h:150
void MqttSnWillMsgUpd
WILLMSGUPD message.
error_t mqttSnDumpWillTopic(const MqttSnWillTopic *message, size_t length)
Dump WILLTOPIC message.
error_t mqttSnDumpDisconnect(const MqttSnDisconnect *message, size_t length)
Dump DISCONNECT message.
error_t mqttSnDumpWillMsgResp(const MqttSnWillMsgResp *message, size_t length)
Dump WILLMSGRESP message.
__start_packed struct @248 MqttSnPubRec
PUBREC message.
error_t mqttSnDumpWillMsgUpd(const MqttSnWillMsgUpd *message, size_t length)
Dump WILLMSGUPD message.
error_t mqttSnDumpRegister(const MqttSnRegister *message, size_t length)
Dump REGISTER message.
error_t mqttSnDumpSearchGw(const MqttSnSearchGw *message, size_t length)
Dump SEARCHGW message.
error_t mqttSnDumpRegAck(const MqttSnRegAck *message, size_t length)
Dump REGACK message.
error_t mqttSnDumpGwInfo(const MqttSnGwInfo *message, size_t length)
Dump GWINFO message.
__start_packed struct @243 MqttSnWillTopic
WILLTOPIC message.
error_t mqttSnDumpConnAck(const MqttSnConnAck *message, size_t length)
Dump CONNACK message.
__start_packed struct @240 MqttSnGwInfo
GWINFO message.
error_t mqttSnDumpPublish(const MqttSnPublish *message, size_t length)
Dump PUBLISH message.
error_t mqttSnDumpConnect(const MqttSnConnect *message, size_t length)
Dump CONNECT message.
error_t mqttSnDumpUnsubAck(const MqttSnUnsubAck *message, size_t length)
Dump UNSUBACK message.
__start_packed struct @250 MqttSnPubComp
PUBCOMP message.
void mqttSnDumpFlags(MqttSnFlags flags)
Dump flags.
__start_packed struct @239 MqttSnSearchGw
SEARCHGW message.
error_t mqttSnDumpWillTopicReq(const MqttSnWillTopicReq *message, size_t length)
Dump WILLTOPICREQ message.
error_t mqttSnDumpPubRel(const MqttSnPubRel *message, size_t length)
Dump PUBREL message.
error_t mqttSnDumpUnsubscribe(const MqttSnUnsubscribe *message, size_t length)
Dump UNSUBSCRIBE message.
error_t mqttSnDumpWillTopicUpd(const MqttSnWillTopicUpd *message, size_t length)
Dump WILLTOPICUPD message.
Definitions common to MQTT-SN client and gateway.
__start_packed struct @242 MqttSnConnAck
CONNACK message.
__start_packed struct @245 MqttSnRegAck
REGACK message.
__start_packed struct @256 MqttSnWillTopicUpd
WILLTOPICUPD message.
void MqttSnPingResp
PINGRESP message.
__start_packed struct @244 MqttSnRegister
REGISTER message.
__start_packed struct @235 MqttSnFlags
MQTT-SN flags.
error_t
Error codes.
Definition: error.h:40
void MqttSnWillMsg
WILLMSG message.
void MqttSnPingReq
PINGREQ message.
__start_packed struct @238 MqttSnAdvertise
ADVERTISE message.
const char_t * mqttSnGetReturnCodeDesc(uint16_t returnCode)
Get the description of the specified return code.
const char_t * mqttSnGetMessageName(uint16_t msgType)
Get the name of the specified MQTT-SN message.
__start_packed struct @251 MqttSnSubscribe
SUBSCRIBE message.
error_t mqttSnDumpSubAck(const MqttSnSubAck *message, size_t length)
Dump SUBACK message.
error_t mqttSnDumpMessage(const uint8_t *message, size_t length)
Dump MQTT-SN message for debugging purpose.
Definition: mqtt_sn_debug.c:93
error_t mqttSnDumpPubComp(const MqttSnPubComp *message, size_t length)
Dump PUBCOMP message.
__start_packed struct @252 MqttSnSubAck
SUBACK message.
void MqttSnWillMsgReq
WILLMSGREQ message.
__start_packed struct @258 MqttSnWillMsgResp
WILLMSGRESP message.
uint8_t length
Definition: dtls_misc.h:140
void MqttSnWillTopicReq
WILLTOPICREQ message.
uint8_t msgType
Definition: dtls_misc.h:177
__start_packed struct @241 MqttSnConnect
CONNECT message.
error_t mqttSnDumpPingReq(const MqttSnPingReq *message, size_t length)
Dump PINGREQ message.
error_t mqttSnDumpPingResp(const MqttSnPingResp *message, size_t length)
Dump PINGRESP message.
__start_packed struct @255 MqttSnDisconnect
DISCONNECT message.
error_t mqttSnDumpPubAck(const MqttSnPubAck *message, size_t length)
Dump PUBACK message.