mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-16 08:56:51 +01:00
Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -29,6 +29,7 @@ static const char* packet_names[] =
|
||||
"WILLMSGRESP"
|
||||
};
|
||||
|
||||
static const char* encapsulation_packet_name = "ENCAPSULATED";
|
||||
|
||||
/**
|
||||
* Returns a character string representing the packet name given a MsgType code
|
||||
@@ -37,6 +38,10 @@ static const char* packet_names[] =
|
||||
*/
|
||||
const char* MQTTSNPacket_name(int code)
|
||||
{
|
||||
if ( code == MQTTSN_ENCAPSULATED )
|
||||
{
|
||||
return encapsulation_packet_name;
|
||||
}
|
||||
return (code >= 0 && code <= MQTTSN_WILLMSGRESP) ? packet_names[code] : "UNKNOWN";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user