/****************************************************************************
 * 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_DATAPOINTS_H
#define AQH_MSG_IPC_DATA_DATAPOINTS_H


#include <aqhome/api.h>

#include <aqhome/data/value.h>

#include <gwenhywfar/msg_ipc.h>


#define AQH_MSGDATA_DATAPOINTS_FLAGS_LASTMSG 0x0001



AQHOME_API GWEN_MSG *AQH_DataPointsDataIpcMsg_new(uint16_t code, uint32_t flags,
                                                  uint64_t valueId, const char *valueName, const char *units,
                                                  const uint64_t *i64Ptr, int numOfDataPoints);

AQHOME_API uint32_t AQH_DataPointsDataIpcMsg_GetFlags(const GWEN_MSG *msg);
AQHOME_API uint32_t AQH_DataPointsDataIpcMsg_GetNumValues(const GWEN_MSG *msg);
AQHOME_API uint64_t AQH_DataPointsDataIpcMsg_GetValueId(const GWEN_MSG *msg);
AQHOME_API const char *AQH_DataPointsDataIpcMsg_GetValueName(const GWEN_MSG *msg);
AQHOME_API const char *AQH_DataPointsDataIpcMsg_GetUnits(const GWEN_MSG *msg);
AQHOME_API const uint64_t *AQH_DataPointsDataIpcMsg_GetDataPoints(const GWEN_MSG *msg);

AQHOME_API int AQH_DataPointsDataIpcMsg_IsValid(const GWEN_MSG *msg);
AQHOME_API void AQH_DataPointsDataIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText);














#endif



