/****************************************************************************
 * 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_MSGIPC_GETDEVICES_RSP_H
#define AQH_MSGIPC_GETDEVICES_RSP_H


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

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


#define AQH_MSGIPC_GETDEVICES_RSP_FLAGS_LAST 0x01


AQHOME_API GWEN_MSG *AQH_GetDevicesResponseIpcMsg_new(uint16_t code, uint8_t flags, const AQH_NODE_INFO *ni);

AQHOME_API uint8_t AQH_GetDevicesResponseIpcMsg_GetFlags(const GWEN_MSG *msg);
AQHOME_API uint8_t AQH_GetDevicesResponseIpcMsg_GetBusAddress(const GWEN_MSG *msg);

AQHOME_API uint32_t AQH_GetDevicesResponseIpcMsg_GetUid(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetFirmwareType(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetFirmwareVersion(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetModules(const GWEN_MSG *msg);
AQHOME_API int64_t AQH_GetDevicesResponseIpcMsg_GetTimestamp(const GWEN_MSG *msg);

AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetPkgOut(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetPkgIn(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetCollisions(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetBusy(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetCrcErrors(const GWEN_MSG *msg);
AQHOME_API uint16_t AQH_GetDevicesResponseIpcMsg_GetIoErrors(const GWEN_MSG *msg);


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



#endif

