From 93ce5ba2f730c265122cf5cf57b4e35e4ceed0ef Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 20 Jul 2018 10:54:37 +0300 Subject: [PATCH] Backed out changeset d120f5c38317 --- src/wave/helper/wave-helper.cc | 1 - src/wifi/helper/wifi-helper.cc | 23 ------------------ src/wifi/helper/wifi-helper.h | 32 +------------------------ src/wifi/helper/yans-wifi-helper.cc | 4 ---- src/wifi/model/frame-capture-model.cc | 34 +-------------------------- src/wifi/model/frame-capture-model.h | 28 ---------------------- 6 files changed, 2 insertions(+), 120 deletions(-) diff --git a/src/wave/helper/wave-helper.cc b/src/wave/helper/wave-helper.cc index 82996f40b..61bbf8d27 100644 --- a/src/wave/helper/wave-helper.cc +++ b/src/wave/helper/wave-helper.cc @@ -124,7 +124,6 @@ YansWavePhyHelper::Default (void) { YansWavePhyHelper helper; helper.SetErrorRateModel ("ns3::NistErrorRateModel"); - helper.SetFrameCaptureModel ("ns3::NoOpFrameCaptureModel"); return helper; } diff --git a/src/wifi/helper/wifi-helper.cc b/src/wifi/helper/wifi-helper.cc index 9b21180e4..f8f7ff34e 100644 --- a/src/wifi/helper/wifi-helper.cc +++ b/src/wifi/helper/wifi-helper.cc @@ -159,29 +159,6 @@ WifiPhyHelper::SetErrorRateModel (std::string name, m_errorRateModel.Set (n7, v7); } -void -WifiPhyHelper::SetFrameCaptureModel (std::string name, - std::string n0, const AttributeValue &v0, - std::string n1, const AttributeValue &v1, - std::string n2, const AttributeValue &v2, - std::string n3, const AttributeValue &v3, - std::string n4, const AttributeValue &v4, - std::string n5, const AttributeValue &v5, - std::string n6, const AttributeValue &v6, - std::string n7, const AttributeValue &v7) -{ - m_frameCaptureModel = ObjectFactory (); - m_frameCaptureModel.SetTypeId (name); - m_frameCaptureModel.Set (n0, v0); - m_frameCaptureModel.Set (n1, v1); - m_frameCaptureModel.Set (n2, v2); - m_frameCaptureModel.Set (n3, v3); - m_frameCaptureModel.Set (n4, v4); - m_frameCaptureModel.Set (n5, v5); - m_frameCaptureModel.Set (n6, v6); - m_frameCaptureModel.Set (n7, v7); -} - void WifiPhyHelper::PcapSniffTxEvent ( Ptr file, diff --git a/src/wifi/helper/wifi-helper.h b/src/wifi/helper/wifi-helper.h index 91989eb3d..f83d8a397 100644 --- a/src/wifi/helper/wifi-helper.h +++ b/src/wifi/helper/wifi-helper.h @@ -97,36 +97,7 @@ public: std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); - /** - * \param name the name of the error rate model to set. - * \param n0 the name of the attribute to set - * \param v0 the value of the attribute to set - * \param n1 the name of the attribute to set - * \param v1 the value of the attribute to set - * \param n2 the name of the attribute to set - * \param v2 the value of the attribute to set - * \param n3 the name of the attribute to set - * \param v3 the value of the attribute to set - * \param n4 the name of the attribute to set - * \param v4 the value of the attribute to set - * \param n5 the name of the attribute to set - * \param v5 the value of the attribute to set - * \param n6 the name of the attribute to set - * \param v6 the value of the attribute to set - * \param n7 the name of the attribute to set - * \param v7 the value of the attribute to set - * - * Set the error rate model and its attributes to use when Install is called. - */ - void SetFrameCaptureModel (std::string name, - std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), - std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); + /** * An enumeration of the pcap data link types (DLTs) which this helper * supports. See http://wiki.wireshark.org/Development/LibpcapFileFormat @@ -193,7 +164,6 @@ protected: ObjectFactory m_phy; ///< PHY object ObjectFactory m_errorRateModel; ///< error rate model - ObjectFactory m_frameCaptureModel; //< frame capture model factory private: /** diff --git a/src/wifi/helper/yans-wifi-helper.cc b/src/wifi/helper/yans-wifi-helper.cc index 61d5293cf..f342e9654 100644 --- a/src/wifi/helper/yans-wifi-helper.cc +++ b/src/wifi/helper/yans-wifi-helper.cc @@ -24,7 +24,6 @@ #include "ns3/propagation-loss-model.h" #include "ns3/propagation-delay-model.h" #include "ns3/error-rate-model.h" -#include "ns3/frame-capture-model.h" #include "ns3/yans-wifi-phy.h" #include "yans-wifi-helper.h" @@ -133,7 +132,6 @@ YansWifiPhyHelper::Default (void) { YansWifiPhyHelper helper; helper.SetErrorRateModel ("ns3::NistErrorRateModel"); - helper.SetFrameCaptureModel ("ns3::NoOpFrameCaptureModel"); return helper; } @@ -155,9 +153,7 @@ YansWifiPhyHelper::Create (Ptr node, Ptr device) const { Ptr phy = m_phy.Create (); Ptr error = m_errorRateModel.Create (); - Ptr capture = m_frameCaptureModel.Create (); phy->SetErrorRateModel (error); - phy->SetFrameCaptureModel (capture); phy->SetChannel (m_channel); phy->SetDevice (device); return phy; diff --git a/src/wifi/model/frame-capture-model.cc b/src/wifi/model/frame-capture-model.cc index 28c8eb156..788005f21 100644 --- a/src/wifi/model/frame-capture-model.cc +++ b/src/wifi/model/frame-capture-model.cc @@ -18,18 +18,13 @@ * Author: Sébastien Deronne */ -#include "ns3/log.h" #include "frame-capture-model.h" namespace ns3 { -NS_LOG_COMPONENT_DEFINE ("FrameCaptureModel"); - NS_OBJECT_ENSURE_REGISTERED (FrameCaptureModel); -NS_OBJECT_ENSURE_REGISTERED (NoOpFrameCaptureModel); -TypeId -FrameCaptureModel::GetTypeId (void) +TypeId FrameCaptureModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::FrameCaptureModel") .SetParent () @@ -38,31 +33,4 @@ FrameCaptureModel::GetTypeId (void) return tid; } -TypeId -NoOpFrameCaptureModel::GetTypeId (void) -{ - static TypeId tid = TypeId ("ns3::NoOpFrameCaptureModel") - .SetParent () - .SetGroupName ("Wifi") - .AddConstructor () - ; - return tid; -} - -NoOpFrameCaptureModel::NoOpFrameCaptureModel () -{ - NS_LOG_FUNCTION (this); -} - -NoOpFrameCaptureModel::~NoOpFrameCaptureModel () -{ - NS_LOG_FUNCTION (this); -} - -bool -NoOpFrameCaptureModel::CaptureNewFrame (Ptr currentEvent, Ptr newEvent) const -{ - return false; -} - } //namespace ns3 diff --git a/src/wifi/model/frame-capture-model.h b/src/wifi/model/frame-capture-model.h index 2088a1734..bad2cf8d3 100644 --- a/src/wifi/model/frame-capture-model.h +++ b/src/wifi/model/frame-capture-model.h @@ -55,34 +55,6 @@ public: virtual bool CaptureNewFrame (Ptr currentEvent, Ptr newEvent) const = 0; }; -/** - * \ingroup wifi - * \brief A frame capture model that never switches to a new incoming frame. - */ -class NoOpFrameCaptureModel : public FrameCaptureModel -{ -public: - /** - * \brief Get the type ID. - * \return the object TypeId - */ - static TypeId GetTypeId (void); - - NoOpFrameCaptureModel (); - ~NoOpFrameCaptureModel (); - - /** - * This method returns whether the reception should be switched to a - * new incoming frame. - * - * \param currentEvent the event of the current frame - * \param newEvent the event of the new incoming frame - * - * \return false - */ - bool CaptureNewFrame (Ptr currentEvent, Ptr newEvent) const; -}; - } //namespace ns3 #endif /* FRAME_CAPTURE_MODEL_H */