aqhome: adapted to latest changes.

This commit is contained in:
Martin Preuss
2024-09-07 14:57:40 +02:00
parent 9b724d5a5f
commit 5f2da242c5
5 changed files with 50 additions and 66 deletions

View File

@@ -142,10 +142,21 @@ double AQH_Value3Msg_GetValue(const GWEN_MSG *msg)
void AQH_Value3Msg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText)
{
if (GWEN_Msg_GetBytesInBuffer(msg)>=AQH_MSG_VALUE3_MINSIZE) {
if (AQH_Value3Msg_GetValueType(msg)==AQH_MSG_VALUE3_TYPE_DOOR)
GWEN_Buffer_AppendArgs(dbuf, "0x%02x->0x%02x: VALUE3 %s (uid=0x%08x, msgId=%u, value_id=0x%02x type=%s value=%s)\n",
const char *sCmd;
switch(AQH_NodeMsg_GetMsgType(msg)) {
case AQH_MSG_TYPE_VALUE_REPORT: sCmd="report"; break;
case AQH_MSG_TYPE_VALUE_SET: sCmd="set"; break;
case AQH_MSG_TYPE_VALUE_SET_ACK: sCmd="ack"; break;
case AQH_MSG_TYPE_VALUE_SET_NACK: sCmd="nack"; break;
default: sCmd="unknown"; break;
}
if (AQH_Value3Msg_GetValueType(msg)==AQH_MSG_VALUE3_TYPE_DOOR)
GWEN_Buffer_AppendArgs(dbuf, "0x%02x->0x%02x: VALUE3(%s) %s (uid=0x%08x, msgId=%u, value_id=0x%02x type=%s value=%s)\n",
AQH_NodeMsg_GetSourceAddress(msg),
AQH_NodeMsg_GetDestAddress(msg),
AQH_NodeMsg_GetDestAddress(msg),
sCmd,
sText,
(unsigned int) AQH_Value3Msg_GetUid(msg),
(unsigned int)AQH_Value3Msg_GetMsgId(msg),
@@ -153,9 +164,10 @@ void AQH_Value3Msg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const ch
AQH_Value3Msg_GetValueTypeName(msg),
AQH_Value3Msg_GetValueAsWindowStateString(msg));
else
GWEN_Buffer_AppendArgs(dbuf, "0x%02x->0x%02x: VALUE3 %s (uid=0x%08x, msgId=%u, value_id=0x%02x type=%s value=%f)\n",
GWEN_Buffer_AppendArgs(dbuf, "0x%02x->0x%02x: VALUE3(%s) %s (uid=0x%08x, msgId=%u, value_id=0x%02x type=%s value=%f)\n",
AQH_NodeMsg_GetSourceAddress(msg),
AQH_NodeMsg_GetDestAddress(msg),
sCmd,
sText,
(unsigned int) AQH_Value3Msg_GetUid(msg),
(unsigned int)AQH_Value3Msg_GetMsgId(msg),