/**************************************************************************** * 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. ****************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #include #define AQH_MSGIPC_GETDEVICES_REQ_PAYLOADSIZE 0 #define AQH_MSGIPC_GETDEVICES_REQ_MINSIZE (GWEN_MSGIPC_OFFS_PAYLOAD+AQH_MSGIPC_GETDEVICES_REQ_PAYLOADSIZE) GWEN_MSG *AQH_GetDevicesRequestIpcMsg_new(uint16_t code, uint32_t msgId, uint32_t refMsgId) { return GWEN_IpcMsg_new(AQH_IPC_PROTOCOL_NODES_ID, AQH_IPC_PROTOCOL_NODES_VERSION, code, msgId, refMsgId, AQH_MSGIPC_GETDEVICES_REQ_PAYLOADSIZE, NULL); } void AQH_GetDevicesRequestIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText) { if (GWEN_Msg_GetBytesInBuffer(msg)>=AQH_MSGIPC_GETDEVICES_REQ_MINSIZE) { GWEN_Buffer_AppendArgs(dbuf, "GET_DEVICES REQ %s (code=%d, proto=%d, proto version=%d, msgId=%d, refMsgId=%d)\n", sText?sText:"", GWEN_IpcMsg_GetCode(msg), GWEN_IpcMsg_GetProtoId(msg), GWEN_IpcMsg_GetProtoVersion(msg), GWEN_IpcMsg_GetMsgId(msg), GWEN_IpcMsg_GetRefMsgId(msg)); } }