remove Channel::GetType
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -94,8 +94,6 @@ public:
|
||||
virtual uint32_t GetNDevices (void) const;
|
||||
virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
|
||||
|
||||
virtual ChannelType GetType (void) const;
|
||||
|
||||
virtual DataRate GetDataRate (void);
|
||||
virtual Time GetDelay (void);
|
||||
|
||||
|
||||
@@ -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<NetDevice> 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:
|
||||
};
|
||||
|
||||
@@ -534,10 +534,6 @@ GlobalRouter::GetLSA (uint32_t n, GlobalRouterLSA &lsa) const
|
||||
Ptr<NetDevice>
|
||||
GlobalRouter::GetAdjacent(Ptr<NetDevice> nd, Ptr<Channel> 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,
|
||||
|
||||
Reference in New Issue
Block a user