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-2024 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 2.4.4
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
MqttSnAdvertise
MqttSnSubscribe
error_t mqttSnDumpRegAck(const MqttSnRegAck *message, size_t length)
Dump REGACK message.
error_t mqttSnDumpWillTopicReq(const MqttSnWillTopicReq *message, size_t length)
Dump WILLTOPICREQ 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.
error_t mqttSnDumpPingResp(const MqttSnPingResp *message, size_t length)
Dump PINGRESP message.
error_t mqttSnDumpUnsubscribe(const MqttSnUnsubscribe *message, size_t length)
Dump UNSUBSCRIBE message.
MqttSnRegAck
error_t mqttSnDumpWillTopic(const MqttSnWillTopic *message, size_t length)
Dump WILLTOPIC 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.
uint8_t message[]
Definition: chap.h:154
MqttSnRegister
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
MqttSnPubAck
error_t mqttSnDumpWillTopicUpd(const MqttSnWillTopicUpd *message, size_t length)
Dump WILLTOPICUPD message.
MqttSnWillTopicResp
MqttSnUnsubAck
MqttSnPublish
MqttSnPubRel
void MqttSnPingResp
PINGRESP message.
MqttSnGwInfo
error_t
Error codes.
Definition: error.h:43
MqttSnPubRec
MqttSnWillTopicUpd
MqttSnDisconnect
error_t mqttSnDumpPingReq(const MqttSnPingReq *message, size_t length)
Dump PINGREQ message.
MqttSnPubComp
error_t mqttSnDumpDisconnect(const MqttSnDisconnect *message, size_t length)
Dump DISCONNECT message.
uint8_t length
Definition: tcp.h:368
error_t mqttSnDumpAdvertise(const MqttSnAdvertise *message, size_t length)
Dump ADVERTISE message.
error_t mqttSnDumpWillMsgReq(const MqttSnWillMsgReq *message, size_t length)
Dump WILLMSGREQ 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
MqttSnConnect
Definitions common to MQTT-SN client and gateway.
uint8_t flags
Definition: tcp.h:351
char char_t
Definition: compiler_port.h:48
void MqttSnWillTopicReq
WILLTOPICREQ message.
MqttSnUnsubscribe
uint8_t msgType
error_t mqttSnDumpPubAck(const MqttSnPubAck *message, size_t length)
Dump PUBACK message.
void MqttSnWillMsg
WILLMSG message.
MqttSnSubAck
error_t mqttSnDumpPublish(const MqttSnPublish *message, size_t length)
Dump PUBLISH message.
error_t mqttSnDumpSubAck(const MqttSnSubAck *message, size_t length)
Dump SUBACK message.
error_t mqttSnDumpPubComp(const MqttSnPubComp *message, size_t length)
Dump PUBCOMP message.
error_t mqttSnDumpWillMsgUpd(const MqttSnWillMsgUpd *message, size_t length)
Dump WILLMSGUPD message.
void MqttSnPingReq
PINGREQ message.
void MqttSnWillMsgUpd
WILLMSGUPD message.
error_t mqttSnDumpSubscribe(const MqttSnSubscribe *message, size_t length)
Dump SUBSCRIBE 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.
MqttSnWillMsgResp
error_t mqttSnDumpGwInfo(const MqttSnGwInfo *message, size_t length)
Dump GWINFO message.
MqttSnConnAck
MqttSnSearchGw
TCP/IP stack core.
MqttSnFlags
error_t mqttSnDumpSearchGw(const MqttSnSearchGw *message, size_t length)
Dump SEARCHGW message.
MqttSnWillTopic
error_t mqttSnDumpConnect(const MqttSnConnect *message, size_t length)
Dump CONNECT message.
error_t mqttSnDumpUnsubAck(const MqttSnUnsubAck *message, size_t length)
Dump UNSUBACK message.