分配mx时显示错误的代码。到queu的数据包数

2024-06-16 11:24:20 发布

您现在位置:Python中文网/ 问答频道 /正文

以下代码显示此错误:

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"))

Tags: 代码coreon错误argsattributemsgns
1条回答
网友
1楼 · 发布于 2024-06-16 11:24:20

首先尝试实例化队列,设置属性,然后通过SetQueue()将队列传递给PointToPoint对象。你知道吗

您的代码尝试在ns3::PointToPointNetDevice对象上设置属性“MaxSize”。显然,您尝试为ns3::DropTailQueue设置属性,该属性从类ns3::QueueBase继承该属性。你知道吗

相关问题 更多 >