以下代码显示了此错误:
msg="Invalid attribute set (MaxSize) on ns3::PointToPointNetDevice", file=../src/core/model/object-factory.cc, line=75
terminate called without an active exception
Command ['/usr/bin/python', 'scratch/python_first_mod2.py', '--SimulatorImplementationType=ns3::VisualSimulatorImpl'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
代码:
pointToPoint2.SetQueue ("ns3::DropTailQueue","MaxSize", ns.core.StringValue ("50p"))
pointToPoint2.SetDeviceAttribute("DataRate", ns.core.StringValue ("10Mbps"))
pointToPoint2.SetChannelAttribute("Delay", ns.core.StringValue ("2ms"))
发布于 2018-10-09 11:28:19
首先尝试实例化队列,设置属性,然后通过SetQueue()将队列传递给PointToPoint对象。
您的代码尝试在ns3::PointToPointNetDevice对象上设置属性"MaxSize“。显然,您尝试为从类ns3::QueueBase继承此属性的ns3::DropTailQueue设置属性。
https://stackoverflow.com/questions/52714160
复制