From 8d633f5fcd998cefce8128519bc52d05260f167a Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Thu, 8 May 2008 12:43:36 -0700 Subject: [PATCH] bug 153 --- samples/main-attribute-value.cc | 2 +- src/devices/point-to-point/point-to-point-net-device.cc | 4 ++-- src/devices/point-to-point/point-to-point-net-device.h | 4 ++-- src/devices/point-to-point/point-to-point-test.cc | 4 ++-- src/helper/point-to-point-helper.cc | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/samples/main-attribute-value.cc b/samples/main-attribute-value.cc index c3624d9b8..91bd5311a 100644 --- a/samples/main-attribute-value.cc +++ b/samples/main-attribute-value.cc @@ -68,7 +68,7 @@ main (int argc, char *argv[]) n0->AddDevice (net0); Ptr q = CreateObject (); - net0->AddQueue(q); + net0->SetQueue(q); // At this point, we have created a single node (Node 0) and a // single PointToPointNetDevice (NetDevice 0) and added a diff --git a/src/devices/point-to-point/point-to-point-net-device.cc b/src/devices/point-to-point/point-to-point-net-device.cc index b59b9d2b4..6e3337a2e 100644 --- a/src/devices/point-to-point/point-to-point-net-device.cc +++ b/src/devices/point-to-point/point-to-point-net-device.cc @@ -207,14 +207,14 @@ PointToPointNetDevice::Attach (Ptr ch) return true; } -void PointToPointNetDevice::AddQueue (Ptr q) +void PointToPointNetDevice::SetQueue (Ptr q) { NS_LOG_FUNCTION (this << q); m_queue = q; } -void PointToPointNetDevice::AddReceiveErrorModel (Ptr em) +void PointToPointNetDevice::SetReceiveErrorModel (Ptr em) { NS_LOG_FUNCTION ("(" << em << ")"); diff --git a/src/devices/point-to-point/point-to-point-net-device.h b/src/devices/point-to-point/point-to-point-net-device.h index 6d7737b3a..bcf541ff1 100644 --- a/src/devices/point-to-point/point-to-point-net-device.h +++ b/src/devices/point-to-point/point-to-point-net-device.h @@ -121,7 +121,7 @@ public: * @param queue a pointer to the queue for which object is assuming * ownership. */ - void AddQueue (Ptr queue); + void SetQueue (Ptr queue); /** * Attach a receive ErrorModel to the PointToPointNetDevice. * @@ -131,7 +131,7 @@ public: * @see ErrorModel * @param em a pointer to the ErrorModel */ - void AddReceiveErrorModel(Ptr em); + void SetReceiveErrorModel(Ptr em); /** * Receive a packet from a connected PointToPointChannel. * diff --git a/src/devices/point-to-point/point-to-point-test.cc b/src/devices/point-to-point/point-to-point-test.cc index b4ab92e70..a541ffe7f 100644 --- a/src/devices/point-to-point/point-to-point-test.cc +++ b/src/devices/point-to-point/point-to-point-test.cc @@ -44,10 +44,10 @@ PointToPointTest::RunTests (void) devA->Attach (channel); devA->SetAddress (Mac48Address::Allocate ()); - devA->AddQueue (CreateObject ()); + devA->SetQueue (CreateObject ()); devB->Attach (channel); devB->SetAddress (Mac48Address::Allocate ()); - devB->AddQueue (CreateObject ()); + devB->SetQueue (CreateObject ()); a->AddDevice (devA); b->AddDevice (devB); diff --git a/src/helper/point-to-point-helper.cc b/src/helper/point-to-point-helper.cc index 2cf5bde16..900ba13ad 100644 --- a/src/helper/point-to-point-helper.cc +++ b/src/helper/point-to-point-helper.cc @@ -170,12 +170,12 @@ PointToPointHelper::Install (Ptr a, Ptr b) devA->SetAddress (Mac48Address::Allocate ()); a->AddDevice (devA); Ptr queueA = m_queueFactory.Create (); - devA->AddQueue (queueA); + devA->SetQueue (queueA); Ptr devB = m_deviceFactory.Create (); devB->SetAddress (Mac48Address::Allocate ()); b->AddDevice (devB); Ptr queueB = m_queueFactory.Create (); - devB->AddQueue (queueB); + devB->SetQueue (queueB); Ptr channel = m_channelFactory.Create (); devA->Attach (channel); devB->Attach (channel);