mqtt_sn_debug.h File Reference

Data logging functions for debugging purpose (MQTT-SN) More...

#include "core/net.h"
#include "mqtt_sn/mqtt_sn_common.h"

Go to the source code of this file.

Functions

error_t mqttSnDumpMessage (const uint8_t *message, size_t length)
 Dump MQTT-SN message for debugging purpose. More...
 
error_t mqttSnDumpAdvertise (const MqttSnAdvertise *message, size_t length)
 Dump ADVERTISE message. More...
 
error_t mqttSnDumpSearchGw (const MqttSnSearchGw *message, size_t length)
 Dump SEARCHGW message. More...
 
error_t mqttSnDumpGwInfo (const MqttSnGwInfo *message, size_t length)
 Dump GWINFO message. More...
 
error_t mqttSnDumpConnect (const MqttSnConnect *message, size_t length)
 Dump CONNECT message. More...
 
error_t mqttSnDumpConnAck (const MqttSnConnAck *message, size_t length)
 Dump CONNACK message. More...
 
error_t mqttSnDumpWillTopicReq (const MqttSnWillTopicReq *message, size_t length)
 Dump WILLTOPICREQ message. More...
 
error_t mqttSnDumpWillTopic (const MqttSnWillTopic *message, size_t length)
 Dump WILLTOPIC message. More...
 
error_t mqttSnDumpWillMsgReq (const MqttSnWillMsgReq *message, size_t length)
 Dump WILLMSGREQ message. More...
 
error_t mqttSnDumpWillMsg (const MqttSnWillMsg *message, size_t length)
 Dump WILLMSG message. More...
 
error_t mqttSnDumpRegister (const MqttSnRegister *message, size_t length)
 Dump REGISTER message. More...
 
error_t mqttSnDumpRegAck (const MqttSnRegAck *message, size_t length)
 Dump REGACK message. More...
 
error_t mqttSnDumpPublish (const MqttSnPublish *message, size_t length)
 Dump PUBLISH message. More...
 
error_t mqttSnDumpPubAck (const MqttSnPubAck *message, size_t length)
 Dump PUBACK message. More...
 
error_t mqttSnDumpPubRec (const MqttSnPubRec *message, size_t length)
 Dump PUBREC message. More...
 
error_t mqttSnDumpPubRel (const MqttSnPubRel *message, size_t length)
 Dump PUBREL message. More...
 
error_t mqttSnDumpPubComp (const MqttSnPubComp *message, size_t length)
 Dump PUBCOMP message. More...
 
error_t mqttSnDumpSubscribe (const MqttSnSubscribe *message, size_t length)
 Dump SUBSCRIBE message. More...
 
error_t mqttSnDumpSubAck (const MqttSnSubAck *message, size_t length)
 Dump SUBACK message. More...
 
error_t mqttSnDumpUnsubscribe (const MqttSnUnsubscribe *message, size_t length)
 Dump UNSUBSCRIBE message. More...
 
error_t mqttSnDumpUnsubAck (const MqttSnUnsubAck *message, size_t length)
 Dump UNSUBACK message. More...
 
error_t mqttSnDumpPingReq (const MqttSnPingReq *message, size_t length)
 Dump PINGREQ message. More...
 
error_t mqttSnDumpPingResp (const MqttSnPingResp *message, size_t length)
 Dump PINGRESP message. More...
 
error_t mqttSnDumpDisconnect (const MqttSnDisconnect *message, size_t length)
 Dump DISCONNECT message. More...
 
error_t mqttSnDumpWillTopicUpd (const MqttSnWillTopicUpd *message, size_t length)
 Dump WILLTOPICUPD message. More...
 
error_t mqttSnDumpWillTopicResp (const MqttSnWillTopicResp *message, size_t length)
 Dump WILLTOPICRESP message. More...
 
error_t mqttSnDumpWillMsgUpd (const MqttSnWillMsgUpd *message, size_t length)
 Dump WILLMSGUPD message. More...
 
error_t mqttSnDumpWillMsgResp (const MqttSnWillMsgResp *message, size_t length)
 Dump WILLMSGRESP message. More...
 
void mqttSnDumpFlags (MqttSnFlags flags)
 Dump flags. More...
 
const char_tmqttSnGetMessageName (uint16_t msgType)
 Get the name of the specified MQTT-SN message. More...
 
const char_tmqttSnGetReturnCodeDesc (uint16_t returnCode)
 Get the description of the specified return code. More...
 

Detailed Description

Data logging functions for debugging purpose (MQTT-SN)

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file mqtt_sn_debug.h.

Function Documentation

◆ mqttSnDumpAdvertise()

error_t mqttSnDumpAdvertise ( const MqttSnAdvertise message,
size_t  length 
)

Dump ADVERTISE message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 320 of file mqtt_sn_debug.c.

◆ mqttSnDumpConnAck()

error_t mqttSnDumpConnAck ( const MqttSnConnAck message,
size_t  length 
)

Dump CONNACK message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 413 of file mqtt_sn_debug.c.

◆ mqttSnDumpConnect()

error_t mqttSnDumpConnect ( const MqttSnConnect message,
size_t  length 
)

Dump CONNECT message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 389 of file mqtt_sn_debug.c.

◆ mqttSnDumpDisconnect()

error_t mqttSnDumpDisconnect ( const MqttSnDisconnect message,
size_t  length 
)

Dump DISCONNECT message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 855 of file mqtt_sn_debug.c.

◆ mqttSnDumpFlags()

void mqttSnDumpFlags ( MqttSnFlags  flags)

Dump flags.

Parameters
[in]flagsValue of the flags

Definition at line 958 of file mqtt_sn_debug.c.

◆ mqttSnDumpGwInfo()

error_t mqttSnDumpGwInfo ( const MqttSnGwInfo message,
size_t  length 
)

Dump GWINFO message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 364 of file mqtt_sn_debug.c.

◆ mqttSnDumpMessage()

error_t mqttSnDumpMessage ( const uint8_t *  message,
size_t  length 
)

Dump MQTT-SN message for debugging purpose.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 93 of file mqtt_sn_debug.c.

◆ mqttSnDumpPingReq()

error_t mqttSnDumpPingReq ( const MqttSnPingReq message,
size_t  length 
)

Dump PINGREQ message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 824 of file mqtt_sn_debug.c.

◆ mqttSnDumpPingResp()

error_t mqttSnDumpPingResp ( const MqttSnPingResp message,
size_t  length 
)

Dump PINGRESP message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 841 of file mqtt_sn_debug.c.

◆ mqttSnDumpPubAck()

error_t mqttSnDumpPubAck ( const MqttSnPubAck message,
size_t  length 
)

Dump PUBACK message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 603 of file mqtt_sn_debug.c.

◆ mqttSnDumpPubComp()

error_t mqttSnDumpPubComp ( const MqttSnPubComp message,
size_t  length 
)

Dump PUBCOMP message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 669 of file mqtt_sn_debug.c.

◆ mqttSnDumpPublish()

error_t mqttSnDumpPublish ( const MqttSnPublish message,
size_t  length 
)

Dump PUBLISH message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 550 of file mqtt_sn_debug.c.

◆ mqttSnDumpPubRec()

error_t mqttSnDumpPubRec ( const MqttSnPubRec message,
size_t  length 
)

Dump PUBREC message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 627 of file mqtt_sn_debug.c.

◆ mqttSnDumpPubRel()

error_t mqttSnDumpPubRel ( const MqttSnPubRel message,
size_t  length 
)

Dump PUBREL message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 648 of file mqtt_sn_debug.c.

◆ mqttSnDumpRegAck()

error_t mqttSnDumpRegAck ( const MqttSnRegAck message,
size_t  length 
)

Dump REGACK message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 526 of file mqtt_sn_debug.c.

◆ mqttSnDumpRegister()

error_t mqttSnDumpRegister ( const MqttSnRegister message,
size_t  length 
)

Dump REGISTER message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 503 of file mqtt_sn_debug.c.

◆ mqttSnDumpSearchGw()

error_t mqttSnDumpSearchGw ( const MqttSnSearchGw message,
size_t  length 
)

Dump SEARCHGW message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 343 of file mqtt_sn_debug.c.

◆ mqttSnDumpSubAck()

error_t mqttSnDumpSubAck ( const MqttSnSubAck message,
size_t  length 
)

Dump SUBACK message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 734 of file mqtt_sn_debug.c.

◆ mqttSnDumpSubscribe()

error_t mqttSnDumpSubscribe ( const MqttSnSubscribe message,
size_t  length 
)

Dump SUBSCRIBE message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 690 of file mqtt_sn_debug.c.

◆ mqttSnDumpUnsubAck()

error_t mqttSnDumpUnsubAck ( const MqttSnUnsubAck message,
size_t  length 
)

Dump UNSUBACK message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 803 of file mqtt_sn_debug.c.

◆ mqttSnDumpUnsubscribe()

error_t mqttSnDumpUnsubscribe ( const MqttSnUnsubscribe message,
size_t  length 
)

Dump UNSUBSCRIBE message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 759 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillMsg()

error_t mqttSnDumpWillMsg ( const MqttSnWillMsg message,
size_t  length 
)

Dump WILLMSG message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 485 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillMsgReq()

error_t mqttSnDumpWillMsgReq ( const MqttSnWillMsgReq message,
size_t  length 
)

Dump WILLMSGREQ message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 471 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillMsgResp()

error_t mqttSnDumpWillMsgResp ( const MqttSnWillMsgResp message,
size_t  length 
)

Dump WILLMSGRESP message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 938 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillMsgUpd()

error_t mqttSnDumpWillMsgUpd ( const MqttSnWillMsgUpd message,
size_t  length 
)

Dump WILLMSGUPD message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 920 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillTopic()

error_t mqttSnDumpWillTopic ( const MqttSnWillTopic message,
size_t  length 
)

Dump WILLTOPIC message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 449 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillTopicReq()

error_t mqttSnDumpWillTopicReq ( const MqttSnWillTopicReq message,
size_t  length 
)

Dump WILLTOPICREQ message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 435 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillTopicResp()

error_t mqttSnDumpWillTopicResp ( const MqttSnWillTopicResp message,
size_t  length 
)

Dump WILLTOPICRESP message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 898 of file mqtt_sn_debug.c.

◆ mqttSnDumpWillTopicUpd()

error_t mqttSnDumpWillTopicUpd ( const MqttSnWillTopicUpd message,
size_t  length 
)

Dump WILLTOPICUPD message.

Parameters
[in]messagePointer to the message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 876 of file mqtt_sn_debug.c.

◆ mqttSnGetMessageName()

const char_t* mqttSnGetMessageName ( uint16_t  msgType)

Get the name of the specified MQTT-SN message.

Parameters
[in]msgTypeMessage type
Returns
Message name (NULL-terminated string)

Definition at line 1043 of file mqtt_sn_debug.c.

◆ mqttSnGetReturnCodeDesc()

const char_t* mqttSnGetReturnCodeDesc ( uint16_t  returnCode)

Get the description of the specified return code.

Parameters
[in]returnCodeValue of the return code
Returns
Description of the return code (NULL-terminated string)

Definition at line 1062 of file mqtt_sn_debug.c.