added specific IPC messages and use them instead of more generic messages.

This commit is contained in:
Martin Preuss
2023-09-13 12:07:11 +02:00
parent 11798a39d6
commit 161b979e84
21 changed files with 902 additions and 188 deletions

View File

@@ -15,7 +15,7 @@
#include "aqhome/msg/msg_node.h"
#include "aqhome/ipc/msg_ipc_result.h"
#include "aqhome/ipc/data/msg_data_datapoints.h"
#include "aqhome/ipc/data/msg_data_singledata.h"
#include "aqhome/ipc/data/ipc_data.h"
#include <gwenhywfar/args.h>
@@ -262,14 +262,8 @@ int _doSetData(GWEN_DB_NODE *dbArgs)
void _sendCommand(GWEN_MSG_ENDPOINT *epTcp, const char *valueName, const char *valueUnits, double dataToSend)
{
GWEN_MSG *msgOut;
union {double f; uint64_t i;} u;
uint64_t arrayToSend[2];
u.f=dataToSend;
arrayToSend[0]=0;
arrayToSend[1]=u.i;
msgOut=AQH_DataPointsDataIpcMsg_new(AQH_MSGTYPE_IPC_DATA_SETDATA, 0, 0, valueName, valueUnits, arrayToSend, 1);
msgOut=AQH_SingleDataDataIpcMsg_new(AQH_MSGTYPE_IPC_DATA_SETDATA, valueName, valueUnits, 0, 0, dataToSend);
GWEN_MsgEndpoint_AddSendMessage(epTcp, msgOut);
}