First Commit of MQTT-SN Gateway

Add    new SensorNetwork XBee
Add    a sensor network type in a start message.
Update MQTTSNClient to avoid build warning.
Update WiringPi's functions to my original ones. 
BugFix check msgId before adding waitdTopicId table.
BugFix Process termination procedures
Update print curent time in millseconds.
update move currentDateTime() to linux directory.
Bugfix: blink blue lightiIndicator.
Bugfix: Register returns wrong id.
change a status of the client to Disconnected.
change client status procedure
Update README
BugFix: change Network Disconnect procedures.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-05-13 19:18:47 +09:00
parent 826b2a83b0
commit 64fa07b391
63 changed files with 9206 additions and 1138 deletions

View File

@@ -12,6 +12,7 @@
*
* Contributors:
* Ian Craggs - initial API and implementation and/or initial documentation
* TomoakiiYamaguchi - modify for C++
*******************************************************************************/
#ifndef MQTTSNPACKET_H_
@@ -35,15 +36,15 @@ enum MQTTSN_connackCodes
MQTTSN_RC_ACCEPTED,
MQTTSN_RC_REJECTED_CONGESTED,
MQTTSN_RC_REJECTED_INVALID_TOPIC_ID,
MQTTSN_RC_NOT_SUPPORTED
};
enum MQTTSN_topicTypes
typedef enum
{
MQTTSN_TOPIC_TYPE_NORMAL, /* topic id in publish, topic name in subscribe */
MQTTSN_TOPIC_TYPE_PREDEFINED,
MQTTSN_TOPIC_TYPE_SHORT,
};
}MQTTSN_topicTypes;
enum MQTTSN_msgTypes
{
@@ -60,7 +61,7 @@ enum MQTTSN_msgTypes
typedef struct
{
enum MQTTSN_topicTypes type;
MQTTSN_topicTypes type;
union
{
unsigned short id;
@@ -73,7 +74,6 @@ typedef struct
} data;
} MQTTSN_topicid;
/**
* Bitfields for the MQTT-SN flags byte.
*/
@@ -126,7 +126,7 @@ int MQTTSNstrlen(MQTTSNString mqttsnstring);
#include "MQTTSNUnsubscribe.h"
#include "MQTTSNSearch.h"
char* MQTTSNPacket_name(int ptype);
const char* MQTTSNPacket_name(int ptype);
int MQTTSNPacket_len(int length);
int MQTTSNPacket_encode(unsigned char* buf, int length);