From 7f07acc254a148e3835ec69fe685cee9bbbe07d4 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Wed, 9 Jul 2008 20:12:05 -0700 Subject: [PATCH] use NS_DEPRECATED for bug 232. --- src/helper/csma-helper.cc | 11 +++++++++++ src/helper/csma-helper.h | 4 ++++ src/helper/point-to-point-helper.cc | 11 +++++++++++ src/helper/point-to-point-helper.h | 4 ++++ 4 files changed, 30 insertions(+) diff --git a/src/helper/csma-helper.cc b/src/helper/csma-helper.cc index 8524a7122..5cea6ec3d 100644 --- a/src/helper/csma-helper.cc +++ b/src/helper/csma-helper.cc @@ -63,6 +63,17 @@ CsmaHelper::SetChannelAttribute (std::string n1, const AttributeValue &v1) m_channelFactory.Set (n1, v1); } +void +CsmaHelper::SetDeviceParameter (std::string n1, const AttributeValue &v1) +{ + SetDeviceAttribute (n1, v1); +} +void +CsmaHelper::SetChannelParameter (std::string n1, const AttributeValue &v1) +{ + SetChannelAttribute (n1, v1); +} + void CsmaHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid) { diff --git a/src/helper/csma-helper.h b/src/helper/csma-helper.h index 595c525ea..89cb7f138 100644 --- a/src/helper/csma-helper.h +++ b/src/helper/csma-helper.h @@ -27,6 +27,7 @@ #include "ns3/net-device-container.h" #include "ns3/node-container.h" #include "ns3/csma-channel.h" +#include "ns3/deprecated.h" namespace ns3 { @@ -79,6 +80,9 @@ public: */ void SetChannelAttribute (std::string n1, const AttributeValue &v1); + void SetDeviceParameter (std::string n1, const AttributeValue &v1) NS_DEPRECATED; + void SetChannelParameter (std::string n1, const AttributeValue &v1) NS_DEPRECATED; + /** * \param filename filename prefix to use for pcap files. * \param nodeid the id of the node to generate pcap output for. diff --git a/src/helper/point-to-point-helper.cc b/src/helper/point-to-point-helper.cc index eba654a17..ec2c1a7e6 100644 --- a/src/helper/point-to-point-helper.cc +++ b/src/helper/point-to-point-helper.cc @@ -63,6 +63,17 @@ PointToPointHelper::SetChannelAttribute (std::string n1, const AttributeValue &v m_channelFactory.Set (n1, v1); } +void +PointToPointHelper::SetDeviceParameter (std::string name, const AttributeValue &value) +{ + SetDeviceAttribute (name, value); +} +void +PointToPointHelper::SetChannelParameter (std::string name, const AttributeValue &value) +{ + SetChannelAttribute (name, value); +} + void PointToPointHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid) { diff --git a/src/helper/point-to-point-helper.h b/src/helper/point-to-point-helper.h index 7603a50d0..a86daf52a 100644 --- a/src/helper/point-to-point-helper.h +++ b/src/helper/point-to-point-helper.h @@ -23,6 +23,7 @@ #include "ns3/object-factory.h" #include "ns3/net-device-container.h" #include "ns3/node-container.h" +#include "ns3/deprecated.h" #include namespace ns3 { @@ -78,6 +79,9 @@ public: */ void SetChannelAttribute (std::string name, const AttributeValue &value); + void SetDeviceParameter (std::string name, const AttributeValue &value) NS_DEPRECATED; + void SetChannelParameter (std::string name, const AttributeValue &value) NS_DEPRECATED; + /** * \param filename filename prefix to use for pcap files. * \param nodeid the id of the node to generate pcap output for.