/****************************************************************************
 * 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_VALUE_H
#define AQH_MSG_IPC_VALUE_H


#include <aqhome/api.h>
#include <aqhome/ipc/nodes/ipc_nodes.h>
#include <aqhome/msg/msg_node.h>

#include <gwenhywfar/msg.h>
#include <gwenhywfar/buffer.h>



AQHOME_API GWEN_MSG *AQH_ValueIpcMsg_new(uint16_t code,
                                         uint32_t uid,
                                         uint8_t valueId,
                                         uint8_t valueType,
                                         int16_t valueNom,
                                         int16_t valueDenom);
AQHOME_API uint32_t AQH_ValueIpcMsg_GetUid(const GWEN_MSG *msg);
AQHOME_API uint8_t AQH_ValueIpcMsg_GetValueId(const GWEN_MSG *msg);
AQHOME_API uint8_t AQH_ValueIpcMsg_GetValueType(const GWEN_MSG *msg);
AQHOME_API int16_t AQH_ValueIpcMsg_GetValueNom(const GWEN_MSG *msg);
AQHOME_API int16_t AQH_ValueIpcMsg_GetValueDenom(const GWEN_MSG *msg);
AQHOME_API double AQH_ValueIpcMsg_GetValueAsDouble(const GWEN_MSG *msg);

AQHOME_API void AQH_ValueIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText);


#endif



