Add The forwarder Encapsulation mesage #27 #69

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2018-07-26 17:42:12 +09:00
parent 4d75351a06
commit 9940aadd4b
28 changed files with 1322 additions and 433 deletions

View File

@@ -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";
}