aqhome: Prepared reorganizing IPC and nodes code around built-in event2 api.
This commit is contained in:
57
aqhome/msg/ipc/nodes/m_ipcn_getdevices_req.c
Normal file
57
aqhome/msg/ipc/nodes/m_ipcn_getdevices_req.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2025 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 <config.h>
|
||||
#endif
|
||||
|
||||
#include "aqhome/msg/ipc/nodes/m_ipcn_getdevices_req.h"
|
||||
#include "aqhome/msg/ipc/m_ipc_tag16.h"
|
||||
#include "aqhome/msg/ipc/nodes/m_ipcn.h"
|
||||
#include "aqhome/msg/ipc/m_ipc.h"
|
||||
|
||||
#include <gwenhywfar/text.h>
|
||||
#include <gwenhywfar/tag16.h>
|
||||
#include <gwenhywfar/buffer.h>
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* forward declarations
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* implementation
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
AQH_MESSAGE *AQH_IpcnMessageGetDevicesReq_new(uint16_t code, uint32_t msgId, uint32_t refMsgId)
|
||||
{
|
||||
return AQH_IpcMessage_new(AQH_IPC_PROTOCOL_NODES_ID, AQH_IPC_PROTOCOL_NODES_VERSION, code, msgId, refMsgId, 0, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_IpcnMessageGetDevicesReq_DumpToBuffer(const AQH_MESSAGE *msg, GWEN_BUFFER *dbuf, const char *sText)
|
||||
{
|
||||
GWEN_Buffer_AppendArgs(dbuf, "GETDEVICESREQ(%s) %s (code=%d, protocol=%d, protocol version=%d)\n",
|
||||
AQH_IpcnMessage_MsgTypeToChar(AQH_IpcMessage_GetCode(msg)),
|
||||
sText?sText:"",
|
||||
AQH_IpcMessage_GetCode(msg),
|
||||
AQH_IpcMessage_GetProtoId(msg),
|
||||
AQH_IpcMessage_GetProtoVersion(msg));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user