aqhome-nodes: re-implemented setdata request received via broker.

This commit is contained in:
Martin Preuss
2024-09-30 22:43:35 +02:00
parent 03f9178dd2
commit 8199f7c3b0
14 changed files with 260 additions and 326 deletions

View File

@@ -16,6 +16,8 @@
#include "./b_setdata.h"
#include "./tty_log.h"
#include "./db.h"
#include "./requests.h"
#include "./r_setdata.h"
#include "aqhome/msg/endpoint_tty.h"
#include "aqhome/msg/msg_node.h"
@@ -67,7 +69,8 @@ void AqHomed_ReadAndHandleBrokerMessages(AQHOMED *aqh)
code=GWEN_IpcMsg_GetCode(msg);
DBG_DEBUG(AQH_LOGDOMAIN, "Received IPC packet %d (%x)", (int) code, code);
_handleIpcMsg(aqh, epTcp, msg);
if (AqHomeNodes_Requests_HandleIpcMsg(aqh, epTcp, msg)!=GWEN_MSG_REQUEST_RESULT_HANDLED)
_handleIpcMsg(aqh, epTcp, msg);
GWEN_Msg_free(msg);
}
}
@@ -83,7 +86,7 @@ void _handleIpcMsg(AQHOMED *aqh, GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg)
code=GWEN_IpcMsg_GetCode(msg);
DBG_DEBUG(AQH_LOGDOMAIN, "Received IPC packet");
switch(code) {
// case AQH_MSGTYPE_IPC_DATA_SETDATA: AqHomeNodes_HandleBrokerSetData(aqh, ep, msg); break;
case AQH_MSGTYPE_IPC_DATA_SETDATA: AqHomeNodes_HandleSetData(aqh, ep, msg); break;
default: break;
}
}