mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-08-09 15:03:07 -04:00
Basic interface rate estimation
This commit is contained in:
parent
7923322d92
commit
2f71296816
5 changed files with 49 additions and 5 deletions
|
@ -705,12 +705,24 @@ class Reticulum:
|
|||
else:
|
||||
ifstats["i2p_b32"] = None
|
||||
|
||||
if hasattr(interface, "bitrate"):
|
||||
if interface.bitrate != None:
|
||||
ifstats["bitrate"] = interface.bitrate
|
||||
else:
|
||||
ifstats["bitrate"] = None
|
||||
|
||||
if hasattr(interface, "peers"):
|
||||
if interface.peers != None:
|
||||
ifstats["peers"] = len(interface.peers)
|
||||
else:
|
||||
ifstats["peers"] = None
|
||||
|
||||
ifstats["name"] = str(interface)
|
||||
ifstats["rxb"] = interface.rxb
|
||||
ifstats["txb"] = interface.txb
|
||||
ifstats["status"] = interface.online
|
||||
ifstats["mode"] = interface.mode
|
||||
|
||||
|
||||
stats.append(ifstats)
|
||||
|
||||
return stats
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue