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