bug 153 applied to CSMA

This commit is contained in:
Craig Dowell
2008-05-08 13:26:49 -07:00
parent 3c8bfe6ae6
commit 5a16ff1df4
3 changed files with 5 additions and 5 deletions

View File

@@ -404,14 +404,14 @@ CsmaNetDevice::Attach (Ptr<CsmaChannel> ch)
}
void
CsmaNetDevice::AddQueue (Ptr<Queue> q)
CsmaNetDevice::SetQueue (Ptr<Queue> q)
{
NS_LOG_FUNCTION (this << q);
m_queue = q;
}
void CsmaNetDevice::AddReceiveErrorModel (Ptr<ErrorModel> em)
void CsmaNetDevice::SetReceiveErrorModel (Ptr<ErrorModel> em)
{
NS_LOG_FUNCTION (em);

View File

@@ -150,7 +150,7 @@ enum CsmaEncapsulationMode {
* \param queue a pointer to the queue for which object is assuming
* ownership.
*/
void AddQueue (Ptr<Queue> queue);
void SetQueue (Ptr<Queue> queue);
/**
* Attach a receive ErrorModel to the CsmaNetDevice.
*
@@ -160,7 +160,7 @@ enum CsmaEncapsulationMode {
* @see ErrorModel
* @param em a pointer to the ErrorModel
*/
void AddReceiveErrorModel(Ptr<ErrorModel> em);
void SetReceiveErrorModel(Ptr<ErrorModel> em);
/**
* Receive a packet from a connected CsmaChannel.
*

View File

@@ -174,7 +174,7 @@ CsmaHelper::Install (const NodeContainer &c, Ptr<CsmaChannel> channel)
device->SetAddress (Mac48Address::Allocate ());
node->AddDevice (device);
Ptr<Queue> queue = m_queueFactory.Create<Queue> ();
device->AddQueue (queue);
device->SetQueue (queue);
device->Attach (channel);
container.Add (device);
}