style: apply black and isort

This commit is contained in:
Gabriel Ferreira
2023-11-19 20:07:19 -03:00
parent af98671fbe
commit 8f6a3413a4
68 changed files with 7848 additions and 4299 deletions

View File

@@ -24,6 +24,7 @@ except ModuleNotFoundError:
" or your PYTHONPATH might not be properly configured"
)
import sys
from ctypes import c_bool, c_int
# // Default Network Topology
# //
@@ -33,7 +34,7 @@ import sys
# // ================
# // LAN 10.1.2.0
from ctypes import c_int, c_bool
nCsma = c_int(3)
verbose = c_bool(True)
cmd = ns.CommandLine(__file__)
@@ -82,9 +83,11 @@ serverApps = echoServer.Install(csmaNodes.Get(nCsma.value))
serverApps.Start(ns.core.Seconds(1.0))
serverApps.Stop(ns.core.Seconds(10.0))
echoClient = ns.applications.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma.value).ConvertTo(), 9)
echoClient = ns.applications.UdpEchoClientHelper(
csmaInterfaces.GetAddress(nCsma.value).ConvertTo(), 9
)
echoClient.SetAttribute("MaxPackets", ns.core.UintegerValue(1))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds (1.0)))
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds(1.0)))
echoClient.SetAttribute("PacketSize", ns.core.UintegerValue(1024))
clientApps = echoClient.Install(p2pNodes.Get(0))
@@ -94,8 +97,7 @@ clientApps.Stop(ns.core.Seconds(10.0))
ns.internet.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
pointToPoint.EnablePcapAll("second")
csma.EnablePcap ("second", csmaDevices.Get (1), True)
csma.EnablePcap("second", csmaDevices.Get(1), True)
ns.core.Simulator.Run()
ns.core.Simulator.Destroy()