From 1937502efed8c685badff26f7ba5aef4205d1a8d Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Mon, 17 Jun 2013 12:21:22 +0200 Subject: [PATCH] made attribute ns3::LteHelper::SchedulerType gettable --- src/lte/helper/lte-helper.cc | 8 +++++++- src/lte/helper/lte-helper.h | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lte/helper/lte-helper.cc b/src/lte/helper/lte-helper.cc index f11ade32f..f6280a676 100644 --- a/src/lte/helper/lte-helper.cc +++ b/src/lte/helper/lte-helper.cc @@ -142,7 +142,7 @@ TypeId LteHelper::GetTypeId (void) "The allowed values for this attributes are the type names " "of any class inheriting from ns3::FfMacScheduler.", StringValue ("ns3::PfFfMacScheduler"), - MakeStringAccessor (&LteHelper::SetSchedulerType), + MakeStringAccessor (&LteHelper::SetSchedulerType, &LteHelper::GetSchedulerType), MakeStringChecker ()) .AddAttribute ("PathlossModel", "The type of pathloss model to be used. " @@ -194,6 +194,12 @@ LteHelper::SetSchedulerType (std::string type) m_schedulerFactory.SetTypeId (type); } +std::string +LteHelper::GetSchedulerType () const +{ + return m_schedulerFactory.GetTypeId ().GetName (); +} + void LteHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) { diff --git a/src/lte/helper/lte-helper.h b/src/lte/helper/lte-helper.h index 3ad07bc4b..9392bf27a 100644 --- a/src/lte/helper/lte-helper.h +++ b/src/lte/helper/lte-helper.h @@ -98,6 +98,12 @@ public: */ void SetSchedulerType (std::string type); + /** + * + * \return the scheduler type + */ + std::string GetSchedulerType () const; + /** * set an attribute for the scheduler to be created *