Fix a couple of Python examples
This commit is contained in:
@@ -92,13 +92,13 @@ def main(argv):
|
||||
apps.Stop(ns3.Seconds(20.0));
|
||||
|
||||
print "Tracing"
|
||||
ascii = ns3.ofstream("simple-routing-ping6.tr");
|
||||
ns3.CsmaHelper.EnableAsciiAll(ascii);
|
||||
ns3.CsmaHelper.EnablePcapAll("simple-routing-ping6", True);
|
||||
ascii = ns3.AsciiTraceHelper()
|
||||
csma.EnableAsciiAll(ascii.CreateFileStream("simple-routing-ping6.tr"))
|
||||
csma.EnablePcapAll("simple-routing-ping6", True)
|
||||
|
||||
# Run Simulation
|
||||
ns3.Simulator.Run();
|
||||
ns3.Simulator.Destroy();
|
||||
ns3.Simulator.Run()
|
||||
ns3.Simulator.Destroy()
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
@@ -156,13 +156,9 @@ def main(argv):
|
||||
# Config::Connect("/NodeList/*/DeviceList/*/Phy/Tx", MakeCallback(&PhyTxTrace));
|
||||
# Config::Connect("/NodeList/*/DeviceList/*/Phy/State", MakeCallback(&PhyStateTrace));
|
||||
|
||||
ascii = ns3.ofstream("wifi-ap.tr")
|
||||
ns3.YansWifiPhyHelper.EnableAsciiAll(ascii)
|
||||
|
||||
ns3.Simulator.Run()
|
||||
|
||||
ns3.Simulator.Destroy()
|
||||
ascii.close()
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user