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

@@ -11,6 +11,7 @@
#endif
#include <aqhome/ipc/msg_ipc_result.h>
#include <aqhome/ipc/data/ipc_data.h>
#include <gwenhywfar/msg.h>
#include <gwenhywfar/buffer.h>
@@ -35,9 +36,8 @@
GWEN_MSG *AQH_ResultIpcMsg_new(uint16_t code, uint32_t msgId, uint32_t refMsgId, uint32_t resultCode)
{
GWEN_MSG *msg;
uint8_t *ptr;
msg=GWEN_IpcMsg_new(AQH_IPC_PROTOCOL_RESULT_ID, AQH_IPC_PROTOCOL_RESULT_VERSION, code,
msg=GWEN_IpcMsg_new(AQH_IPC_PROTOCOL_DATA_ID, AQH_IPC_PROTOCOL_DATA_VERSION, code,
msgId, refMsgId,
AQH_MSGIPC_RESULT_PAYLOADSIZE, NULL);
GWEN_Msg_AddUint32(msg, resultCode);
@@ -59,7 +59,8 @@ void AQH_ResultIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const
{
if (GWEN_Msg_GetBytesInBuffer(msg)>=AQH_MSGIPC_RESULT_MINSIZE) {
GWEN_Buffer_AppendArgs(dbuf,
"ERROR (code=%d, proto=%d, proto version=%d, error=%d, msgId=%d, refMsgId=%d)\n",
"ERROR %s (code=%d, proto=%d, proto version=%d, error=%d, msgId=%d, refMsgId=%d)\n",
sText?sText:"",
GWEN_IpcMsg_GetCode(msg),
GWEN_IpcMsg_GetProtoId(msg),
GWEN_IpcMsg_GetProtoVersion(msg),