bug 232, references to Parameter obsolete

This commit is contained in:
Craig Dowell
2008-07-03 15:44:54 -07:00
parent 12c6c43d57
commit b2b5de9d22
19 changed files with 58 additions and 58 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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.");

View File

@@ -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.

View File

@@ -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

View File

@@ -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;

View File

@@ -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.

View File

@@ -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.

View File

@@ -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);

View File

@@ -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);

View File

@@ -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<NetDeviceContainer> deviceAdjacencyList(N-1);
for(uint32_t i=0; i<deviceAdjacencyList.size(); ++i)
{

View File

@@ -87,8 +87,8 @@ main (int argc, char *argv[])
// Explicitly create the channels required by the topology (shown above).
//
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 d = csma.Install (n);
Ipv4AddressHelper ipv4;

View File

@@ -52,13 +52,13 @@ CsmaHelper::SetQueue (std::string type,
}
void
CsmaHelper::SetDeviceParameter (std::string n1, const AttributeValue &v1)
CsmaHelper::SetDeviceAttribute (std::string n1, const AttributeValue &v1)
{
m_deviceFactory.Set (n1, v1);
}
void
CsmaHelper::SetChannelParameter (std::string n1, const AttributeValue &v1)
CsmaHelper::SetChannelAttribute (std::string n1, const AttributeValue &v1)
{
m_channelFactory.Set (n1, v1);
}

View File

@@ -65,19 +65,19 @@ public:
* \param n1 the name of the attribute to set
* \param v1 the value of the attribute to set
*
* Set these parameters on each ns3::CsmaNetDevice created
* Set these attributes on each ns3::CsmaNetDevice created
* by CsmaHelper::Install
*/
void SetDeviceParameter (std::string n1, const AttributeValue &v1);
void SetDeviceAttribute (std::string n1, const AttributeValue &v1);
/**
* \param n1 the name of the attribute to set
* \param v1 the value of the attribute to set
*
* Set these parameters on each ns3::CsmaChannel created
* Set these attributes on each ns3::CsmaChannel created
* by CsmaHelper::Install
*/
void SetChannelParameter (std::string n1, const AttributeValue &v1);
void SetChannelAttribute (std::string n1, const AttributeValue &v1);
/**
* \param filename filename prefix to use for pcap files.
@@ -160,7 +160,7 @@ public:
* \param c a set of nodes
*
* This method creates a simple ns3::CsmaChannel with the
* attributes configured by CsmaHelper::SetChannelParameter and
* attributes configured by CsmaHelper::SetChannelAttribute and
* then calls CsmaHelper::Install.
*/
NetDeviceContainer Install (const NodeContainer &c);
@@ -170,7 +170,7 @@ public:
* \param channel the channel to use as a backbone.
*
* For each node in the input container, we create a ns3::CsmaNetDevice with
* the requested parameters, a queue for this NetDevice, and associate
* the requested attributes, a queue for this NetDevice, and associate
* the resulting ns3::NetDevice with the ns3::Node and ns3::CsmaChannel.
*/
NetDeviceContainer Install (const NodeContainer &c, Ptr<CsmaChannel> channel);

View File

@@ -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 (),

View File

@@ -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);
}

View File

@@ -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.
*/

View File

@@ -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
{