aqhome: adapted to latest changes in node firmware.

This commit is contained in:
Martin Preuss
2024-09-06 22:51:32 +02:00
parent 2fa3e9d4ab
commit 9b724d5a5f
16 changed files with 602 additions and 230 deletions

View File

@@ -19,6 +19,7 @@
#include "aqhome/msg/endpoint_tty.h"
#include "aqhome/msg/msg_node.h"
#include "aqhome/msg/msg_value2.h"
#include "aqhome/msg/msg_value3.h"
#include "aqhome/msg/msg_sendstats.h"
#include "aqhome/msg/msg_recvstats.h"
#include "aqhome/ipc/endpoint_ipc.h"
@@ -48,6 +49,7 @@
*/
static void _processValue2Message(AQHOMED *aqh, const GWEN_MSG *nodeMsg);
static void _processValue3Message(AQHOMED *aqh, const GWEN_MSG *nodeMsg);
static void _processSendStatsMessage(AQHOMED *aqh, const GWEN_MSG *nodeMsg);
static void _processRecvStatsMessage(AQHOMED *aqh, const GWEN_MSG *nodeMsg);
static void _publishInt(AQHOMED *aqh, uint32_t uid, int valueId, const char *valueUnits, const char *valuePath, int v);
@@ -70,6 +72,12 @@ void AqHomed_ForwardTtyMsgToBroker(AQHOMED *aqh, const GWEN_MSG *nodeMsg)
case AQH_MSG_TYPE_VALUE2:
_processValue2Message(aqh, nodeMsg);
break;
case AQH_MSG_TYPE_VALUE_REPORT:
case AQH_MSG_TYPE_VALUE_SET:
case AQH_MSG_TYPE_VALUE_SET_ACK:
case AQH_MSG_TYPE_VALUE_SET_NACK:
_processValue3Message(aqh, nodeMsg);
break;
case AQH_MSG_TYPE_COMSENDSTATS:
_processSendStatsMessage(aqh, nodeMsg);
break;
@@ -96,6 +104,18 @@ void _processValue2Message(AQHOMED *aqh, const GWEN_MSG *nodeMsg)
void _processValue3Message(AQHOMED *aqh, const GWEN_MSG *nodeMsg)
{
_publishDouble(aqh,
AQH_Value3Msg_GetUid(nodeMsg),
AQH_Value3Msg_GetValueId(nodeMsg),
AQH_Value3Msg_GetValueTypeUnits(nodeMsg),
AQH_Value3Msg_GetValueTypeName(nodeMsg),
AQH_Value3Msg_GetValue(nodeMsg));
}
void _processSendStatsMessage(AQHOMED *aqh, const GWEN_MSG *nodeMsg)
{
uint16_t packetsOutInt;