get rid of Attribute class. Use AttributeValue subclasses directly.

This commit is contained in:
Mathieu Lacage
2008-04-17 13:42:25 -07:00
parent db81db32a8
commit 4ff40c4a07
132 changed files with 1345 additions and 1628 deletions

View File

@@ -40,8 +40,8 @@ main (int argc, char *argv[])
internet.Install (n);
CsmaHelper csma;
csma.SetChannelParameter ("BitRate", DataRate(10000000));
csma.SetChannelParameter ("Delay", MilliSeconds(20));
csma.SetChannelParameter ("BitRate", StringValue ("10Mbps"));
csma.SetChannelParameter ("Delay", StringValue ("10ms"));
NetDeviceContainer nd = csma.Install (n);
Ipv4AddressHelper ipv4;
@@ -51,9 +51,9 @@ main (int argc, char *argv[])
uint32_t port = 7;
UdpEchoClientHelper client;
client.SetRemote (i.GetAddress (1), port);
client.SetAppAttribute ("MaxPackets", Uinteger (1));
client.SetAppAttribute ("Interval", Seconds (1.0));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (1));
client.SetAppAttribute ("Interval", StringValue ("1s"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer apps = client.Install (n.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));

View File

@@ -38,8 +38,8 @@ main (int argc, char *argv[])
internet.Install (n);
CsmaHelper csma;
csma.SetChannelParameter ("BitRate", DataRate (5000000));
csma.SetChannelParameter ("Delay", MilliSeconds (2));
csma.SetChannelParameter ("BitRate", StringValue ("5Mpbs"));
csma.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer nd = csma.Install (n);
Ipv4AddressHelper ipv4;
@@ -50,9 +50,9 @@ main (int argc, char *argv[])
UdpEchoClientHelper client;
client.SetRemote (i.GetAddress (1), port);
client.SetAppAttribute ("MaxPackets", Uinteger (1));
client.SetAppAttribute ("Interval", Seconds (1.0));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (1));
client.SetAppAttribute ("Interval", StringValue ("1s"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer apps = client.Install (n.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));

View File

@@ -36,8 +36,8 @@ main (int argc, char *argv[])
internet.Install (n);
CsmaHelper csma;
csma.SetChannelParameter ("BitRate", DataRate (5000000));
csma.SetChannelParameter ("Delay", MilliSeconds (2));
csma.SetChannelParameter ("BitRate", StringValue ("5Mbps"));
csma.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer nd = csma.Install (n);
Ipv4AddressHelper ipv4;
@@ -48,9 +48,9 @@ main (int argc, char *argv[])
UdpEchoClientHelper client;
client.SetRemote (i.GetAddress (1), port);
client.SetAppAttribute ("MaxPackets", Uinteger (1));
client.SetAppAttribute ("Interval", Seconds (1.0));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (1));
client.SetAppAttribute ("Interval", StringValue ("2s"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer apps = client.Install (n.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));

View File

@@ -36,8 +36,8 @@ main (int argc, char *argv[])
internet.Install (n);
CsmaHelper csma;
csma.SetChannelParameter ("BitRate", DataRate (5000000));
csma.SetChannelParameter ("Delay", MilliSeconds (2));
csma.SetChannelParameter ("BitRate", StringValue ("5Mbps"));
csma.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer nd = csma.Install (n);
Ipv4AddressHelper ipv4;
@@ -48,9 +48,9 @@ main (int argc, char *argv[])
UdpEchoClientHelper client;
client.SetRemote (i.GetAddress (1), port);
client.SetAppAttribute ("MaxPackets", Uinteger (1));
client.SetAppAttribute ("Interval", Seconds (1.0));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (1));
client.SetAppAttribute ("Interval", StringValue ("1s"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer apps = client.Install (n.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));

View File

@@ -53,8 +53,8 @@ main (int argc, char *argv[])
internet.Install (lan1);
CsmaHelper csma;
csma.SetChannelParameter ("BitRate", DataRate (10000000));
csma.SetChannelParameter ("Delay", MilliSeconds (2));
csma.SetChannelParameter ("BitRate", StringValue ("10Mbps"));
csma.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer dev1 = csma.Install (lan1);
Ipv4AddressHelper ipv4;
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
@@ -78,8 +78,8 @@ main (int argc, char *argv[])
//
NodeContainer backbone = NodeContainer (lan1.Get (3), lan2.Get (0));
PointToPointHelper p2p;
p2p.SetChannelParameter ("BitRate", DataRate (38400));
p2p.SetChannelParameter ("Delay", MilliSeconds (20));
p2p.SetChannelParameter ("BitRate", StringValue ("38400bps"));
p2p.SetChannelParameter ("Delay", StringValue ("20ms"));
NetDeviceContainer dev3 = p2p.Install (backbone);
ipv4.SetBase ("10.1.3.0", "255.255.255.0");
ipv4.Assign (dev3);
@@ -95,9 +95,9 @@ main (int argc, char *argv[])
UdpEchoClientHelper client;
client.SetRemote (i2.GetAddress (0), port);
client.SetAppAttribute ("MaxPackets", Uinteger (100));
client.SetAppAttribute ("Interval", Seconds (0.01));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (100));
client.SetAppAttribute ("Interval", StringValue ("10ms"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer apps = client.Install (lan1.Get (0));
apps.Start (Seconds(2.));
apps.Stop (Seconds (10.0));

View File

@@ -45,8 +45,8 @@ main (int argc, char *argv[])
internet.Install (n);
PointToPointHelper p2p;
p2p.SetChannelParameter ("BitRate", DataRate (38400));
p2p.SetChannelParameter ("Delay", MilliSeconds (20));
p2p.SetChannelParameter ("BitRate", StringValue ("38400bps"));
p2p.SetChannelParameter ("Delay", StringValue ("20ms"));
NetDeviceContainer nd = p2p.Install (n);
Ipv4AddressHelper ipv4;
@@ -56,9 +56,9 @@ main (int argc, char *argv[])
uint16_t port = 7;
UdpEchoClientHelper client;
client.SetRemote (i.GetAddress (1), port);
client.SetAppAttribute ("MaxPackets", Uinteger (1));
client.SetAppAttribute ("Interval", Seconds (1.0));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (1));
client.SetAppAttribute ("Interval", StringValue ("1s"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
ApplicationContainer apps = client.Install (n.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));

View File

@@ -56,8 +56,8 @@ main (int argc, char *argv[])
internet.Install (n);
PointToPointHelper p2p;
p2p.SetChannelParameter ("BitRate", DataRate (38400));
p2p.SetChannelParameter ("Delay", MilliSeconds (20));
p2p.SetChannelParameter ("BitRate", StringValue ("38400bps"));
p2p.SetChannelParameter ("Delay", StringValue ("20ms"));
NetDeviceContainer d01 = p2p.Install (n01);
NetDeviceContainer d02 = p2p.Install (n02);
@@ -90,9 +90,9 @@ main (int argc, char *argv[])
UdpEchoClientHelper client;
client.SetRemote (i01.GetAddress (1), port);
client.SetAppAttribute ("MaxPackets", Uinteger (1));
client.SetAppAttribute ("Interval", Seconds (1.0));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (1));
client.SetAppAttribute ("Interval", StringValue ("1s"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
apps = client.Install (n.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));

View File

@@ -55,8 +55,8 @@ main (int argc, char *argv[])
internet.Install (n);
PointToPointHelper p2p;
p2p.SetChannelParameter ("BitRate", DataRate (38400));
p2p.SetChannelParameter ("Delay", MilliSeconds (20));
p2p.SetChannelParameter ("BitRate", StringValue ("38400bps"));
p2p.SetChannelParameter ("Delay", StringValue ("20ms"));
NetDeviceContainer d01 = p2p.Install (n01);
NetDeviceContainer d02 = p2p.Install (n02);
@@ -89,9 +89,9 @@ main (int argc, char *argv[])
UdpEchoClientHelper client;
client.SetRemote (i01.GetAddress (1), port);
client.SetAppAttribute ("MaxPackets", Uinteger (1));
client.SetAppAttribute ("Interval", Seconds (1.0));
client.SetAppAttribute ("PacketSize", Uinteger (1024));
client.SetAppAttribute ("MaxPackets", UintegerValue (1));
client.SetAppAttribute ("Interval", StringValue ("1s"));
client.SetAppAttribute ("PacketSize", UintegerValue (1024));
apps = client.Install (n.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));