From 3378f0de1982b7a40899f67fdc06a45a0c81e6af Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Fri, 3 Aug 2007 08:23:23 -0700 Subject: [PATCH] remove Channel::GetType --- src/devices/p2p/p2p-channel.cc | 6 ------ src/devices/p2p/p2p-channel.h | 2 -- src/node/channel.h | 15 --------------- src/routing/global/global-router-interface.cc | 4 ---- 4 files changed, 27 deletions(-) diff --git a/src/devices/p2p/p2p-channel.cc b/src/devices/p2p/p2p-channel.cc index c91fe368c..cbc3eb805 100644 --- a/src/devices/p2p/p2p-channel.cc +++ b/src/devices/p2p/p2p-channel.cc @@ -171,12 +171,6 @@ PointToPointChannel::GetDevice (uint32_t i) const return m_link[i].m_src; } - Channel::ChannelType -PointToPointChannel::GetType (void) const -{ - return Channel::PointToPoint; -} - DataRate PointToPointChannel::GetDataRate (void) { diff --git a/src/devices/p2p/p2p-channel.h b/src/devices/p2p/p2p-channel.h index 6bd849741..b534df915 100644 --- a/src/devices/p2p/p2p-channel.h +++ b/src/devices/p2p/p2p-channel.h @@ -94,8 +94,6 @@ public: virtual uint32_t GetNDevices (void) const; virtual Ptr GetDevice (uint32_t i) const; - virtual ChannelType GetType (void) const; - virtual DataRate GetDataRate (void); virtual Time GetDelay (void); diff --git a/src/node/channel.h b/src/node/channel.h index 0fa8d9656..5e72e1ae5 100644 --- a/src/node/channel.h +++ b/src/node/channel.h @@ -36,12 +36,6 @@ class Channel : public Object { public: static const InterfaceId iid; - enum ChannelType - { - Unknown = 0, - PointToPoint, - Multipoint - }; Channel (); Channel (std::string name); @@ -63,18 +57,9 @@ public: */ virtual Ptr GetDevice (uint32_t i) const = 0; - /** - * \returns the abstract type of this channel. Right now this is only - * PointToPoint (p2p) or Multipoint (Ethernet). - * - * This method must be implemented by subclasses. - */ - virtual ChannelType GetType (void) const = 0; - protected: virtual ~Channel (); std::string m_name; - ChannelType m_channelType; private: }; diff --git a/src/routing/global/global-router-interface.cc b/src/routing/global/global-router-interface.cc index 7df422ec3..24a84be06 100644 --- a/src/routing/global/global-router-interface.cc +++ b/src/routing/global/global-router-interface.cc @@ -534,10 +534,6 @@ GlobalRouter::GetLSA (uint32_t n, GlobalRouterLSA &lsa) const Ptr GlobalRouter::GetAdjacent(Ptr nd, Ptr ch) const { -// -// Double-check that channel agrees with device that it's a point-to-point -// - NS_ASSERT(ch->GetType () == Channel::PointToPoint); uint32_t nDevices = ch->GetNDevices(); NS_ASSERT_MSG(nDevices == 2,