fixed recvstats message handling.
This commit is contained in:
@@ -18,14 +18,14 @@
|
|||||||
#include <gwenhywfar/debug.h>
|
#include <gwenhywfar/debug.h>
|
||||||
|
|
||||||
|
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_UID 0 /* 4 bytes */
|
#define AQH_MSG_OFFS_RECVSTATS_UID 0 /* 4 bytes */
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_IFACE 4 /* 1 byte */
|
#define AQH_MSG_OFFS_RECVSTATS_IFACE 4 /* 1 byte */
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_PACKETSIN 5 /* 2 bytes */
|
#define AQH_MSG_OFFS_RECVSTATS_PACKETSIN 5 /* 2 bytes */
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_CRCERRORS 7 /* 2 bytes */
|
#define AQH_MSG_OFFS_RECVSTATS_CRCERRORS 7 /* 2 bytes */
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_IOERRORS 9 /* 2 bytes */
|
#define AQH_MSG_OFFS_RECVSTATS_IOERRORS 9 /* 2 bytes */
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_NOBUFFER 11 /* 2 bytes */
|
#define AQH_MSG_OFFS_RECVSTATS_NOBUFFER 11 /* 2 bytes */
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_HANDLED 13 /* 2 bytes */
|
#define AQH_MSG_OFFS_RECVSTATS_MSGSIZEERRORS 13 /* 2 bytes */
|
||||||
#define AQH_MSG_OFFS_RECVSTATS_MISSED 15 /* 2 bytes */
|
#define AQH_MSG_OFFS_RECVSTATS_MISSED 15 /* 2 bytes */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -71,9 +71,9 @@ uint16_t AQH_RecvStatsMessage_GetNoBufferErrors(const AQH_MESSAGE *msg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
uint16_t AQH_RecvStatsMessage_GetHandled(const AQH_MESSAGE *msg)
|
uint16_t AQH_RecvStatsMessage_GetMsgSizeErrors(const AQH_MESSAGE *msg)
|
||||||
{
|
{
|
||||||
return AQH_Message_ReadUint16At(msg, AQH_MSG_OFFS_ALL_DATA_BEGIN+AQH_MSG_OFFS_RECVSTATS_HANDLED, 0);
|
return AQH_Message_ReadUint16At(msg, AQH_MSG_OFFS_ALL_DATA_BEGIN+AQH_MSG_OFFS_RECVSTATS_MSGSIZEERRORS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ void AQH_RecvStatsMessage_DumpToBuffer(const AQH_MESSAGE *msg, GWEN_BUFFER *dbuf
|
|||||||
{
|
{
|
||||||
GWEN_Buffer_AppendArgs(dbuf,
|
GWEN_Buffer_AppendArgs(dbuf,
|
||||||
"0x%02x->0x%02x: RECVSTATS %s"
|
"0x%02x->0x%02x: RECVSTATS %s"
|
||||||
"(uid=0x%08x, dev=%d, in=%d, crc errs=%d, io errs=%d, nobuf errs=%d, handled=%d, missed=%d)\n",
|
"(uid=0x%08x, dev=%d, in=%d, eCrc=%d, eIo=%d, eNobuf=%d, eMsgSize=%d, eMissed=%d)\n",
|
||||||
AQH_NodeMessage_GetSourceAddress(msg),
|
AQH_NodeMessage_GetSourceAddress(msg),
|
||||||
AQH_NodeMessage_GetDestAddress(msg),
|
AQH_NodeMessage_GetDestAddress(msg),
|
||||||
sText,
|
sText,
|
||||||
@@ -99,7 +99,7 @@ void AQH_RecvStatsMessage_DumpToBuffer(const AQH_MESSAGE *msg, GWEN_BUFFER *dbuf
|
|||||||
AQH_RecvStatsMessage_GetCrcErrors(msg),
|
AQH_RecvStatsMessage_GetCrcErrors(msg),
|
||||||
AQH_RecvStatsMessage_GetIoErrors(msg),
|
AQH_RecvStatsMessage_GetIoErrors(msg),
|
||||||
AQH_RecvStatsMessage_GetNoBufferErrors(msg),
|
AQH_RecvStatsMessage_GetNoBufferErrors(msg),
|
||||||
AQH_RecvStatsMessage_GetHandled(msg),
|
AQH_RecvStatsMessage_GetMsgSizeErrors(msg),
|
||||||
AQH_RecvStatsMessage_GetMissed(msg));
|
AQH_RecvStatsMessage_GetMissed(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user