made attribute ns3::LteHelper::SchedulerType gettable
authorNicola Baldo <nbaldo@cttc.es>
Mon, 17 Jun 2013 12:21:22 +0200
changeset 10088 e412f46f2dc9
parent 10087 f696b6cbf564
child 10090 7eb3d1dff7d4
made attribute ns3::LteHelper::SchedulerType gettable
src/lte/helper/lte-helper.cc
src/lte/helper/lte-helper.h
--- a/src/lte/helper/lte-helper.cc	Fri Jun 14 16:13:56 2013 +0200
+++ b/src/lte/helper/lte-helper.cc	Mon Jun 17 12:21:22 2013 +0200
@@ -142,7 +142,7 @@
                    "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 @@
   m_schedulerFactory.SetTypeId (type);
 }
 
+std::string
+LteHelper::GetSchedulerType () const
+{
+  return m_schedulerFactory.GetTypeId ().GetName ();
+} 
+
 void 
 LteHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v)
 {
--- a/src/lte/helper/lte-helper.h	Fri Jun 14 16:13:56 2013 +0200
+++ b/src/lte/helper/lte-helper.h	Mon Jun 17 12:21:22 2013 +0200
@@ -99,6 +99,12 @@
   void SetSchedulerType (std::string type);
 
   /**
+   *
+   * \return the scheduler type
+   */
+  std::string GetSchedulerType () const; 
+
+  /**
    * set an attribute for the scheduler to be created
    * 
    * \param n the name of the attribute