Bug 95 - where data rate is set for PointToPoint NetDevice/Channel
: where data rate is set for PointToPoint NetDevice/Channel
Status: RESOLVED FIXED
: ns-3
devices
: pre-release
: All All
: P3 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-10-26 18:01 EDT by
Modified: 2008-07-01 13:32 EDT (History)


Attachments
a more modest bug fix, plus DataRate operators (3.32 KB, patch)
2007-11-09 02:14 EDT, Tom Henderson
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-10-26 18:01:43 EDT
Presently, both the PointToPointNetDevice and PointToPointChannel have public
API allowing user to pass the DataRate object for use on the link.  The one on
the channel is supposed to be a maximum rate, according to the Doxygen, while
the one on the NetDevice is the actual.

However, when PointToPointNetDevice::Attach() is called, the channel DataRate
overwrites the NetDevice DataRate object.  And the maximum is never enforced.

I propose to remove the so-called maximum data rate (DataRate) in the channel,
and just let users set the DataRate in the NetDevice.
------- Comment #1 From 2007-11-09 02:14:25 EDT -------
Created an attachment (id=88) [details]
a more modest bug fix, plus DataRate operators

I ended up not trying to change the DataRate assignment being driven by the
channel, for this time around, since it would require then changing the
examples and topology code.  I will leave that for a future cleanup.

This patch instead just enforces that a user cannot SetDataRate() on a
NetDevice to a DataRate that exceeds the channel maximum.

And along the way, some const versions of the DataRate operators were missing
so I added them too.
------- Comment #2 From 2007-11-09 02:45:17 EDT -------
I think that you could just get rid of the non-const versions of the member
methods.
------- Comment #3 From 2007-11-15 00:18:56 EDT -------
got rid of non-const operators; patches applied as changesets 1825 and 1826