adapted to latest changes in gwen (msgio API v2 becomes v1).
This commit is contained in:
@@ -17,18 +17,18 @@
|
||||
#include "./tty_write.h"
|
||||
#include "./db.h"
|
||||
|
||||
#include "aqhome/msg/endpoint2_tty.h"
|
||||
#include "aqhome/msg/endpoint_tty.h"
|
||||
#include "aqhome/msg/msg_node.h"
|
||||
#include "aqhome/msg/msg_value2.h"
|
||||
#include "aqhome/ipc/endpoint2_ipc.h"
|
||||
#include "aqhome/ipc/endpoint_ipc.h"
|
||||
#include "aqhome/ipc/msg_ipc_forward.h"
|
||||
#include "aqhome/ipc/msg_ipc_value.h"
|
||||
#include "aqhome/mqtt/endpoint2_mqttc.h"
|
||||
#include "aqhome/mqtt/endpoint_mqttc.h"
|
||||
|
||||
#include <gwenhywfar/gwenhywfar.h>
|
||||
#include <gwenhywfar/args.h>
|
||||
#include <gwenhywfar/debug.h>
|
||||
#include <gwenhywfar/endpoint2_tcpd.h>
|
||||
#include <gwenhywfar/endpoint_tcpd.h>
|
||||
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
* ------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void _forwardValue2MsgToIpc(GWEN_MSG_ENDPOINT2 *ep, const GWEN_MSG *nodeMsg);
|
||||
static void _forwardAnyMsgToIpc(GWEN_MSG_ENDPOINT2 *ep, const GWEN_MSG *nodeMsg);
|
||||
static void _forwardValue2MsgToIpc(GWEN_MSG_ENDPOINT *ep, const GWEN_MSG *nodeMsg);
|
||||
static void _forwardAnyMsgToIpc(GWEN_MSG_ENDPOINT *ep, const GWEN_MSG *nodeMsg);
|
||||
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ void AqHomed_ForwardTtyMsgToIpcClients(AQHOMED *aqh, const GWEN_MSG *msg)
|
||||
|
||||
msgGroup=AQH_NodeMsg_GetMsgGroup(AQH_NodeMsg_GetMsgType(msg));
|
||||
if (msgGroup) {
|
||||
GWEN_MSG_ENDPOINT2 *ep;
|
||||
GWEN_MSG_ENDPOINT *ep;
|
||||
|
||||
ep=GWEN_MsgEndpoint2_Tree2_GetFirstChild(aqh->ipcdEndpoint);
|
||||
ep=GWEN_MsgEndpoint_Tree2_GetFirstChild(aqh->ipcdEndpoint);
|
||||
while(ep) {
|
||||
if (msgGroup & AQH_IpcEndpoint2_GetAcceptedMsgGroups(ep)) {
|
||||
if (msgGroup & AQH_IpcEndpoint_GetAcceptedMsgGroups(ep)) {
|
||||
DBG_INFO(NULL, "Endpoint accepts msg group %d", msgGroup);
|
||||
switch(AQH_NodeMsg_GetMsgType(msg)) {
|
||||
case AQH_MSG_TYPE_VALUE2:
|
||||
@@ -79,7 +79,7 @@ void AqHomed_ForwardTtyMsgToIpcClients(AQHOMED *aqh, const GWEN_MSG *msg)
|
||||
}
|
||||
|
||||
}
|
||||
ep=GWEN_MsgEndpoint2_Tree2_GetNext(ep);
|
||||
ep=GWEN_MsgEndpoint_Tree2_GetNext(ep);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -89,7 +89,7 @@ void AqHomed_ForwardTtyMsgToIpcClients(AQHOMED *aqh, const GWEN_MSG *msg)
|
||||
|
||||
|
||||
|
||||
void _forwardValue2MsgToIpc(GWEN_MSG_ENDPOINT2 *ep, const GWEN_MSG *nodeMsg)
|
||||
void _forwardValue2MsgToIpc(GWEN_MSG_ENDPOINT *ep, const GWEN_MSG *nodeMsg)
|
||||
{
|
||||
GWEN_MSG *ipcMsg;
|
||||
|
||||
@@ -99,17 +99,17 @@ void _forwardValue2MsgToIpc(GWEN_MSG_ENDPOINT2 *ep, const GWEN_MSG *nodeMsg)
|
||||
AQH_Value2Msg_GetValueType(nodeMsg),
|
||||
AQH_Value2Msg_GetValueNom(nodeMsg),
|
||||
AQH_Value2Msg_GetValueDenom(nodeMsg));
|
||||
GWEN_MsgEndpoint2_AddSendMessage(ep, ipcMsg);
|
||||
GWEN_MsgEndpoint_AddSendMessage(ep, ipcMsg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _forwardAnyMsgToIpc(GWEN_MSG_ENDPOINT2 *ep, const GWEN_MSG *nodeMsg)
|
||||
void _forwardAnyMsgToIpc(GWEN_MSG_ENDPOINT *ep, const GWEN_MSG *nodeMsg)
|
||||
{
|
||||
GWEN_MSG *ipcMsg;
|
||||
|
||||
ipcMsg=AQH_ForwardIpcMsg_new(AQH_MSGTYPE_IPC_FORWARD, GWEN_Msg_GetConstBuffer(nodeMsg), GWEN_Msg_GetBytesInBuffer(nodeMsg));
|
||||
GWEN_MsgEndpoint2_AddSendMessage(ep, ipcMsg);
|
||||
GWEN_MsgEndpoint_AddSendMessage(ep, ipcMsg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user