more work on switching to new COM and TIMER stack.

This commit is contained in:
Martin Preuss
2023-04-13 21:16:51 +02:00
parent a61226c3d9
commit c00b90bf28
9 changed files with 168 additions and 64 deletions

View File

@@ -297,21 +297,21 @@ void _processSendStatsMessage(GWEN_MSG_ENDPOINT *ep, GWEN_MSG *nodeMsg)
if (packetsOutInt) {
double packetsOut;
double collisions;
double aborted;
double busy;
double collisionsPercentage=0.0;
double abortedPercentage=0.0;
double busyPercentage=0.0;
packetsOut=(double) packetsOutInt;
collisions=(double)AQH_SendStatsMsg_GetCollisions(nodeMsg);
aborted=(double)AQH_SendStatsMsg_GetAborted(nodeMsg);
busy=(double)AQH_SendStatsMsg_GetBusyErrors(nodeMsg);
collisionsPercentage=collisions*100.0/packetsOut;
abortedPercentage=aborted*100.0/packetsOut;
busyPercentage=busy*100.0/packetsOut;
_publishInt(ep, AQH_SendStatsMsg_GetUid(nodeMsg), 0, "net/packetsOut", packetsOutInt);
_publishInt(ep, AQH_SendStatsMsg_GetUid(nodeMsg), 0, "net/collisions", (int) AQH_SendStatsMsg_GetCollisions(nodeMsg));
_publishDouble(ep, AQH_SendStatsMsg_GetUid(nodeMsg), 0, "net/collisionsPercent", collisionsPercentage);
_publishDouble(ep, AQH_SendStatsMsg_GetUid(nodeMsg), 0, "net/abortedPercent", abortedPercentage);
_publishDouble(ep, AQH_SendStatsMsg_GetUid(nodeMsg), 0, "net/busyPercent", busyPercentage);
}
}