Nav
unread,Apr 15, 2009, 9:39:31 AM4/15/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ns-3-users
Hi,
The following is the script I am using to test a new protocol. I have
placed a small part of this code under markers (///). The code
compiles and starts to execute. But If i set the value of
echoClient.SetAttribute ("MaxPackets", UintegerValue (9)); or any
values above 9, i get an error message Command ['/home/Navin/Documents/
ns-3.3/build/debug/scratch/wifi-olsr'] exited with code -11 . For
Values below 9 the scripts sucessfully executes.
Does anyone know what this error is? Can someone help me with this? I
have pasted my script and full ouput below.
int
main (int argc, char *argv[])
{
LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_ALL);
LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_ALL);
RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
uint32_t nMRouters = 15;
CommandLine cmd;
cmd.AddValue ("nMRouters", "Number of mesh router devices",
nMRouters);
cmd.Parse (argc,argv);
NodeContainer meshNodes;
meshNodes.Create (nMRouters);
InternetStackHelper stack;
stack.Install (meshNodes);
YansWifiChannelHelper channel;
channel.AddPropagationLoss
("ns3::LogDistancePropagationLossModel","Exponent", DoubleValue(2.5));
channel.SetPropagationDelay
("ns3::ConstantSpeedPropagationDelayModel","Speed", DoubleValue(3e
+08));
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
phy.SetChannel (channel.Create ());
WifiHelper wifi = WifiHelper::Default ();
wifi.SetRemoteStationManager
("ns3::ConstantRateWifiManager","DataMode",StringValue
("wifia-6mbs"));
wifi.SetMac ("ns3::AdhocWifiMac");
NetDeviceContainer wifiDevices = wifi.Install (phy, meshNodes);
MobilityHelper mobility;
mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
"MinX", DoubleValue (0.0),
"MinY", DoubleValue (0.0),
"DeltaX", DoubleValue (250.0),
"DeltaY", DoubleValue (100.0),
"GridWidth", UintegerValue (5),
"LayoutType", StringValue ("RowFirst"));
mobility.SetMobilityModel ("ns3::StaticMobilityModel");
mobility.Install (meshNodes);
Ipv4AddressHelper address;
address.SetBase ("192.168.0.0", "255.255.255.0");
Ipv4InterfaceContainer wifiInterface;
wifiInterface=address.Assign(wifiDevices);
UdpEchoServerHelper echoServer (9);
ApplicationContainer serverApps = echoServer.Install (meshNodes.Get
(14));
serverApps.Start (Seconds (1.0));
serverApps.Stop (Seconds (500.0));
//////////////////////////////////////////////////////////////////////////////////////////
UdpEchoClientHelper echoClient (wifiInterface.GetAddress
(14), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (8));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (5.)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
//////////////////////////////////////////////////////////////////////////////////////
UdpEchoClientHelper echoClient1 (wifiInterface.GetAddress
(14), 9);
echoClient1.SetAttribute ("MaxPackets", UintegerValue (1));
echoClient1.SetAttribute ("Interval", TimeValue (Seconds (20.)));
echoClient1.SetAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer clientApps = echoClient.Install (meshNodes.Get
(2));
ApplicationContainer clientApps1 = echoClient1.Install
(meshNodes.Get (1));
ApplicationContainer clientApps2 = echoClient1.Install
(meshNodes.Get (0));
ApplicationContainer clientApps3 = echoClient1.Install
(meshNodes.Get (3));
ApplicationContainer clientApps4 = echoClient1.Install
(meshNodes.Get (4));
clientApps.Start (Seconds (200.0));
clientApps.Stop (Seconds (490.0));
clientApps1.Start (Seconds (140.0));
clientApps1.Stop (Seconds (490.0));
clientApps2.Start (Seconds (298.0));
clientApps2.Stop (Seconds (490.0));
clientApps3.Start (Seconds (145.0));
clientApps3.Stop (Seconds (490.0));
clientApps4.Start (Seconds (200.0));
clientApps4.Stop (Seconds (490.0));
DlsrHelper dlsr;
dlsr.InstallAll ();
Simulator::Stop (Seconds (500.0));
YansWifiPhyHelper::EnablePcapAll ("wifi2");
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
THE FULL OUTPUT
----------------------------
UdpEchoServerApplication:UdpEchoServer()
UdpEchoClientApplication:UdpEchoClient()
UdpEchoClientApplication:UdpEchoClient()
UdpEchoClientApplication:UdpEchoClient()
UdpEchoClientApplication:UdpEchoClient()
UdpEchoClientApplication:UdpEchoClient()
UdpEchoServerApplication:StartApplication()
UdpEchoClientApplication:StartApplication()
UdpEchoClientApplication:ScheduleTransmit()
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
Received 1024 bytes from 192.168.0.2
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f798, 0x92b7b80)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:StartApplication()
UdpEchoClientApplication:ScheduleTransmit()
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
Received 1024 bytes from 192.168.0.4
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f8d8, 0x93046d8)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:StartApplication()
UdpEchoClientApplication:ScheduleTransmit()
UdpEchoClientApplication:StartApplication()
UdpEchoClientApplication:ScheduleTransmit()
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
Received 1024 bytes from 192.168.0.5
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f978, 0x930ce58)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
UdpEchoClientApplication:ScheduleTransmit()
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
Received 1024 bytes from 192.168.0.3
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f708, 0x93229a0)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
UdpEchoClientApplication:StartApplication()
UdpEchoClientApplication:ScheduleTransmit()
UdpEchoClientApplication:Send()
Sent 1024 bytes to 192.168.0.15
Received 1024 bytes from 192.168.0.1
Echoing packet
SERVER READ OVER
UdpEchoClientApplication:HandleRead(0x927f838, 0x92e2a10)
Received 1024 bytes from 192.168.0.15
CLIENT READ OVER
Command ['/home/Navin/Documents/ns-3.3/build/debug/scratch/wifi-olsr']
exited with code -11
Thank you.