add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.
This commit is contained in:
@@ -68,17 +68,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.));
|
||||
|
||||
Reference in New Issue
Block a user