UdpEchoClientHelper echoClient (interfaces.GetAddress(0), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (packets));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (0.01)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
MyProtocol mp (nodes.GetNode(0));
mp.SendMessage(destination, message, ....);
If you wanna study a routing protocol implemented for IPV4 network, I can give my source code for you to study.
That routing protocol is also a distance vector Routing protocol. The routing protocol can be found in the following link.
https://github.com/westlab/ns-3-SoR-Routing.
Regarding the helper call, actually it is not necessary to implement a helper. You can directly pass values. But you wanna have a Helper for some other purposes.
If you get any questions, please feel free to ask.
JaNa
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
NodeContainer nodes;
nodes.Create(30);
//This is the part I don't know how to achieve
MyProtocol mp (nodes.GetNode(0)); //I select the node
mp.SendMessage(message, x1, y1, x2, y2); //I specify the message and the coordinates
mp.Start(Seconds(5)); //The time when the message should be sent