more work on data and nodes service.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#define AQH_IPCDATA_VALUE_TAGS_TIMEOFCREATION 0x07
|
||||
#define AQH_IPCDATA_VALUE_TAGS_DEVFORDRIVER 0x08
|
||||
#define AQH_IPCDATA_VALUE_TAGS_DEVFORSYSTEM 0x09
|
||||
#define AQH_IPCDATA_VALUE_TAGS_MODALITY 0x0a
|
||||
|
||||
#define AQH_IPCDATA_DEVICE_TAGS_ID 0x01
|
||||
#define AQH_IPCDATA_DEVICE_TAGS_DRIVER 0x02
|
||||
@@ -196,6 +197,9 @@ void _writeValueFieldsAsTagsToBuffer(const AQH_VALUE *value, GWEN_BUFFER *buf)
|
||||
s=AQH_Value_GetDeviceNameForSystem(value);
|
||||
if (s && *s)
|
||||
GWEN_Tag16_WriteStringTagToBuffer(AQH_IPCDATA_VALUE_TAGS_DEVFORSYSTEM, s, buf);
|
||||
|
||||
GWEN_Tag16_WriteUint32TagToBuffer(AQH_IPCDATA_VALUE_TAGS_MODALITY, AQH_Value_GetModality(value), buf);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -347,6 +351,9 @@ AQH_VALUE *_readValueFromTag(const uint8_t *ptr, uint32_t len)
|
||||
AQH_Value_SetDeviceNameForSystem(value, s);
|
||||
free(s);
|
||||
break;
|
||||
case AQH_IPCDATA_VALUE_TAGS_MODALITY:
|
||||
AQH_Value_SetModality(value, GWEN_Tag16_GetTagDataAsUint32(tag, 0));
|
||||
break;
|
||||
default:
|
||||
DBG_INFO(AQH_LOGDOMAIN, "Unhandled tag typ %d (%02x)", tagType, tagType);
|
||||
break;
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
|
||||
#include "aqhome/ipc/endpoint_ipc_p.h"
|
||||
|
||||
#include "aqhome/ipc/msg_ipc_result.h"
|
||||
|
||||
#include <gwenhywfar/endpoint_ipc.h>
|
||||
#include <gwenhywfar/msg_ipc.h>
|
||||
#include <gwenhywfar/debug.h>
|
||||
|
||||
|
||||
@@ -50,7 +53,7 @@ void AQH_IpcEndpoint_Extend(GWEN_MSG_ENDPOINT *ep)
|
||||
|
||||
|
||||
|
||||
void _freeData(void *bp, void *p)
|
||||
void _freeData(GWEN_UNUSED void *bp, void *p)
|
||||
{
|
||||
AQH_ENDPOINT_IPC *xep;
|
||||
|
||||
@@ -259,3 +262,14 @@ GWEN_MSG_ENDPOINT *AQH_IpcEndpoint_CreateIpcTcpServiceForSocket(GWEN_SOCKET *sk,
|
||||
|
||||
|
||||
|
||||
void AQH_IpcEndpoint_SendResponseResult(GWEN_MSG_ENDPOINT *ep, uint32_t refMsgId, uint16_t code, uint32_t resultCode)
|
||||
{
|
||||
GWEN_MSG *msgOut;
|
||||
uint32_t msgId;
|
||||
|
||||
msgId=GWEN_MsgEndpoint_GetNextMessageId(ep);
|
||||
msgOut=AQH_ResultIpcMsg_new(code, msgId, refMsgId, resultCode);
|
||||
GWEN_MsgEndpoint_AddSendMessage(ep, msgOut);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ AQHOME_API void AQH_IpcEndpoint_SetPassword(GWEN_MSG_ENDPOINT *ep, const char *s
|
||||
AQHOME_API uint32_t AQH_IpcEndpoint_GetPermissions(const GWEN_MSG_ENDPOINT *ep);
|
||||
AQHOME_API void AQH_IpcEndpoint_SetPermissions(GWEN_MSG_ENDPOINT *ep, uint32_t i);
|
||||
|
||||
AQHOME_API void AQH_IpcEndpoint_SendResponseResult(GWEN_MSG_ENDPOINT *ep, uint32_t refMsgId, uint16_t code, uint32_t resultCode);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define AQH_MSG_IPC_ERROR_BADDATA 5
|
||||
#define AQH_MSG_IPC_ERROR_PERMS 6
|
||||
#define AQH_MSG_IPC_ERROR_NOTFOUND 7
|
||||
#define AQH_MSG_IPC_ERROR_IO 8
|
||||
|
||||
|
||||
AQHOME_API GWEN_MSG *AQH_ResultIpcMsg_new(uint16_t code, uint32_t msgId, uint32_t refMsgId, uint32_t resultCode);
|
||||
|
||||
Reference in New Issue
Block a user