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 *