add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.

This commit is contained in:
Mathieu Lacage
2008-03-13 11:10:38 -07:00
parent aa3db11715
commit fb452286e6
43 changed files with 232 additions and 328 deletions

View File

@@ -148,17 +148,15 @@ main (int argc, char *argv[])
uint16_t port = 7;
Ptr<UdpEchoClient> client =
CreateObject<UdpEchoClient> ("Node", n0,
"RemoteIpv4", Ipv4Address ("10.1.1.2"),
"RemotePort", Uinteger (port),
"MaxPackets", Uinteger (1),
"Interval", Seconds(1.),
"PacketSize", Uinteger (1024));
CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"),
"RemotePort", Uinteger (port),
"MaxPackets", Uinteger (1),
"Interval", Seconds(1.),
"PacketSize", Uinteger (1024));
n0->AddApplication (client);
Ptr<UdpEchoServer> server =
CreateObject<UdpEchoServer> ("Node", n1,
"Port", Uinteger (port));
CreateObject<UdpEchoServer> ("Port", Uinteger (port));
n1->AddApplication (server);
server->Start(Seconds(1.));