Dear all,
i need to simulate a wireless sensor networks.
the simulation scenario is to create a number of nodes ( 100 nodes).
All nodes must to send data to the sink.
i need to know how to create a loop that all nodes send their data packet to the sink.
the bellow is an incomplete sample of my source .
Have you please any idea.
Many thanks in advance.
LrwpanWirelessNode1 ---> Sink <----- LrwpanWirelessNode2
|
....... LrwpanWirelessNode100........
UdpServerHelper udpServer(6000);
//The Destination: Mobile Node
ApplicationContainer apps = udpServer.Install (Sink.Get(0));
Ipv6Address remoteHostAddr = i3.GetAddress (1,1);
UdpClientHelper udpClient(remoteHostAddr, 6000);
udpClient.SetAttribute ("Interval", TimeValue (Seconds(inter_Packet_Interval)));
udpClient.SetAttribute ("PacketSize", UintegerValue (packetSize));
udpClient.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
//The Source: The WirelessSensorLrwpan nodes
ApplicationContainer apps2 = udpClient.Install (WirelessLrwpan.Get(0));// Here i need to create a loop to create that each WirlesseLrwpanSensor node send each own data packet
apps.Start (Seconds (30.0));
apps2.Start (Seconds (30.0));
apps.Stop (Seconds (300.0));