mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-17 01:16:52 +01:00
I think the architecture of the ble sensor network, which does not use threads per socket, can be applied to DTLS. Known bug: Occasionally a timeout error occurs when connecting to RFCOMM. BLE is not supported yet. I need help to do it. Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -22,9 +22,7 @@ using namespace MQTTSNGW;
|
||||
using namespace std;
|
||||
|
||||
WirelessNodeId::WirelessNodeId() :
|
||||
_len
|
||||
{ 0 }, _nodeId
|
||||
{ 0 }
|
||||
_len { 0 }, _nodeId { 0 }
|
||||
{
|
||||
|
||||
}
|
||||
@@ -78,17 +76,13 @@ bool WirelessNodeId::operator ==(WirelessNodeId& id)
|
||||
* Class MQTTSNGWEncapsulatedPacket
|
||||
*/
|
||||
MQTTSNGWEncapsulatedPacket::MQTTSNGWEncapsulatedPacket() :
|
||||
_mqttsn
|
||||
{ 0 }, _ctrl
|
||||
{ 0 }
|
||||
_mqttsn { 0 }, _ctrl { 0 }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
MQTTSNGWEncapsulatedPacket::MQTTSNGWEncapsulatedPacket(MQTTSNPacket* packet) :
|
||||
_mqttsn
|
||||
{ packet }, _ctrl
|
||||
{ 0 }
|
||||
_mqttsn { packet }, _ctrl { 0 }
|
||||
{
|
||||
|
||||
}
|
||||
@@ -98,8 +92,7 @@ MQTTSNGWEncapsulatedPacket::~MQTTSNGWEncapsulatedPacket()
|
||||
/* Do not delete the MQTTSNPacket. MQTTSNPacket is deleted by delete Event */
|
||||
}
|
||||
|
||||
int MQTTSNGWEncapsulatedPacket::unicast(SensorNetwork* network,
|
||||
SensorNetAddress* sendTo)
|
||||
int MQTTSNGWEncapsulatedPacket::unicast(SensorNetwork* network, SensorNetAddress* sendTo)
|
||||
{
|
||||
uint8_t buf[MQTTSNGW_MAX_PACKET_SIZE];
|
||||
int len = serialize(buf);
|
||||
@@ -121,8 +114,7 @@ int MQTTSNGWEncapsulatedPacket::serialize(uint8_t* buf)
|
||||
return buf[0] + len;
|
||||
}
|
||||
|
||||
int MQTTSNGWEncapsulatedPacket::desirialize(unsigned char* buf,
|
||||
unsigned short len)
|
||||
int MQTTSNGWEncapsulatedPacket::desirialize(unsigned char* buf, unsigned short len)
|
||||
{
|
||||
if (_mqttsn)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user