re-implemented SetData command.

Allows for string values to be sent.
This commit is contained in:
Martin Preuss
2024-02-14 23:07:20 +01:00
parent eeffe225ec
commit 0cf3976fc7
5 changed files with 161 additions and 31 deletions

View File

@@ -0,0 +1,38 @@
/****************************************************************************
* This file is part of the project AqHome.
* AqHome (c) by 2023 Martin Preuss, all rights reserved.
*
* The license for this file can be found in the file COPYING which you
* should have received along with this file.
****************************************************************************/
#ifndef AQH_MSG_IPC_DATA_SET_H
#define AQH_MSG_IPC_DATA_SET_H
#include <aqhome/api.h>
#include <aqhome/data/value.h>
#include <gwenhywfar/msg_ipc.h>
/**
*/
#define AQH_MSGDATA_SET_TAGS_VALUE 0xc1
#define AQH_MSGDATA_SET_TAGS_DATA 0x02
AQHOME_API GWEN_MSG *AQH_SetDataIpcMsg_new(uint16_t code, const AQH_VALUE *value, const char *data);
AQHOME_API void AQH_SetDataIpcMsg_Parse(GWEN_MSG *msg, int doCopy);
AQHOME_API AQH_VALUE *AQH_SetDataIpcMsg_ReadValue(const GWEN_MSG *msg);
AQHOME_API char *AQH_SetDataIpcMsg_ReadData(const GWEN_MSG *msg);
AQHOME_API void AQH_SetDataIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText);
#endif