Added interface status for serial and modem interfaces

This commit is contained in:
Mark Qvist 2022-10-15 16:39:08 +02:00
parent bfa471be4d
commit 15ff9df68c

View File

@ -215,6 +215,22 @@ class SidebandService():
stat += "[b]RNode[/b]\n{rs}\n\n".format(rs=rs) stat += "[b]RNode[/b]\n{rs}\n\n".format(rs=rs)
if self.sideband.interface_modem != None:
if self.sideband.interface_modem.online:
rm = "Connected"
else:
rm = "Interface Down"
stat += "[b]Radio Modem[/b]\n{rm}\n\n".format(rm=rm)
if self.sideband.interface_serial != None:
if self.sideband.interface_serial.online:
rs = "Running at "+RNS.prettysize(self.sideband.interface_serial.bitrate/8, suffix="b")+"ps"
else:
rs = "Interface Down"
stat += "[b]Serial Port[/b]\n{rs}\n\n".format(rs=rs)
if self.sideband.interface_tcp != None: if self.sideband.interface_tcp != None:
if self.sideband.interface_tcp.online: if self.sideband.interface_tcp.online:
ts = "Connected to "+str(self.sideband.interface_tcp.target_ip)+":"+str(self.sideband.interface_tcp.target_port) ts = "Connected to "+str(self.sideband.interface_tcp.target_ip)+":"+str(self.sideband.interface_tcp.target_port)