From b2b5de9d2270830ad2f044c5e9715a521de54cee Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Thu, 3 Jul 2008 15:44:54 -0700 Subject: [PATCH] bug 232, references to Parameter obsolete --- examples/csma-broadcast.cc | 4 ++-- examples/csma-multicast.cc | 4 ++-- examples/csma-one-subnet.cc | 4 ++-- examples/csma-packet-socket.cc | 2 +- examples/mixed-global-routing.cc | 12 ++++++------ examples/mixed-wireless.cc | 4 ++-- examples/simple-alternate-routing.cc | 10 +++++----- examples/simple-error-model.cc | 10 +++++----- examples/simple-global-routing.cc | 8 ++++---- examples/simple-point-to-point-olsr.cc | 8 ++++---- examples/tcp-large-transfer.cc | 6 +++--- examples/tcp-star-server.cc | 4 ++-- examples/udp-echo.cc | 4 ++-- src/helper/csma-helper.cc | 4 ++-- src/helper/csma-helper.h | 12 ++++++------ src/helper/olsr-helper.h | 2 +- src/helper/point-to-point-helper.cc | 4 ++-- src/helper/point-to-point-helper.h | 12 ++++++------ src/helper/wifi-helper.h | 2 +- 19 files changed, 58 insertions(+), 58 deletions(-) diff --git a/examples/csma-broadcast.cc b/examples/csma-broadcast.cc index 963be3ff5..64c20645d 100644 --- a/examples/csma-broadcast.cc +++ b/examples/csma-broadcast.cc @@ -69,8 +69,8 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Build Topology."); CsmaHelper csma; - csma.SetChannelParameter ("DataRate", DataRateValue (DataRate(5000000))); - csma.SetChannelParameter ("Delay", TimeValue (MilliSeconds(2))); + csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate(5000000))); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds(2))); NetDeviceContainer n0 = csma.Install (c0); NetDeviceContainer n1 = csma.Install (c1); diff --git a/examples/csma-multicast.cc b/examples/csma-multicast.cc index a7775c7b8..6b92958b8 100644 --- a/examples/csma-multicast.cc +++ b/examples/csma-multicast.cc @@ -75,8 +75,8 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Build Topology."); CsmaHelper csma; - csma.SetChannelParameter ("DataRate", DataRateValue (DataRate (5000000))); - csma.SetChannelParameter ("Delay", TimeValue (MilliSeconds (2))); + csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000))); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); // We will use these NetDevice containers later, for IP addressing NetDeviceContainer nd0 = csma.Install (c0); // First LAN diff --git a/examples/csma-one-subnet.cc b/examples/csma-one-subnet.cc index bd827b904..23514b117 100644 --- a/examples/csma-one-subnet.cc +++ b/examples/csma-one-subnet.cc @@ -66,8 +66,8 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Build Topology"); CsmaHelper csma; - csma.SetChannelParameter ("DataRate", DataRateValue (5000000)); - csma.SetChannelParameter ("Delay", TimeValue (MilliSeconds (2))); + csma.SetChannelAttribute ("DataRate", DataRateValue (5000000)); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); // // Now fill out the topology by creating the net devices required to connect // the nodes to the channels and hooking them up. AddIpv4CsmaNetDevice will diff --git a/examples/csma-packet-socket.cc b/examples/csma-packet-socket.cc index f35fc77c5..a2798e216 100644 --- a/examples/csma-packet-socket.cc +++ b/examples/csma-packet-socket.cc @@ -74,7 +74,7 @@ main (int argc, char *argv[]) // use a helper function to connect our nodes to the shared channel. NS_LOG_INFO ("Build Topology."); CsmaHelper csma; - csma.SetDeviceParameter ("EncapsulationMode", StringValue ("Llc")); + csma.SetDeviceAttribute ("EncapsulationMode", StringValue ("Llc")); NetDeviceContainer devs = csma.Install (c, channel); NS_LOG_INFO ("Create Applications."); diff --git a/examples/mixed-global-routing.cc b/examples/mixed-global-routing.cc index dfa262414..18141a7d1 100644 --- a/examples/mixed-global-routing.cc +++ b/examples/mixed-global-routing.cc @@ -71,20 +71,20 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps")); - p2p.SetChannelParameter ("Delay", StringValue ("2ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer d0d2 = p2p.Install (n0n2); NetDeviceContainer d1d2 = p2p.Install (n1n2); - p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps")); - p2p.SetChannelParameter ("Delay", StringValue ("10ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("1500kbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("10ms")); NetDeviceContainer d5d6 = p2p.Install (n5n6); // We create the channels first without any IP addressing information CsmaHelper csma; - csma.SetChannelParameter ("DataRate", StringValue ("5Mbps")); - csma.SetChannelParameter ("Delay", StringValue ("2ms")); + csma.SetChannelAttribute ("DataRate", StringValue ("5Mbps")); + csma.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer d2345 = csma.Install (n2345); // Later, we add IP addresses. diff --git a/examples/mixed-wireless.cc b/examples/mixed-wireless.cc index 6b062b4d4..21ec3f850 100644 --- a/examples/mixed-wireless.cc +++ b/examples/mixed-wireless.cc @@ -200,9 +200,9 @@ main (int argc, char *argv[]) // collection. // CsmaHelper csma; - csma.SetChannelParameter ("DataRate", + csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000))); - csma.SetChannelParameter ("Delay", TimeValue (MilliSeconds (2))); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); NetDeviceContainer lanDevices = csma.Install (lan); // // Add the IPv4 protocol stack to the new LAN nodes diff --git a/examples/simple-alternate-routing.cc b/examples/simple-alternate-routing.cc index 2d130e7f0..ad5446a1a 100644 --- a/examples/simple-alternate-routing.cc +++ b/examples/simple-alternate-routing.cc @@ -97,17 +97,17 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps")); - p2p.SetChannelParameter ("Delay", StringValue ("2ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer d0d2 = p2p.Install (n0n2); NetDeviceContainer d1d2 = p2p.Install (n1n2); - p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps")); - p2p.SetChannelParameter ("Delay", StringValue ("10ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("1500kbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("10ms")); NetDeviceContainer d3d2 = p2p.Install (n3n2); - p2p.SetChannelParameter ("Delay", StringValue ("100ms")); + p2p.SetChannelAttribute ("Delay", StringValue ("100ms")); NetDeviceContainer d1d3 = p2p.Install (n1n3); InternetStackHelper internet; diff --git a/examples/simple-error-model.cc b/examples/simple-error-model.cc index 71d022200..3fbc8c355 100644 --- a/examples/simple-error-model.cc +++ b/examples/simple-error-model.cc @@ -64,7 +64,7 @@ main (int argc, char *argv[]) // RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8); - // Set a few parameters + // Set a few attributes Config::SetDefault ("ns3::RateErrorModel::ErrorRate", DoubleValue (0.01)); Config::SetDefault ("ns3::RateErrorModel::ErrorUnit", StringValue ("EU_PKT")); @@ -92,14 +92,14 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.SetDeviceParameter ("DataRate", DataRateValue (DataRate (5000000))); - p2p.SetChannelParameter ("Delay", TimeValue (MilliSeconds (2))); + p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (5000000))); + p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); NetDeviceContainer d0d2 = p2p.Install (n0n2); NetDeviceContainer d1d2 = p2p.Install (n1n2); - p2p.SetDeviceParameter ("DataRate", DataRateValue (DataRate (1500000))); - p2p.SetChannelParameter ("Delay", TimeValue (MilliSeconds (10))); + p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (1500000))); + p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (10))); NetDeviceContainer d3d2 = p2p.Install (n3n2); // Later, we add IP addresses. diff --git a/examples/simple-global-routing.cc b/examples/simple-global-routing.cc index 35fb96d94..a0ddb0d7a 100644 --- a/examples/simple-global-routing.cc +++ b/examples/simple-global-routing.cc @@ -92,14 +92,14 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps")); - p2p.SetChannelParameter ("Delay", StringValue ("2ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer d0d2 = p2p.Install (n0n2); NetDeviceContainer d1d2 = p2p.Install (n1n2); - p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps")); - p2p.SetChannelParameter ("Delay", StringValue ("10ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("1500kbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("10ms")); NetDeviceContainer d3d2 = p2p.Install (n3n2); // Later, we add IP addresses. diff --git a/examples/simple-point-to-point-olsr.cc b/examples/simple-point-to-point-olsr.cc index e11816bff..5079706ed 100644 --- a/examples/simple-point-to-point-olsr.cc +++ b/examples/simple-point-to-point-olsr.cc @@ -93,12 +93,12 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps")); - p2p.SetChannelParameter ("Delay", StringValue ("2ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer nd02 = p2p.Install (n02); NetDeviceContainer nd12 = p2p.Install (n12); - p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps")); - p2p.SetChannelParameter ("Delay", StringValue ("10ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("1500kbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("10ms")); NetDeviceContainer nd32 = p2p.Install (n32); NetDeviceContainer nd34 = p2p.Install (n34); diff --git a/examples/tcp-large-transfer.cc b/examples/tcp-large-transfer.cc index f052b478c..d4afeab08 100644 --- a/examples/tcp-large-transfer.cc +++ b/examples/tcp-large-transfer.cc @@ -90,10 +90,10 @@ int main (int argc, char *argv[]) // We create the channels first without any IP addressing information // First make and configure the helper, so that it will put the appropriate - // parameters on the network interfaces and channels we are about to install. + // attributes on the network interfaces and channels we are about to install. PointToPointHelper p2p; - p2p.SetDeviceParameter ("DataRate", DataRateValue (DataRate(10000000))); - p2p.SetChannelParameter ("Delay", TimeValue (MilliSeconds(10))); + p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate(10000000))); + p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds(10))); // And then install devices and channels connecting our topology. NetDeviceContainer dev0 = p2p.Install (n0n1); diff --git a/examples/tcp-star-server.cc b/examples/tcp-star-server.cc index 81c7f58f3..ca79d681e 100644 --- a/examples/tcp-star-server.cc +++ b/examples/tcp-star-server.cc @@ -106,8 +106,8 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps")); - p2p.SetChannelParameter ("Delay", StringValue ("2ms")); + p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); + p2p.SetChannelAttribute ("Delay", StringValue ("2ms")); std::vector deviceAdjacencyList(N-1); for(uint32_t i=0; i channel); diff --git a/src/helper/olsr-helper.h b/src/helper/olsr-helper.h index cce8e4aea..d2eaea80d 100644 --- a/src/helper/olsr-helper.h +++ b/src/helper/olsr-helper.h @@ -35,7 +35,7 @@ public: OlsrHelper (); /** - * \brief Set default OLSR routing agent parameters + * \brief Set default OLSR routing agent attributes */ void SetAgent (std::string tid, std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), diff --git a/src/helper/point-to-point-helper.cc b/src/helper/point-to-point-helper.cc index 7f1fbcd03..eba654a17 100644 --- a/src/helper/point-to-point-helper.cc +++ b/src/helper/point-to-point-helper.cc @@ -52,13 +52,13 @@ PointToPointHelper::SetQueue (std::string type, } void -PointToPointHelper::SetDeviceParameter (std::string n1, const AttributeValue &v1) +PointToPointHelper::SetDeviceAttribute (std::string n1, const AttributeValue &v1) { m_deviceFactory.Set (n1, v1); } void -PointToPointHelper::SetChannelParameter (std::string n1, const AttributeValue &v1) +PointToPointHelper::SetChannelAttribute (std::string n1, const AttributeValue &v1) { m_channelFactory.Set (n1, v1); } diff --git a/src/helper/point-to-point-helper.h b/src/helper/point-to-point-helper.h index f945a144f..7603a50d0 100644 --- a/src/helper/point-to-point-helper.h +++ b/src/helper/point-to-point-helper.h @@ -65,18 +65,18 @@ public: * \param name the name of the attribute to set * \param value the value of the attribute to set * - * Set these parameters on each ns3::PointToPointNetDevice created + * Set these attributes on each ns3::PointToPointNetDevice created * by PointToPointHelper::Install */ - void SetDeviceParameter (std::string name, const AttributeValue &value); + void SetDeviceAttribute (std::string name, const AttributeValue &value); /** * \param name the name of the attribute to set * \param value the value of the attribute to set * - * Set these parameters on each ns3::PointToPointChannel created + * Set these attribute on each ns3::PointToPointChannel created * by PointToPointHelper::Install */ - void SetChannelParameter (std::string name, const AttributeValue &value); + void SetChannelAttribute (std::string name, const AttributeValue &value); /** * \param filename filename prefix to use for pcap files. @@ -159,9 +159,9 @@ public: * \param c a set of nodes * * This method creates a ns3::PointToPointChannel with the - * attributes configured by PointToPointHelper::SetChannelParameter, + * attributes configured by PointToPointHelper::SetChannelAttribute, * then, for each node in the input container, we create a - * ns3::PointToPointNetDevice with the requested parameters, + * ns3::PointToPointNetDevice with the requested attributes, * a queue for this ns3::NetDevice, and associate the resulting * ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel. */ diff --git a/src/helper/wifi-helper.h b/src/helper/wifi-helper.h index 35ec3141b..72cc4a198 100644 --- a/src/helper/wifi-helper.h +++ b/src/helper/wifi-helper.h @@ -35,7 +35,7 @@ class WifiChannel; * * This class can help to create a large set of similar * WifiNetDevice objects and to configure a large set of - * their parameters during creation. + * their attributes during creation. */ class WifiHelper {