made attribute ns3::LteHelper::SchedulerType gettable

This commit is contained in:
Nicola Baldo
2013-06-17 12:21:22 +02:00
parent 5c2c064772
commit 1937502efe
2 changed files with 13 additions and 1 deletions

View File

@@ -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)
{

View File

@@ -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
*