improve stats reporting
now again use three messages to transmit stats (much more efficient than sending single values, also more acurate).
This commit is contained in:
@@ -25,7 +25,13 @@ AppNetwork_SendTxdStats:
|
||||
bigcall NETMSG_SendStats_Write ; (R16, R17, R18, R19, R20, R21, Z)
|
||||
sbiw xh:xl, 1
|
||||
pop r16
|
||||
bigcall NET_Interface_AddOrReleaseOutMsg ; (R16, R17, R18, X)
|
||||
push yl
|
||||
push yh
|
||||
ldi yl, LOW(netInterfaceData)
|
||||
ldi yh, HIGH(netInterfaceData)
|
||||
bigcall NET_Interface_AddOrReleaseOutMsg ; (R16, R17, R18, X)
|
||||
pop yh
|
||||
pop yl
|
||||
AppNetwork_SendTxdStats_end:
|
||||
ret
|
||||
; @end
|
||||
@@ -35,7 +41,7 @@ AppNetwork_SendTxdStats_end:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine AppNetwork_SendRxdStats
|
||||
|
||||
; @param Y network interface to work with
|
||||
; @param Y network interface whose stats to send
|
||||
; @clobbers R16, X (R17, R18, R19, R20, R21, Z)
|
||||
|
||||
AppNetwork_SendRxdStats:
|
||||
@@ -46,7 +52,13 @@ AppNetwork_SendRxdStats:
|
||||
bigcall NETMSG_RecvStats_Write ; (R16, R17, R18, R19, R20, R21, Z)
|
||||
sbiw xh:xl, 1
|
||||
pop r16
|
||||
bigcall NET_Interface_AddOrReleaseOutMsg ; (R16, R17, R18, X)
|
||||
push yl
|
||||
push yh
|
||||
ldi yl, LOW(netInterfaceData)
|
||||
ldi yh, HIGH(netInterfaceData)
|
||||
bigcall NET_Interface_AddOrReleaseOutMsg ; (R16, R17, R18, X)
|
||||
pop yh
|
||||
pop yl
|
||||
AppNetwork_SendRxdStats_end:
|
||||
ret
|
||||
; @end
|
||||
@@ -54,9 +66,8 @@ AppNetwork_SendRxdStats_end:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine AppNetwork_SendRxdStats
|
||||
; @routine AppNetwork_SendMemStats
|
||||
|
||||
; @param Y network interface to work with
|
||||
; @clobbers R16, X (R17, R18, R19, R20, R21, Z)
|
||||
|
||||
AppNetwork_SendMemStats:
|
||||
@@ -67,7 +78,13 @@ AppNetwork_SendMemStats:
|
||||
bigcall NETMSG_MemStats_Write ; (R16, R17, R18, R19, R20, R21)
|
||||
sbiw xh:xl, 1
|
||||
pop r16
|
||||
bigcall NET_Interface_AddOrReleaseOutMsg ; (R16, R17, R18, X)
|
||||
push yl
|
||||
push yh
|
||||
ldi yl, LOW(netInterfaceData)
|
||||
ldi yh, HIGH(netInterfaceData)
|
||||
bigcall NET_Interface_AddOrReleaseOutMsg ; (R16, R17, R18, X)
|
||||
pop yh
|
||||
pop yl
|
||||
AppNetwork_SendMemStats_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
Reference in New Issue
Block a user