aqhome-nodes: send heartbeat message to interface every 2mins.
e02 now expects this message. If for at least 10mins no such msg is received the USB interface is reset.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "aqhome/msg/node/m_needaddr.h"
|
||||
#include "aqhome/msg/node/m_ping.h"
|
||||
#include "aqhome/msg/node/m_pong.h"
|
||||
#include "aqhome/msg/node/m_heartbeat.h"
|
||||
#include "aqhome/msg/node/m_reboot.h"
|
||||
#include "aqhome/msg/node/m_value.h"
|
||||
#include "aqhome/msg/node/m_flashstart.h"
|
||||
@@ -29,6 +30,7 @@
|
||||
#include "aqhome/msg/node/m_flashready.h"
|
||||
#include "aqhome/msg/node/m_flashresponse.h"
|
||||
#include "aqhome/msg/node/m_range.h"
|
||||
#include "aqhome/msg/node/m_time.h"
|
||||
|
||||
#include <gwenhywfar/text.h>
|
||||
|
||||
@@ -202,6 +204,7 @@ const char *AQH_NodeMessage_MsgTypeToChar(uint8_t i)
|
||||
switch(i) {
|
||||
case AQH_MSG_TYPE_PING: return "Ping";
|
||||
case AQH_MSG_TYPE_PONG: return "Pong";
|
||||
case AQH_MSG_TYPE_HEARTBEAT: return "Heartbeat";
|
||||
case AQH_MSG_TYPE_COMSENDSTATS: return "SendStats";
|
||||
case AQH_MSG_TYPE_COMRECVSTATS: return "RecvStats";
|
||||
case AQH_MSG_TYPE_TWIBUSMEMBER: return "TwiBusMember";
|
||||
@@ -245,6 +248,7 @@ void AQH_NodeMessage_DumpSpecificToBuffer(const AQH_MESSAGE *msg, GWEN_BUFFER *d
|
||||
switch(AQH_NodeMessage_GetMsgType(msg)) {
|
||||
case AQH_MSG_TYPE_PING: AQH_PingMessage_DumpToBuffer(msg, dbuf, sText); break;
|
||||
case AQH_MSG_TYPE_PONG: AQH_PongMessage_DumpToBuffer(msg, dbuf, sText); break;
|
||||
case AQH_MSG_TYPE_HEARTBEAT: AQH_HeartbeatMessage_DumpToBuffer(msg, dbuf, sText); break;
|
||||
case AQH_MSG_TYPE_COMSENDSTATS: AQH_SendStatsMessage_DumpToBuffer(msg, dbuf, sText); break;
|
||||
case AQH_MSG_TYPE_COMRECVSTATS: AQH_RecvStatsMessage_DumpToBuffer(msg, dbuf, sText); break;
|
||||
case AQH_MSG_TYPE_NEED_ADDRESS: AQH_AddrMessage_DumpToBuffer(msg, dbuf, sText); break;
|
||||
|
||||
Reference in New Issue
Block a user