mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-16 08:56:51 +01:00
@@ -49,7 +49,6 @@ public:
|
||||
_que = new Que<T>;
|
||||
}
|
||||
|
||||
|
||||
~PacketQue()
|
||||
{
|
||||
clear();
|
||||
@@ -72,8 +71,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
post(T* packet)
|
||||
int post(T* packet)
|
||||
{
|
||||
int rc;
|
||||
_mutex.lock();
|
||||
@@ -113,8 +111,6 @@ private:
|
||||
Mutex _mutex;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*=====================================
|
||||
Class WaitREGACKPacket
|
||||
=====================================*/
|
||||
@@ -151,20 +147,29 @@ private:
|
||||
waitREGACKPacket* _end;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*=====================================
|
||||
Class Client
|
||||
=====================================*/
|
||||
typedef enum
|
||||
{
|
||||
Cstat_Disconnected = 0, Cstat_TryConnecting, Cstat_Connecting, Cstat_Active, Cstat_Asleep, Cstat_Awake, Cstat_Lost
|
||||
Cstat_Disconnected = 0,
|
||||
Cstat_TryConnecting,
|
||||
Cstat_Connecting,
|
||||
Cstat_Active,
|
||||
Cstat_Asleep,
|
||||
Cstat_Awake,
|
||||
Cstat_Lost
|
||||
} ClientStatus;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Ctype_Regular = 0, Ctype_Forwarded, Ctype_QoS_1, Ctype_Aggregated, Ctype_Proxy, Ctype_Aggregater
|
||||
}ClientType;
|
||||
Ctype_Regular = 0,
|
||||
Ctype_Forwarded,
|
||||
Ctype_QoS_1,
|
||||
Ctype_Aggregated,
|
||||
Ctype_Proxy,
|
||||
Ctype_Aggregater
|
||||
} ClientType;
|
||||
|
||||
class Forwarder;
|
||||
|
||||
@@ -191,10 +196,12 @@ public:
|
||||
void clearWaitedPubTopicId(void);
|
||||
void clearWaitedSubTopicId(void);
|
||||
|
||||
int setClientSleepPacket(MQTTGWPacket*);
|
||||
int setClientSleepPacket(MQTTGWPacket*);
|
||||
int setProxyPacket(MQTTSNPacket* packet);
|
||||
void setWaitedPubTopicId(uint16_t msgId, uint16_t topicId, MQTTSN_topicTypes type);
|
||||
void setWaitedSubTopicId(uint16_t msgId, uint16_t topicId, MQTTSN_topicTypes type);
|
||||
void setWaitedPubTopicId(uint16_t msgId, uint16_t topicId,
|
||||
MQTTSN_topicTypes type);
|
||||
void setWaitedSubTopicId(uint16_t msgId, uint16_t topicId,
|
||||
MQTTSN_topicTypes type);
|
||||
|
||||
bool checkTimeover(void);
|
||||
void updateStatus(MQTTSNPacket*);
|
||||
@@ -260,7 +267,7 @@ private:
|
||||
PacketQue<MQTTGWPacket> _clientSleepPacketQue;
|
||||
PacketQue<MQTTSNPacket> _proxyPacketQue;
|
||||
|
||||
WaitREGACKPacketList _waitREGACKList;
|
||||
WaitREGACKPacketList _waitREGACKList;
|
||||
|
||||
Topics* _topics;
|
||||
TopicIdMap _waitedPubTopicIdMap;
|
||||
@@ -285,7 +292,7 @@ private:
|
||||
uint8_t _snMsgId;
|
||||
|
||||
Network* _network; // Broker
|
||||
bool _secureNetwork; // SSL
|
||||
bool _secureNetwork; // SSL
|
||||
bool _sensorNetype; // false: unstable network like a G3
|
||||
SensorNetAddress _sensorNetAddr;
|
||||
|
||||
@@ -299,7 +306,5 @@ private:
|
||||
Client* _prevClient;
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endif /* MQTTSNGWCLIENT_H_ */
|
||||
|
||||
Reference in New Issue
Block a user