aqhome-tool: added command to watch values changed on the server.

This commit is contained in:
Martin Preuss
2023-10-04 23:33:40 +02:00
parent f1753eeea7
commit b66f3d2ef4
8 changed files with 401 additions and 69 deletions

View File

@@ -14,7 +14,7 @@
#include "./c_getdatapoints.h"
#include "./aqhome_data_p.h"
#include "aqhome/ipc/data/ipc_data.h"
#include "aqhome/ipc/data/msg_data_datapoints.h"
#include "aqhome/ipc/data/msg_data_multidata.h"
#include "aqhome/ipc/data/msg_data_getdata.h"
#include "aqhome/ipc/endpoint_ipc.h"
#include "aqhome/ipc/msg_ipc_result.h"
@@ -102,11 +102,7 @@ int _getAndSendDataPoints(AQHOME_DATA *aqh, GWEN_MSG_ENDPOINT *ep, const AQH_VAL
numTableEntries=(int)(tablePtr[0]);
numDataPoints=numTableEntries/2;
outMsg=AQH_DataPointsDataIpcMsg_new(AQH_MSGTYPE_IPC_DATA_GETDATA_RSP, AQH_MSGDATA_DATAPOINTS_FLAGS_LASTMSG,
valueId,
AQH_Value_GetNameForSystem(value),
AQH_Value_GetValueUnits(value),
&(tablePtr[1]), numDataPoints);
outMsg=AQH_MultiDataDataIpcMsg_new(AQH_MSGTYPE_IPC_DATA_GETDATA_RSP, value, &(tablePtr[1]), numDataPoints);
GWEN_MsgEndpoint_AddSendMessage(ep, outMsg);
free(tablePtr);
return AQH_MSG_IPC_SUCCESS;