--- a/src/lte/examples/inter-cell-interference.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/examples/inter-cell-interference.cc Fri Jun 17 17:41:40 2011 +0200
@@ -38,19 +38,19 @@
double radius = 50.0;
uint32_t numUes = 1;
-
+
CommandLine cmd;
cmd.AddValue ("enbDist", "distance between the two eNBs", enbDist);
cmd.AddValue ("radius", "the radius of the disc where UEs are placed around an eNB", radius);
cmd.AddValue ("numUes", "how many UEs are attached to each eNB", numUes);
cmd.Parse (argc, argv);
-
+
ConfigStore inputConfig;
inputConfig.ConfigureDefaults ();
-
+
// parse again so you can override default values from the command line
cmd.Parse (argc, argv);
-
+
// determine the string tag that identifies this simulation run
// this tag is then appended to all filenames
@@ -58,13 +58,13 @@
GlobalValue::GetValueByName ("RngRun", runValue);
std::ostringstream tag;
- tag << "_enbDist" << std::setw(3) << std::setfill ('0') << std::fixed << std::setprecision (0) << enbDist
- << "_radius" << std::setw(3) << std::setfill ('0') << std::fixed << std::setprecision (0) << radius
- << "_numUes" << std::setw(3) << std::setfill('0') << numUes
- << "_rngRun" << std::setw(3) << std::setfill('0') << runValue.Get () ;
-
+ tag << "_enbDist" << std::setw (3) << std::setfill ('0') << std::fixed << std::setprecision (0) << enbDist
+ << "_radius" << std::setw (3) << std::setfill ('0') << std::fixed << std::setprecision (0) << radius
+ << "_numUes" << std::setw (3) << std::setfill ('0') << numUes
+ << "_rngRun" << std::setw (3) << std::setfill ('0') << runValue.Get () ;
+
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
-
+
// Create Nodes: eNodeB and UE
NodeContainer enbNodes;
NodeContainer ueNodes1, ueNodes2;
@@ -72,7 +72,7 @@
ueNodes1.Create (numUes);
ueNodes2.Create (numUes);
- // Position of eNBs
+ // Position of eNBs
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (enbDist, 0.0, 0.0));
@@ -98,8 +98,8 @@
"rho", DoubleValue (radius));
ue2mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
ue2mobility.Install (ueNodes2);
-
-
+
+
// Create Devices and install them in the Nodes (eNB and UE)
NetDeviceContainer enbDevs;
@@ -121,7 +121,7 @@
Simulator::Stop (Seconds (10));
- // Insert RLC Performance Calculator
+ // Insert RLC Performance Calculator
std::string dlOutFname = "DlRlcStats";
dlOutFname.append (tag.str ());
std::string ulOutFname = "UlRlcStats";
--- a/src/lte/examples/lena-first-sim.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/examples/lena-first-sim.cc Fri Jun 17 17:41:40 2011 +0200
@@ -40,18 +40,18 @@
ConfigStore inputConfig;
inputConfig.ConfigureDefaults ();
-
+
// parse again so you can override default values from the command line
cmd.Parse (argc, argv);
-
+
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
//lena->EnableLogComponents ();
-
+
// LogComponentEnable ("LtePhy", LOG_LEVEL_ALL);
- LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
+ LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
// LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
- LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
+ LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
// Create Nodes: eNodeB and UE
NodeContainer enbNodes;
--- a/src/lte/examples/lena-rlc-calculator.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/examples/lena-rlc-calculator.cc Fri Jun 17 17:41:40 2011 +0200
@@ -37,7 +37,7 @@
ConfigStore inputConfig;
inputConfig.ConfigureDefaults ();
-
+
// parse again so you can override default values from the command line
cmd.Parse (argc, argv);
@@ -79,9 +79,9 @@
lena->EnableRlcTraces ();
- double distance_temp [] = {10000,10000,10000}; //{10000, 10000, 10000};
+ double distance_temp [] = { 10000,10000,10000}; //{10000, 10000, 10000};
std::vector<double> userDistance;
- userDistance.assign(distance_temp, distance_temp+3);
+ userDistance.assign (distance_temp, distance_temp + 3);
for (int i = 0; i < 3; i++)
{
Ptr<ConstantPositionMobilityModel> mm = ueNodes.Get (i)->GetObject<ConstantPositionMobilityModel> ();
--- a/src/lte/examples/profiling-reference.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/examples/profiling-reference.cc Fri Jun 17 17:41:40 2011 +0200
@@ -45,13 +45,13 @@
cmd.AddValue ("nUe", "Number of UEs", nUe);
cmd.AddValue ("radius", "the radius of the disc where UEs are placed around an eNB", radius);
cmd.Parse (argc, argv);
-
+
ConfigStore inputConfig;
inputConfig.ConfigureDefaults ();
// parse again so you can override default values from the command line
cmd.Parse (argc, argv);
-
+
// determine the string tag that identifies this simulation run
// this tag is then appended to all filenames
@@ -66,7 +66,7 @@
*/
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
lena->EnableLogComponents ();
-
+
// Create Nodes: eNodeB and UE
NodeContainer enbNodes;
vector<NodeContainer> ueNodes;
@@ -76,15 +76,15 @@
{
NodeContainer ueNode;
ueNode.Create (nUe);
- ueNodes.push_back(ueNode);
+ ueNodes.push_back (ueNode);
}
- // Position of eNBs
+ // Position of eNBs
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
for (uint32_t i = 0; i < nEnb; i++)
- {
- positionAlloc->Add (Vector (enbDist*i, enbDist*i, 0.0));
- }
+ {
+ positionAlloc->Add (Vector (enbDist * i, enbDist * i, 0.0));
+ }
MobilityHelper enbMobility;
enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
@@ -97,9 +97,9 @@
{
MobilityHelper ueMob;
ueMob.SetPositionAllocator ("ns3::UniformDiscPositionAllocator",
- "X", DoubleValue (enbDist*i),
- "Y", DoubleValue (enbDist*i),
- "rho", DoubleValue (radius));
+ "X", DoubleValue (enbDist * i),
+ "Y", DoubleValue (enbDist * i),
+ "rho", DoubleValue (radius));
ueMob.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
ueMobility.push_back (ueMob);
ueMobility[i].Install (ueNodes[i]);
--- a/src/lte/helper/lena-helper.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/helper/lena-helper.cc Fri Jun 17 17:41:40 2011 +0200
@@ -91,16 +91,16 @@
.SetParent<Object> ()
.AddConstructor<LenaHelper> ()
.AddAttribute ("Scheduler",
- "The type of scheduler to be used for eNBs",
+ "The type of scheduler to be used for eNBs",
StringValue ("ns3::PfFfMacScheduler"),
- MakeStringAccessor (&LenaHelper::SetSchedulerType),
+ MakeStringAccessor (&LenaHelper::SetSchedulerType),
MakeStringChecker ())
.AddAttribute ("PropagationModel",
- "The type of propagation model to be used",
+ "The type of propagation model to be used",
StringValue ("ns3::FriisSpectrumPropagationLossModel"),
- MakeStringAccessor (&LenaHelper::SetPropagationModelType),
+ MakeStringAccessor (&LenaHelper::SetPropagationModelType),
MakeStringChecker ())
- ;
+ ;
return tid;
}
@@ -186,7 +186,7 @@
{
Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> ();
Ptr<LteSpectrumPhy> ulPhy = CreateObject<LteSpectrumPhy> ();
-
+
Ptr<LteEnbPhy> phy = CreateObject<LteEnbPhy> (dlPhy, ulPhy);
Ptr<LteCqiSinrChunkProcessor> p = Create<LteCqiSinrChunkProcessor> (phy->GetObject<LtePhy> ());
@@ -203,7 +203,7 @@
m_uplinkChannel->AddRx (ulPhy);
Ptr<LteEnbMac> mac = CreateObject<LteEnbMac> ();
- Ptr<FfMacScheduler> sched = m_schedulerFactory.Create<FfMacScheduler> ();
+ Ptr<FfMacScheduler> sched = m_schedulerFactory.Create<FfMacScheduler> ();
Ptr<LteEnbRrc> rrc = CreateObject<LteEnbRrc> ();
@@ -253,7 +253,7 @@
ulPhy->SetMobility (mm);
m_downlinkChannel->AddRx (dlPhy);
-
+
Ptr<LteUeMac> mac = CreateObject<LteUeMac> ();
Ptr<LteUeRrc> rrc = CreateObject<LteUeRrc> ();
@@ -381,14 +381,14 @@
uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2)
{
- mac->DlScheduling(frameNo, subframeNo, rnti, mcsTb1, sizeTb1, mcsTb2, sizeTb2);
+ mac->DlScheduling (frameNo, subframeNo, rnti, mcsTb1, sizeTb1, mcsTb2, sizeTb2);
}
void
LenaHelper::EnableDlMacTraces (void)
{
- Config::Connect("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling",
- MakeBoundCallback(&DlSchedulingCallback, macStats));
+ Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling",
+ MakeBoundCallback (&DlSchedulingCallback, macStats));
}
void
@@ -396,14 +396,14 @@
uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
uint8_t mcs, uint16_t size)
{
- mac->UlScheduling(frameNo, subframeNo, rnti, mcs, size);
+ mac->UlScheduling (frameNo, subframeNo, rnti, mcs, size);
}
void
LenaHelper::EnableUlMacTraces (void)
{
- Config::Connect("/NodeList/0/DeviceList/0/LteEnbMac/UlScheduling",
- MakeBoundCallback(&UlSchedulingCallback, macStats));
+ Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/UlScheduling",
+ MakeBoundCallback (&UlSchedulingCallback, macStats));
}
void
@@ -421,13 +421,13 @@
// /NodeList/#NodeId/DeviceList/#DeviceId/LteEnbRrc/UeMap/#C-RNTI/RadioBearerMap/#LCID/LteRlc/RxPDU
// We retrieve the UeInfo accociated to the C-RNTI and perform the IMSI lookup
- std::string ueMapPath = path.substr (0, path.find("/RadioBearerMap"));
+ std::string ueMapPath = path.substr (0, path.find ("/RadioBearerMap"));
Config::MatchContainer match = Config::LookupMatches (ueMapPath);
if (match.GetN () != 0)
{
- Ptr<Object> ueInfo = match.Get(0);
- return ueInfo->GetObject<UeInfo> ()->GetImsi ();
+ Ptr<Object> ueInfo = match.Get (0);
+ return ueInfo->GetObject<UeInfo> ()->GetImsi ();
}
else
{
@@ -443,13 +443,13 @@
// /NodeList/#NodeId/DeviceList/#DeviceId/LteUeRrc/RlcMap/#LCID/RxPDU
// We retrieve the LteUeNetDevice path
- std::string lteUeNetDevicePath = path.substr (0, path.find("/LteUeRrc"));
+ std::string lteUeNetDevicePath = path.substr (0, path.find ("/LteUeRrc"));
Config::MatchContainer match = Config::LookupMatches (lteUeNetDevicePath);
if (match.GetN () != 0)
{
- Ptr<Object> ueNetDevice = match.Get(0);
- return ueNetDevice->GetObject<LteUeNetDevice> ()->GetImsi ();
+ Ptr<Object> ueNetDevice = match.Get (0);
+ return ueNetDevice->GetObject<LteUeNetDevice> ()->GetImsi ();
}
else
{
@@ -461,7 +461,7 @@
void
DlTxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
- uint16_t rnti, uint8_t lcid, uint32_t packetSize)
+ uint16_t rnti, uint8_t lcid, uint32_t packetSize)
{
uint64_t imsi = FindImsiFromEnbRlcPath (path);
rlcStats->DlTxPdu (imsi, rnti, lcid, packetSize);
@@ -469,7 +469,7 @@
void
DlRxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
- uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
+ uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
{
uint64_t imsi = FindImsiFromUeRlc (path);
rlcStats->DlRxPdu (imsi, rnti, lcid, packetSize, delay);
@@ -479,22 +479,22 @@
LenaHelper::EnableDlRlcTraces (void)
{
Config::Connect ("/NodeList/*/DeviceList/*/LteEnbRrc/UeMap/*/RadioBearerMap/*/LteRlc/TxPDU",
- MakeBoundCallback(&DlTxPduCallback, rlcStats));
+ MakeBoundCallback (&DlTxPduCallback, rlcStats));
Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/RlcMap/*/RxPDU",
- MakeBoundCallback(&DlRxPduCallback, rlcStats));
+ MakeBoundCallback (&DlRxPduCallback, rlcStats));
}
void
-UlTxPduCallback(Ptr<RlcStatsCalculator> rlcStats, std::string path,
- uint16_t rnti, uint8_t lcid, uint32_t packetSize)
+UlTxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
+ uint16_t rnti, uint8_t lcid, uint32_t packetSize)
{
uint64_t imsi = FindImsiFromUeRlc (path);
rlcStats->UlTxPdu (imsi, rnti, lcid, packetSize);
}
void
-UlRxPduCallback(Ptr<RlcStatsCalculator> rlcStats, std::string path,
- uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
+UlRxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
+ uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
{
uint64_t imsi = FindImsiFromEnbRlcPath (path);
rlcStats->UlRxPdu (imsi, rnti, lcid, packetSize, delay);
@@ -505,10 +505,10 @@
void
LenaHelper::EnableUlRlcTraces (void)
{
- Config::Connect("/NodeList/*/DeviceList/*/LteUeRrc/RlcMap/*/TxPDU",
- MakeBoundCallback(&UlTxPduCallback, rlcStats));
+ Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/RlcMap/*/TxPDU",
+ MakeBoundCallback (&UlTxPduCallback, rlcStats));
Config::Connect ("/NodeList/0/DeviceList/*/LteEnbRrc/UeMap/*/RadioBearerMap/*/LteRlc/RxPDU",
- MakeBoundCallback(&UlRxPduCallback, rlcStats));
+ MakeBoundCallback (&UlRxPduCallback, rlcStats));
}
Ptr<RlcStatsCalculator>
--- a/src/lte/helper/lena-helper.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/helper/lena-helper.h Fri Jun 17 17:41:40 2011 +0200
@@ -120,14 +120,14 @@
* \param bearer the characteristics of the bearer to be activated
*/
void ActivateEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer);
-
+
/**
*
*
* \param type the type of scheduler to be used for the eNBs
*/
void SetSchedulerType (std::string type);
-
+
/**
* set an attribute for the scheduler to be created
*/
@@ -139,7 +139,7 @@
* \param type the type of propagation model to be used for the eNBs
*/
void SetPropagationModelType (std::string type);
-
+
/**
* set an attribute for the propagation model to be created
*/
@@ -185,12 +185,10 @@
Ptr<RlcStatsCalculator> GetRlcStats (void);
protected:
-
// inherited from Object
virtual void DoStart (void);
private:
-
Ptr<NetDevice> InstallSingleEnbDevice (Ptr<Node> n);
Ptr<NetDevice> InstallSingleUeDevice (Ptr<Node> n);
@@ -198,7 +196,7 @@
Ptr<SpectrumChannel> m_downlinkChannel;
Ptr<SpectrumChannel> m_uplinkChannel;
-
+
ObjectFactory m_schedulerFactory;
ObjectFactory m_propagationModelFactory;
--- a/src/lte/helper/mac-stats-calculator.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/helper/mac-stats-calculator.cc Fri Jun 17 17:41:40 2011 +0200
@@ -29,17 +29,17 @@
NS_OBJECT_ENSURE_REGISTERED (MacStatsCalculator);
-MacStatsCalculator::MacStatsCalculator() :
- m_dlOutputFilename (""),
- m_dlFirstWrite(true),
+MacStatsCalculator::MacStatsCalculator ()
+ : m_dlOutputFilename (""),
+ m_dlFirstWrite (true),
m_ulOutputFilename (""),
- m_ulFirstWrite(true)
+ m_ulFirstWrite (true)
{
NS_LOG_FUNCTION (this);
}
-MacStatsCalculator::~MacStatsCalculator()
+MacStatsCalculator::~MacStatsCalculator ()
{
NS_LOG_FUNCTION (this);
}
@@ -60,7 +60,7 @@
StringValue ("UlMacStats.csv"),
MakeStringAccessor (&MacStatsCalculator::SetUlOutputFilename),
MakeStringChecker ())
- ;
+ ;
return tid;
}
@@ -87,11 +87,11 @@
if ( m_dlFirstWrite == true )
{
outFile.open (m_dlOutputFilename.c_str ());
- if (! outFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
- return;
- }
+ if (!outFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
+ return;
+ }
m_dlFirstWrite = false;
outFile << "# time\tframe\tsframe\tRNTI\tmcsTb1\tsizeTb1\tmcsTb2\tsizeTb2";
outFile << std::endl;
@@ -99,22 +99,22 @@
else
{
outFile.open (m_dlOutputFilename.c_str (), std::ios_base::app);
- if (! outFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
- return;
- }
+ if (!outFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
+ return;
+ }
}
- outFile << Simulator::Now ().GetNanoSeconds () / (double) 1e9 << "\t";
- outFile << frameNo << "\t";
- outFile << subframeNo << "\t";
- outFile << rnti<< "\t";
- outFile << (uint32_t) mcsTb1 << "\t";
- outFile << sizeTb1 << "\t";
- outFile << (uint32_t) mcsTb2 << "\t";
- outFile << sizeTb2 << std::endl;
- outFile.close ();
+ outFile << Simulator::Now ().GetNanoSeconds () / (double) 1e9 << "\t";
+ outFile << frameNo << "\t";
+ outFile << subframeNo << "\t";
+ outFile << rnti << "\t";
+ outFile << (uint32_t) mcsTb1 << "\t";
+ outFile << sizeTb1 << "\t";
+ outFile << (uint32_t) mcsTb2 << "\t";
+ outFile << sizeTb2 << std::endl;
+ outFile.close ();
}
void
@@ -128,11 +128,11 @@
if ( m_ulFirstWrite == true )
{
outFile.open (m_ulOutputFilename.c_str ());
- if (! outFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
- return;
- }
+ if (!outFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
+ return;
+ }
m_ulFirstWrite = false;
outFile << "# time\tframe\tsframe\tRNTI\tmcs\tsize";
outFile << std::endl;
@@ -140,20 +140,20 @@
else
{
outFile.open (m_ulOutputFilename.c_str (), std::ios_base::app);
- if (! outFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
- return;
- }
+ if (!outFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
+ return;
+ }
}
- outFile << Simulator::Now ().GetNanoSeconds () / (double) 1e9 << "\t";
- outFile << frameNo << "\t";
- outFile << subframeNo << "\t";
- outFile << rnti<< "\t";
- outFile << (uint32_t) mcs << "\t";
- outFile << size << std::endl;
- outFile.close ();
+ outFile << Simulator::Now ().GetNanoSeconds () / (double) 1e9 << "\t";
+ outFile << frameNo << "\t";
+ outFile << subframeNo << "\t";
+ outFile << rnti << "\t";
+ outFile << (uint32_t) mcs << "\t";
+ outFile << size << std::endl;
+ outFile.close ();
}
--- a/src/lte/helper/mac-stats-calculator.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/helper/mac-stats-calculator.h Fri Jun 17 17:41:40 2011 +0200
@@ -99,7 +99,6 @@
private:
-
std::string m_dlOutputFilename;
bool m_dlFirstWrite;
--- a/src/lte/helper/rlc-stats-calculator.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/helper/rlc-stats-calculator.cc Fri Jun 17 17:41:40 2011 +0200
@@ -27,13 +27,13 @@
namespace ns3 {
- ImsiLcidPair::ImsiLcidPair ()
+ImsiLcidPair::ImsiLcidPair ()
{
}
- ImsiLcidPair::ImsiLcidPair (const uint64_t a, const uint8_t b)
- : m_imsi(a),
- m_lcId(b)
+ImsiLcidPair::ImsiLcidPair (const uint64_t a, const uint8_t b)
+ : m_imsi (a),
+ m_lcId (b)
{
}
@@ -54,16 +54,16 @@
NS_OBJECT_ENSURE_REGISTERED (RlcStatsCalculator);
-RlcStatsCalculator::RlcStatsCalculator() :
- m_dlOutputFilename (""),
+RlcStatsCalculator::RlcStatsCalculator ()
+ : m_dlOutputFilename (""),
m_ulOutputFilename (""),
- m_firstWrite(true)
+ m_firstWrite (true)
{
NS_LOG_FUNCTION (this);
}
-RlcStatsCalculator::~RlcStatsCalculator()
+RlcStatsCalculator::~RlcStatsCalculator ()
{
NS_LOG_FUNCTION (this);
ShowResults ();
@@ -87,14 +87,14 @@
MakeStringChecker ())
.AddAttribute ("StartTime",
"Start time of the on going epoch.",
- TimeValue ( Seconds(0.) ),
+ TimeValue ( Seconds (0.) ),
MakeTimeAccessor (&RlcStatsCalculator::m_startTime),
MakeTimeChecker ())
- .AddAttribute("EpochDuration",
- "Epoch duration.", TimeValue(Seconds(0.25)),
- MakeTimeAccessor(&RlcStatsCalculator::m_epochDuration),
- MakeTimeChecker())
- ;
+ .AddAttribute ("EpochDuration",
+ "Epoch duration.", TimeValue (Seconds (0.25)),
+ MakeTimeAccessor (&RlcStatsCalculator::m_epochDuration),
+ MakeTimeChecker ())
+ ;
return tid;
}
@@ -148,8 +148,8 @@
m_ulRxPackets[p]++;
m_ulRxData[p] += packetSize;
- Uint64StatsMap::iterator it = m_ulDelay.find(p);
- if (it == m_ulDelay.end())
+ Uint64StatsMap::iterator it = m_ulDelay.find (p);
+ if (it == m_ulDelay.end ())
{
NS_LOG_DEBUG (this << " Creating UL stats calculators for IMSI " << p.m_imsi << " and LCI " << (uint32_t) p.m_lcId );
m_ulDelay[p] = CreateObject<MinMaxAvgTotalCalculator<uint64_t> > ();
@@ -172,14 +172,14 @@
m_dlRxPackets[p]++;
m_dlRxData[p] += packetSize;
- Uint64StatsMap::iterator it = m_dlDelay.find(p);
- if (it == m_dlDelay.end())
+ Uint64StatsMap::iterator it = m_dlDelay.find (p);
+ if (it == m_dlDelay.end ())
{
NS_LOG_DEBUG (this << " Creating DL stats calculators for IMSI " << p.m_imsi << " and LCI " << (uint32_t) p.m_lcId );
m_dlDelay[p] = CreateObject<MinMaxAvgTotalCalculator<uint64_t> > ();
m_dlPduSize[p] = CreateObject<MinMaxAvgTotalCalculator<uint32_t> > ();
}
- m_dlDelay[p]->Update(delay);
+ m_dlDelay[p]->Update (delay);
m_dlPduSize[p]->Update (packetSize);
}
CheckEpoch ();
@@ -192,25 +192,25 @@
NS_LOG_FUNCTION (this << m_ulOutputFilename.c_str () << m_dlOutputFilename.c_str () );
NS_LOG_INFO ("Write Rlc Stats in " << m_ulOutputFilename.c_str () <<
" and in " << m_dlOutputFilename.c_str ());
-
+
std::ofstream ulOutFile;
std::ofstream dlOutFile;
if ( m_firstWrite == true )
{
ulOutFile.open (m_ulOutputFilename.c_str ());
- if (! ulOutFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
- return;
- }
+ if (!ulOutFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
+ return;
+ }
dlOutFile.open (m_dlOutputFilename.c_str ());
- if (! dlOutFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
- return;
- }
+ if (!dlOutFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
+ return;
+ }
m_firstWrite = false;
ulOutFile << "% start\tend\tIMSI\tRNTI\tLCID\tnTxPDUs\tTxBytes\tnRxPDUs\tRxBytes\t";
ulOutFile << "delay\tstdDev\tmin\tmax\t";
@@ -224,22 +224,22 @@
else
{
ulOutFile.open (m_ulOutputFilename.c_str (), std::ios_base::app);
- if (! ulOutFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
- return;
- }
+ if (!ulOutFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_ulOutputFilename.c_str ());
+ return;
+ }
dlOutFile.open (m_dlOutputFilename.c_str (), std::ios_base::app);
- if (! dlOutFile.is_open ())
- {
- NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
- return;
- }
+ if (!dlOutFile.is_open ())
+ {
+ NS_LOG_ERROR ("Can't open file " << m_dlOutputFilename.c_str ());
+ return;
+ }
}
- WriteUlResults(ulOutFile);
- WriteDlResults(dlOutFile);
+ WriteUlResults (ulOutFile);
+ WriteDlResults (dlOutFile);
}
@@ -249,7 +249,7 @@
// Get the unique IMSI / LCID list
std::vector<ImsiLcidPair > pairVector;
- for (Uint32Map::iterator it = m_ulTxPackets.begin(); it != m_ulTxPackets.end(); ++it)
+ for (Uint32Map::iterator it = m_ulTxPackets.begin (); it != m_ulTxPackets.end (); ++it)
{
if (find (pairVector.begin (), pairVector.end (), (*it).first ) == pairVector.end () )
{
@@ -258,11 +258,11 @@
}
Time endTime = m_startTime + m_epochDuration;
- for (std::vector<ImsiLcidPair>::iterator it = pairVector.begin(); it != pairVector.end(); ++it)
+ for (std::vector<ImsiLcidPair>::iterator it = pairVector.begin (); it != pairVector.end (); ++it)
{
ImsiLcidPair p = *it;
outFile << m_startTime.GetNanoSeconds () / 1.0e9 << "\t";
- outFile << endTime.GetNanoSeconds() / 1.0e9 << "\t";
+ outFile << endTime.GetNanoSeconds () / 1.0e9 << "\t";
outFile << p.m_imsi << "\t";
outFile << m_flowId[p].m_rnti << "\t";
outFile << (uint32_t) m_flowId[p].m_lcId << "\t";
@@ -271,12 +271,12 @@
outFile << GetUlRxPackets (p.m_imsi, p.m_lcId) << "\t";
outFile << GetUlRxData (p.m_imsi, p.m_lcId) << "\t";
std::vector<double> stats = GetUlDelayStats (p.m_imsi, p.m_lcId);
- for( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
+ for ( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
{
outFile << (*it) * 1e-9 << "\t";
}
stats = GetUlPduSizeStats (p.m_imsi, p.m_lcId);
- for( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
+ for ( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
{
outFile << (*it) << "\t";
}
@@ -291,7 +291,7 @@
{
// Get the unique IMSI list
std::vector<ImsiLcidPair > pairVector;
- for (Uint32Map::iterator it = m_dlTxPackets.begin(); it != m_dlTxPackets.end(); ++it)
+ for (Uint32Map::iterator it = m_dlTxPackets.begin (); it != m_dlTxPackets.end (); ++it)
{
if (find (pairVector.begin (), pairVector.end (), (*it).first ) == pairVector.end () )
{
@@ -300,11 +300,11 @@
}
Time endTime = m_startTime + m_epochDuration;
- for (std::vector<ImsiLcidPair>::iterator pair = pairVector.begin(); pair != pairVector.end(); ++pair)
+ for (std::vector<ImsiLcidPair>::iterator pair = pairVector.begin (); pair != pairVector.end (); ++pair)
{
ImsiLcidPair p = *pair;
outFile << m_startTime.GetNanoSeconds () / 1.0e9 << "\t";
- outFile << endTime.GetNanoSeconds() / 1.0e9 << "\t";
+ outFile << endTime.GetNanoSeconds () / 1.0e9 << "\t";
outFile << p.m_imsi << "\t";
outFile << m_flowId[p].m_rnti << "\t";
outFile << (uint32_t) m_flowId[p].m_lcId << "\t";
@@ -313,12 +313,12 @@
outFile << GetDlRxPackets (p.m_imsi, p.m_lcId) << "\t";
outFile << GetDlRxData (p.m_imsi, p.m_lcId) << "\t";
std::vector<double> stats = GetDlDelayStats (p.m_imsi, p.m_lcId);
- for( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
+ for ( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
{
outFile << (*it) * 1e-9 << "\t";
}
stats = GetDlPduSizeStats (p.m_imsi, p.m_lcId);
- for( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
+ for ( std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it )
{
outFile << (*it) << "\t";
}
@@ -331,19 +331,19 @@
void
RlcStatsCalculator::ResetResults (void)
{
- m_ulTxPackets.erase (m_ulTxPackets.begin (), m_ulTxPackets.end () );
- m_ulRxPackets.erase (m_ulRxPackets.begin (), m_ulRxPackets.end () );
- m_ulRxData.erase (m_ulRxData.begin (), m_ulRxData.end () );
- m_ulTxData.erase (m_ulTxData.begin (), m_ulTxData.end () );
- m_ulDelay.erase (m_ulDelay.begin (), m_ulDelay.end () );
- m_ulPduSize.erase (m_ulPduSize.begin (), m_ulPduSize.end () );
+ m_ulTxPackets.erase (m_ulTxPackets.begin (), m_ulTxPackets.end () );
+ m_ulRxPackets.erase (m_ulRxPackets.begin (), m_ulRxPackets.end () );
+ m_ulRxData.erase (m_ulRxData.begin (), m_ulRxData.end () );
+ m_ulTxData.erase (m_ulTxData.begin (), m_ulTxData.end () );
+ m_ulDelay.erase (m_ulDelay.begin (), m_ulDelay.end () );
+ m_ulPduSize.erase (m_ulPduSize.begin (), m_ulPduSize.end () );
- m_dlTxPackets.erase (m_dlTxPackets.begin (), m_dlTxPackets.end () );
- m_dlRxPackets.erase (m_dlRxPackets.begin (), m_dlRxPackets.end () );
- m_dlRxData.erase (m_dlRxData.begin (), m_dlRxData.end () );
- m_dlTxData.erase (m_dlTxData.begin (), m_dlTxData.end () );
- m_dlDelay.erase (m_dlDelay.begin (), m_dlDelay.end () );
- m_dlPduSize.erase (m_dlPduSize.begin (), m_dlPduSize.end () );
+ m_dlTxPackets.erase (m_dlTxPackets.begin (), m_dlTxPackets.end () );
+ m_dlRxPackets.erase (m_dlRxPackets.begin (), m_dlRxPackets.end () );
+ m_dlRxData.erase (m_dlRxData.begin (), m_dlRxData.end () );
+ m_dlTxData.erase (m_dlTxData.begin (), m_dlTxData.end () );
+ m_dlDelay.erase (m_dlDelay.begin (), m_dlDelay.end () );
+ m_dlPduSize.erase (m_dlPduSize.begin (), m_dlPduSize.end () );
}
void
@@ -352,9 +352,9 @@
if ( Simulator::Now () > m_startTime + m_epochDuration )
{
std::cout << "JNNNNNNNNNG New epoch! startTime " << m_startTime << " epoch duration " << m_epochDuration << std::endl;
- ShowResults();
- ResetResults();
- StartEpoch();
+ ShowResults ();
+ ResetResults ();
+ StartEpoch ();
}
}
@@ -400,7 +400,7 @@
Uint64StatsMap::iterator it = m_ulDelay.find (p);
if ( it == m_ulDelay.end () )
{
- NS_LOG_ERROR("UL delay for " << imsi << " - " << lcid << " not found");
+ NS_LOG_ERROR ("UL delay for " << imsi << " - " << lcid << " not found");
return 0;
}
@@ -415,14 +415,14 @@
Uint64StatsMap::iterator it = m_ulDelay.find (p);
if ( it == m_ulDelay.end () )
{
- NS_LOG_ERROR("UL delay for " << imsi << " - " << lcid << " not found");
+ NS_LOG_ERROR ("UL delay for " << imsi << " - " << lcid << " not found");
return stats;
}
- stats.push_back(m_ulDelay[p]->getMean ());
- stats.push_back(m_ulDelay[p]->getStddev ());
- stats.push_back(m_ulDelay[p]->getMin ());
- stats.push_back(m_ulDelay[p]->getMax ());
+ stats.push_back (m_ulDelay[p]->getMean ());
+ stats.push_back (m_ulDelay[p]->getStddev ());
+ stats.push_back (m_ulDelay[p]->getMin ());
+ stats.push_back (m_ulDelay[p]->getMax ());
return stats;
}
@@ -434,7 +434,7 @@
Uint32StatsMap::iterator it = m_ulPduSize.find (p);
if ( it == m_ulPduSize.end () )
{
- NS_LOG_ERROR("UL PDU Size for " << imsi << " - " << lcid << " not found");
+ NS_LOG_ERROR ("UL PDU Size for " << imsi << " - " << lcid << " not found");
return stats;
}
@@ -480,7 +480,7 @@
Uint64StatsMap::iterator it = m_dlDelay.find (p);
if ( it == m_dlDelay.end () )
{
- NS_LOG_ERROR("DL delay for " << imsi << " not found");
+ NS_LOG_ERROR ("DL delay for " << imsi << " not found");
return 0;
}
return m_dlDelay[p]->getMean ();
@@ -495,14 +495,14 @@
if ( it == m_dlDelay.end () )
{
- NS_LOG_ERROR("DL delay for " << imsi << " not found");
+ NS_LOG_ERROR ("DL delay for " << imsi << " not found");
return stats;
}
- stats.push_back(m_dlDelay[p]->getMean ());
- stats.push_back(m_dlDelay[p]->getStddev ());
- stats.push_back(m_dlDelay[p]->getMin ());
- stats.push_back(m_dlDelay[p]->getMax ());
+ stats.push_back (m_dlDelay[p]->getMean ());
+ stats.push_back (m_dlDelay[p]->getStddev ());
+ stats.push_back (m_dlDelay[p]->getMin ());
+ stats.push_back (m_dlDelay[p]->getMax ());
return stats;
}
@@ -515,14 +515,14 @@
if ( it == m_dlPduSize.end () )
{
- NS_LOG_ERROR("DL delay for " << imsi << " not found");
+ NS_LOG_ERROR ("DL delay for " << imsi << " not found");
return stats;
}
- stats.push_back(m_dlPduSize[p]->getMean ());
- stats.push_back(m_dlPduSize[p]->getStddev ());
- stats.push_back(m_dlPduSize[p]->getMin ());
- stats.push_back(m_dlPduSize[p]->getMax ());
+ stats.push_back (m_dlPduSize[p]->getMean ());
+ stats.push_back (m_dlPduSize[p]->getStddev ());
+ stats.push_back (m_dlPduSize[p]->getMin ());
+ stats.push_back (m_dlPduSize[p]->getMax ());
return stats;
}
--- a/src/lte/helper/rlc-stats-calculator.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/helper/rlc-stats-calculator.h Fri Jun 17 17:41:40 2011 +0200
@@ -30,7 +30,7 @@
#include <fstream>
namespace ns3 {
-
+
struct ImsiLcidPair
{
@@ -66,7 +66,6 @@
class RlcStatsCalculator : public Object
{
public:
-
/**
* Class constructor
*/
@@ -77,9 +76,9 @@
*/
virtual ~RlcStatsCalculator ();
- /**
- * Inherited from ns3::Object
- */
+ /**
+ * Inherited from ns3::Object
+ */
static TypeId GetTypeId (void);
/**
--- a/src/lte/test/lte-test-downlink-sinr.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-downlink-sinr.cc Fri Jun 17 17:41:40 2011 +0200
@@ -201,7 +201,7 @@
{
// Create phy tag (different for each packet burst)
// and add to the first packet
- pktTag[pb] = LtePhyTag (100 * (pb+1));
+ pktTag[pb] = LtePhyTag (100 * (pb + 1));
pkt[pb][i]->AddPacketTag ( pktTag[pb] );
}
@@ -246,12 +246,12 @@
*/
// eNB sends data to 2 UEs through 2 subcarriers
- Simulator::Schedule (ts, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[0], m_sv, dlPhy->GetSpectrumType(), ds);
+ Simulator::Schedule (ts, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[0], m_sv, dlPhy->GetSpectrumType (), ds);
- Simulator::Schedule (ti1, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[1], i1, dlPhy->GetSpectrumType(), di1);
- Simulator::Schedule (ti2, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[2], i2, dlPhy->GetSpectrumType(), di2);
- Simulator::Schedule (ti3, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[3], i3, dlPhy->GetSpectrumType(), di3);
- Simulator::Schedule (ti4, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[4], i4, dlPhy->GetSpectrumType(), di4);
+ Simulator::Schedule (ti1, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[1], i1, dlPhy->GetSpectrumType (), di1);
+ Simulator::Schedule (ti2, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[2], i2, dlPhy->GetSpectrumType (), di2);
+ Simulator::Schedule (ti3, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[3], i3, dlPhy->GetSpectrumType (), di3);
+ Simulator::Schedule (ti4, &LteSpectrumPhy::StartRx, dlPhy, packetBursts[4], i4, dlPhy->GetSpectrumType (), di4);
Simulator::Stop (Seconds (5.0));
Simulator::Run ();
--- a/src/lte/test/lte-test-downlink-sinr.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-downlink-sinr.h Fri Jun 17 17:41:40 2011 +0200
@@ -41,16 +41,16 @@
class LteDownlinkSinrTestCase : public TestCase
{
- public:
- LteDownlinkSinrTestCase (Ptr<SpectrumValue> sv, Ptr<SpectrumValue> sinr, std::string name);
- virtual ~LteDownlinkSinrTestCase ();
+public:
+ LteDownlinkSinrTestCase (Ptr<SpectrumValue> sv, Ptr<SpectrumValue> sinr, std::string name);
+ virtual ~LteDownlinkSinrTestCase ();
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
- Ptr<SpectrumValue> m_sv;
- Ptr<const SpectrumModel> m_sm;
- Ptr<SpectrumValue> m_sinr;
+ Ptr<SpectrumValue> m_sv;
+ Ptr<const SpectrumModel> m_sm;
+ Ptr<SpectrumValue> m_sinr;
};
--- a/src/lte/test/lte-test-earfcn.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-earfcn.cc Fri Jun 17 17:41:40 2011 +0200
@@ -39,14 +39,14 @@
uint16_t m_earfcn;
double m_f;
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
};
LteEarfcnTestCase::LteEarfcnTestCase (const char* str, uint16_t earfcn, double f)
: TestCase (str),
- m_earfcn (earfcn),
- m_f (f)
+ m_earfcn (earfcn),
+ m_f (f)
{
NS_LOG_FUNCTION (this << str << earfcn << f);
}
@@ -67,8 +67,8 @@
public:
LteEarfcnDlTestCase (const char* str, uint16_t earfcn, double f);
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
};
LteEarfcnDlTestCase::LteEarfcnDlTestCase (const char* str, uint16_t earfcn, double f)
@@ -79,7 +79,7 @@
void
LteEarfcnDlTestCase::DoRun (void)
{
-// LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
+// LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
// LogComponentEnable ("LteSpectrumValueHelper", logLevel);
// LogComponentEnable ("LteTestEarfcn", logLevel);
@@ -93,8 +93,8 @@
public:
LteEarfcnUlTestCase (const char* str, uint16_t earfcn, double f);
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
};
LteEarfcnUlTestCase::LteEarfcnUlTestCase (const char* str, uint16_t earfcn, double f)
--- a/src/lte/test/lte-test-interference.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-interference.cc Fri Jun 17 17:41:40 2011 +0200
@@ -47,15 +47,15 @@
uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2)
{
- testcase->DlScheduling(frameNo, subframeNo, rnti, mcsTb1, sizeTb1, mcsTb2, sizeTb2);
+ testcase->DlScheduling (frameNo, subframeNo, rnti, mcsTb1, sizeTb1, mcsTb2, sizeTb2);
}
void
LteTestUlSchedulingCallback (LteInterferenceTestCase *testcase, std::string path,
- uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
- uint8_t mcs, uint16_t sizeTb)
+ uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
+ uint8_t mcs, uint16_t sizeTb)
{
- testcase->UlScheduling(frameNo, subframeNo, rnti, mcs, sizeTb);
+ testcase->UlScheduling (frameNo, subframeNo, rnti, mcs, sizeTb);
}
@@ -68,7 +68,7 @@
{
NS_LOG_INFO ("Creating LteInterferenceTestSuite");
- AddTestCase (new LteInterferenceTestCase ("d1=3000, d2=6000", 3000.000000, 6000.000000, 3.844681, 1.714583, 0.761558, 0.389662, 6, 4));
+ AddTestCase (new LteInterferenceTestCase ("d1=3000, d2=6000", 3000.000000, 6000.000000, 3.844681, 1.714583, 0.761558, 0.389662, 6, 4));
AddTestCase (new LteInterferenceTestCase ("d1=50, d2=10", 50.000000, 10.000000, 0.040000, 0.040000, 0.010399, 0.010399, 0, 0));
AddTestCase (new LteInterferenceTestCase ("d1=50, d2=20", 50.000000, 20.000000, 0.160000, 0.159998, 0.041154, 0.041153, 0, 0));
AddTestCase (new LteInterferenceTestCase ("d1=50, d2=50", 50.000000, 50.000000, 0.999997, 0.999907, 0.239828, 0.239808, 2, 2));
@@ -79,7 +79,7 @@
AddTestCase (new LteInterferenceTestCase ("d1=50, d2=10000", 50.000000, 10000.000000, 35964.181431, 8505.970614, 12.667381, 10.588084, 28, 28));
AddTestCase (new LteInterferenceTestCase ("d1=50, d2=100000", 50.000000, 100000.000000, 327284.773828, 10774.181090, 15.853097, 10.928917, 28, 28));
AddTestCase (new LteInterferenceTestCase ("d1=50, d2=1000000", 50.000000, 1000000.000000, 356132.574152, 10802.988445, 15.974963, 10.932767, 28, 28));
-
+
}
static LteInterferenceTestSuite lteLinkAdaptationWithInterferenceTestSuite;
@@ -93,8 +93,8 @@
: TestCase (name),
m_d1 (d1),
m_d2 (d2),
- m_dlSinrDb (10*log10(dlSinr)),
- m_ulSinrDb (10*log10(ulSinr)),
+ m_dlSinrDb (10 * log10 (dlSinr)),
+ m_ulSinrDb (10 * log10 (ulSinr)),
m_dlSe (dlSe),
m_ulSe (ulSe),
m_dlMcs (dlMcs),
@@ -129,7 +129,7 @@
NodeContainer allNodes = NodeContainer ( enbNodes, ueNodes1, ueNodes2);
// the topology is the following:
- // d2
+ // d2
// UE1-----------eNB2
// | |
// d1| |d1
@@ -178,10 +178,10 @@
enbPhy->GetUplinkSpectrumPhy ()->AddSinrChunkProcessor (testUlSinr);
Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling",
- MakeBoundCallback(&LteTestDlSchedulingCallback, this));
+ MakeBoundCallback (&LteTestDlSchedulingCallback, this));
Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/UlScheduling",
- MakeBoundCallback(&LteTestUlSchedulingCallback, this));
+ MakeBoundCallback (&LteTestUlSchedulingCallback, this));
Simulator::Stop (Seconds (0.005));
@@ -199,7 +199,7 @@
void
LteInterferenceTestCase::DlScheduling (uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
- uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2)
+ uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2)
{
/**
* Note:
@@ -214,7 +214,7 @@
void
LteInterferenceTestCase::UlScheduling (uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
- uint8_t mcs, uint16_t sizeTb)
+ uint8_t mcs, uint16_t sizeTb)
{
/**
* Note:
--- a/src/lte/test/lte-test-interference.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-interference.h Fri Jun 17 17:41:40 2011 +0200
@@ -43,16 +43,16 @@
public:
LteInterferenceTestCase (std::string name, double d1, double d2, double dlSinr, double ulSinr, double dlSe, double ulSe, uint16_t dlMcs, uint16_t ulMcs);
virtual ~LteInterferenceTestCase ();
-
+
void DlScheduling (uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
- uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2);
+ uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2);
void UlScheduling (uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
uint8_t mcs, uint16_t sizeTb);
-
+
private:
virtual void DoRun (void);
-
+
double m_d1;
double m_d2;
--- a/src/lte/test/lte-test-link-adaptation.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-link-adaptation.cc Fri Jun 17 17:41:40 2011 +0200
@@ -44,10 +44,10 @@
void
LteTestDlSchedulingCallback (LteLinkAdaptationTestCase *testcase, std::string path,
- uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
- uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2)
+ uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
+ uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2)
{
- testcase->DlScheduling(frameNo, subframeNo, rnti, mcsTb1, sizeTb1, mcsTb2, sizeTb2);
+ testcase->DlScheduling (frameNo, subframeNo, rnti, mcsTb1, sizeTb1, mcsTb2, sizeTb2);
}
/**
@@ -60,59 +60,59 @@
NS_LOG_INFO ("Creating LteLinkAdaptionTestSuite");
struct SnrEfficiencyMcs
- {
- double snrDb;
- double efficiency;
- int mcsIndex;
- };
+ {
+ double snrDb;
+ double efficiency;
+ int mcsIndex;
+ };
/**
* Test vectors: SNRDB, Spectral Efficiency, MCS index
* From XXX
*/
SnrEfficiencyMcs snrEfficiencyMcs[] = {
- {-5.00000, 0.08024, -1},
- {-4.00000, 0.10030, -1},
- {-3.00000, 0.12518, -1},
- {-2.00000, 0.15589, 0},
- {-1.00000, 0.19365, 0},
- {0.00000, 0.23983, 2},
- {1.00000, 0.29593, 2},
- {2.00000, 0.36360, 2},
- {3.00000, 0.44451, 4},
- {4.00000, 0.54031, 4},
- {5.00000, 0.65251, 6},
- {6.00000, 0.78240, 6},
- {7.00000, 0.93086, 8},
- {8.00000, 1.09835, 8},
- {9.00000, 1.28485, 10},
- {10.00000, 1.48981, 12},
- {11.00000, 1.71229, 12},
- {12.00000, 1.95096, 14},
- {13.00000, 2.20429, 14},
- {14.00000, 2.47062, 16},
- {15.00000, 2.74826, 18},
- {16.00000, 3.03560, 18},
- {17.00000, 3.33115, 20},
- {18.00000, 3.63355, 20},
- {19.00000, 3.94163, 22},
- {20.00000, 4.25439, 22},
- {21.00000, 4.57095, 24},
- {22.00000, 4.89060, 24},
- {23.00000, 5.21276, 26},
- {24.00000, 5.53693, 26},
- {25.00000, 5.86271, 28},
- {26.00000, 6.18980, 28},
- {27.00000, 6.51792, 28},
- {28.00000, 6.84687, 28},
- {29.00000, 7.17649, 28},
- {30.00000, 7.50663, 28},
+ { -5.00000, 0.08024, -1},
+ { -4.00000, 0.10030, -1},
+ { -3.00000, 0.12518, -1},
+ { -2.00000, 0.15589, 0},
+ { -1.00000, 0.19365, 0},
+ { 0.00000, 0.23983, 2},
+ { 1.00000, 0.29593, 2},
+ { 2.00000, 0.36360, 2},
+ { 3.00000, 0.44451, 4},
+ { 4.00000, 0.54031, 4},
+ { 5.00000, 0.65251, 6},
+ { 6.00000, 0.78240, 6},
+ { 7.00000, 0.93086, 8},
+ { 8.00000, 1.09835, 8},
+ { 9.00000, 1.28485, 10},
+ { 10.00000, 1.48981, 12},
+ { 11.00000, 1.71229, 12},
+ { 12.00000, 1.95096, 14},
+ { 13.00000, 2.20429, 14},
+ { 14.00000, 2.47062, 16},
+ { 15.00000, 2.74826, 18},
+ { 16.00000, 3.03560, 18},
+ { 17.00000, 3.33115, 20},
+ { 18.00000, 3.63355, 20},
+ { 19.00000, 3.94163, 22},
+ { 20.00000, 4.25439, 22},
+ { 21.00000, 4.57095, 24},
+ { 22.00000, 4.89060, 24},
+ { 23.00000, 5.21276, 26},
+ { 24.00000, 5.53693, 26},
+ { 25.00000, 5.86271, 28},
+ { 26.00000, 6.18980, 28},
+ { 27.00000, 6.51792, 28},
+ { 28.00000, 6.84687, 28},
+ { 29.00000, 7.17649, 28},
+ { 30.00000, 7.50663, 28},
};
int numOfTests = sizeof (snrEfficiencyMcs) / sizeof (SnrEfficiencyMcs);
double txPowerDbm = 30; // default eNB TX power over whole bandwdith
double ktDbm = -174; // reference LTE noise PSD
- double noisePowerDbm = ktDbm + 10*log10(25*180000); // corresponds to kT*bandwidth in linear units
+ double noisePowerDbm = ktDbm + 10 * log10 (25 * 180000); // corresponds to kT*bandwidth in linear units
double receiverNoiseFigureDb = 9.0; // default UE noise figure
for ( int i = 0 ; i < numOfTests; i++ )
@@ -200,7 +200,7 @@
uePhy->GetDownlinkSpectrumPhy ()->AddSinrChunkProcessor (testSinr);
Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling",
- MakeBoundCallback(&LteTestDlSchedulingCallback, this));
+ MakeBoundCallback (&LteTestDlSchedulingCallback, this));
Simulator::Stop (Seconds (0.005));
Simulator::Run ();
--- a/src/lte/test/lte-test-link-adaptation.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-link-adaptation.h Fri Jun 17 17:41:40 2011 +0200
@@ -39,20 +39,20 @@
class LteLinkAdaptationTestCase : public TestCase
{
- public:
- LteLinkAdaptationTestCase (std::string name, double snrDb, double loss, uint16_t mcsIndex);
- LteLinkAdaptationTestCase ();
- virtual ~LteLinkAdaptationTestCase ();
+public:
+ LteLinkAdaptationTestCase (std::string name, double snrDb, double loss, uint16_t mcsIndex);
+ LteLinkAdaptationTestCase ();
+ virtual ~LteLinkAdaptationTestCase ();
- void DlScheduling (uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
- uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2);
+ void DlScheduling (uint32_t frameNo, uint32_t subframeNo, uint16_t rnti,
+ uint8_t mcsTb1, uint16_t sizeTb1, uint8_t mcsTb2, uint16_t sizeTb2);
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
- double m_snrDb;
- double m_loss;
- uint16_t m_mcsIndex;
+ double m_snrDb;
+ double m_loss;
+ uint16_t m_mcsIndex;
};
--- a/src/lte/test/lte-test-pf-ff-mac-scheduler.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-pf-ff-mac-scheduler.cc Fri Jun 17 17:41:40 2011 +0200
@@ -52,11 +52,11 @@
using namespace ns3;
LenaTestPfFfMacSchedulerSuite::LenaTestPfFfMacSchedulerSuite ()
-: TestSuite ("lte-pf-ff-mac-scheduler", SYSTEM)
+ : TestSuite ("lte-pf-ff-mac-scheduler", SYSTEM)
{
SetVerbose (true);
NS_LOG_INFO ("creating LenaTestPfFfMacSchedulerSuite");
-
+
//Test Case 1: AMC works in PF
// DOWNLINK - DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.213)
@@ -106,7 +106,7 @@
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 bytes/sec
// 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 bytes/sec
// 12 users -> 2 PRB at Itbs 11 -> 47 -> 47000 bytes/sec
- // 15 users -> 1 PRB at Itbs 11 -> 22 -> 22000 bytes/sec
+ // 15 users -> 1 PRB at Itbs 11 -> 22 -> 22000 bytes/sec
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (1,0,6000,903000,621000));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (3,0,6000,301000,201000));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (6,0,6000,150500,97000));
@@ -136,13 +136,13 @@
// 3 users -> 309000 among 3 users -> 103000 bytes/sec
// 6 users -> 309000 among 6 users -> 51500 bytes/sec
// 12 users -> 309000 among 12 users -> 25750 bytes/sec
- // 15 users -> 309000 among 15 users -> 20600 bytes/sec
+ // 15 users -> 309000 among 15 users -> 20600 bytes/sec
// UPLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 25 PRB at Itbs 6 -> 233 -> 233000 bytes/sec
// 3 users -> 8 PRB at Itbs 6 -> 69 -> 69000 bytes/sec
// 6 users -> 4 PRB at Itbs 6 -> 32 -> 32000 bytes/sec
// 12 users -> 2 PRB at Itbs 6 -> 15 -> 15000 bytes/sec
- // 15 users -> 1 PRB at Itbs 6 -> 7 -> 7000 bytes/sec
+ // 15 users -> 1 PRB at Itbs 6 -> 7 -> 7000 bytes/sec
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (1,0,15000,309000,233000));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (3,0,15000,103000,69000));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (6,0,15000,51500,32000));
@@ -150,7 +150,7 @@
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (15,0,15000,20600,7000));
// Test Case 2: fairness check
-
+
std::vector<uint16_t> dist;
dist.push_back (0); // User 0 distance --> MCS 28
dist.push_back (3000); // User 1 distance --> MCS 24
@@ -204,11 +204,11 @@
// LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL);
// LogComponentEnable ("LteUeMac", LOG_LEVEL_ALL);
// LogComponentEnable ("LteRlc", LOG_LEVEL_ALL);
- //
- // LogComponentEnable ("LtePhy", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
-
+//
+// LogComponentEnable ("LtePhy", LOG_LEVEL_ALL);
+// LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
+// LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
+
// LogComponentEnable ("LteSpectrumPhy", LOG_LEVEL_ALL);
// LogComponentEnable ("LteInterference", LOG_LEVEL_ALL);
// LogComponentEnable ("LteSinrChunkProcessor", LOG_LEVEL_ALL);
@@ -223,7 +223,7 @@
// LogComponentEnable ("LteNetDevice", LOG_LEVEL_ALL);
// LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL);
// LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL);
-
+
// LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
LogComponentEnable ("LenaTestPfFfMacCheduler", LOG_LEVEL_ALL);
// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
@@ -232,7 +232,7 @@
/**
* Initialize Simulation Scenario: 1 eNB and m_nUser UEs
*/
-
+
SetVerbose (true);
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
@@ -241,36 +241,36 @@
NodeContainer ueNodes;
enbNodes.Create (1);
ueNodes.Create (m_nUser);
-
+
// Install Mobility Model
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (enbNodes);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (ueNodes);
-
+
// Create Devices and install them in the Nodes (eNB and UE)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lena->SetSchedulerType ("ns3::PfFfMacScheduler");
enbDevs = lena->InstallEnbDevice (enbNodes);
ueDevs = lena->InstallUeDevice (ueNodes);
-
+
// Attach a UE to a eNB
lena->Attach (ueDevs, enbDevs.Get (0));
-
+
// Activate an EPS bearer
enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
EpsBearer bearer (q);
lena->ActivateEpsBearer (ueDevs, bearer);
-
+
lena->SetAttribute ("PropagationModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
-
+
Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
enbPhy->SetAttribute ("TxPower", DoubleValue (30.0));
enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
-
+
// Set UEs' position and power
for (int i = 0; i < m_nUser; i++)
{
@@ -281,29 +281,29 @@
uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
}
-
- lena->EnableRlcTraces();
-
+
+ lena->EnableRlcTraces ();
+
double simulationTime = 1.0;
double tolerance = 0.1;
Simulator::Stop (Seconds (simulationTime));
-
+
Ptr<RlcStatsCalculator> rlcStats = lena->GetRlcStats ();
- rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(simulationTime)));
-
+ rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
+
Simulator::Run ();
/**
* Check that the downlink assignation is done in a "proportional fair" manner
*/
- NS_LOG_INFO("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
+ NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
std::vector <uint64_t> dlDataRxed;
for (int i = 0; i < m_nUser; i++)
{
// get the imsi
- uint64_t imsi = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetImsi ();
+ uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
// get the lcId
- uint8_t lcId = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at(0);
+ uint8_t lcId = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at (0);
dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / simulationTime << " ref " << m_thrRefDl);
}
@@ -315,20 +315,20 @@
*/
for (int i = 0; i < m_nUser; i++)
{
- NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / simulationTime, m_thrRefDl, m_thrRefDl * tolerance, " Unfair Throughput!");
+ NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / simulationTime, m_thrRefDl, m_thrRefDl * tolerance, " Unfair Throughput!");
}
-
+
/**
* Check that the uplink assignation is done in a "proportional fair" manner
*/
- NS_LOG_INFO("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
+ NS_LOG_INFO ("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
std::vector <uint64_t> ulDataRxed;
for (int i = 0; i < m_nUser; i++)
{
// get the imsi
- uint64_t imsi = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetImsi ();
+ uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
// get the lcId
- uint8_t lcId = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at(0);
+ uint8_t lcId = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at (0);
ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId));
NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / simulationTime << " ref " << m_thrRefUl);
}
@@ -340,7 +340,7 @@
*/
for (int i = 0; i < m_nUser; i++)
{
- NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / simulationTime, m_thrRefUl, m_thrRefUl * tolerance, " Unfair Throughput!");
+ NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / simulationTime, m_thrRefUl, m_thrRefUl * tolerance, " Unfair Throughput!");
}
Simulator::Destroy ();
@@ -384,7 +384,7 @@
// LogComponentEnable ("LtePhy", LOG_LEVEL_ALL);
// LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
// LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
-
+
// LogComponentEnable ("LteSpectrumPhy", LOG_LEVEL_ALL);
// LogComponentEnable ("LteInterference", LOG_LEVEL_ALL);
// LogComponentEnable ("LteSinrChunkProcessor", LOG_LEVEL_ALL);
@@ -399,54 +399,54 @@
// LogComponentEnable ("LteNetDevice", LOG_LEVEL_ALL);
// LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL);
// LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL);
-
+
// LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
LogComponentEnable ("LenaTestPfFfMacCheduler", LOG_LEVEL_ALL);
// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
// LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
-
+
/**
* Initialize Simulation Scenario: 1 eNB and m_nUser UEs
*/
-
+
SetVerbose (true);
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
-
+
// Create Nodes: eNodeB and UE
NodeContainer enbNodes;
NodeContainer ueNodes;
enbNodes.Create (1);
ueNodes.Create (m_nUser);
-
+
// Install Mobility Model
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (enbNodes);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (ueNodes);
-
+
// Create Devices and install them in the Nodes (eNB and UE)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lena->SetSchedulerType ("ns3::PfFfMacScheduler");
enbDevs = lena->InstallEnbDevice (enbNodes);
ueDevs = lena->InstallUeDevice (ueNodes);
-
+
// Attach a UE to a eNB
lena->Attach (ueDevs, enbDevs.Get (0));
-
+
// Activate an EPS bearer
enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
EpsBearer bearer (q);
lena->ActivateEpsBearer (ueDevs, bearer);
-
+
lena->SetAttribute ("PropagationModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
-
+
Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
enbPhy->SetAttribute ("TxPower", DoubleValue (30.0));
enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
-
+
// Set UEs' position and power
for (int i = 0; i < m_nUser; i++)
{
@@ -457,34 +457,34 @@
uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
}
-
- lena->EnableRlcTraces();
-
+
+ lena->EnableRlcTraces ();
+
double simulationTime = 0.4;
double tolerance = 0.1;
Simulator::Stop (Seconds (simulationTime));
-
+
Ptr<RlcStatsCalculator> rlcStats = lena->GetRlcStats ();
- rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(simulationTime)));
-
+ rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
+
Simulator::Run ();
-
- NS_LOG_INFO("DL - Test with " << m_nUser << " user(s)");
+
+ NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s)");
std::vector <uint64_t> dlDataRxed;
double totalData = 0;
double totalEstThrPf = 0;
for (int i = 0; i < m_nUser; i++)
{
// get the imsi
- uint64_t imsi = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetImsi ();
+ uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
// get the lcId
- uint8_t lcId = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at(0);
+ uint8_t lcId = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at (0);
dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
totalData += (double)dlDataRxed.at (i);
NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / simulationTime << " ref " << m_nUser);
totalEstThrPf += m_estThrPfDl.at (i);
}
-
+
/**
* Check that the assignation is done in a "proportional fair" manner among users
* with different SINRs: the bandwidht should be distributed according to the
@@ -495,27 +495,27 @@
double thrRatio = (double)dlDataRxed.at (i) / totalData;
double estThrRatio = (double)m_estThrPfDl.at (i) / totalEstThrPf;
NS_LOG_INFO ("\tUser " << i << " thrRatio " << thrRatio << " estThrRatio " << estThrRatio);
- NS_TEST_ASSERT_MSG_EQ_TOL (estThrRatio, thrRatio, tolerance, " Unfair Throughput!");
+ NS_TEST_ASSERT_MSG_EQ_TOL (estThrRatio, thrRatio, tolerance, " Unfair Throughput!");
}
-
- /**
- * Check that the assignation in uplink is done in a round robin manner.
- */
-
- NS_LOG_INFO("UL - Test with " << m_nUser);
- std::vector <uint64_t> ulDataRxed;
- for (int i = 0; i < m_nUser; i++)
- {
- // get the imsi
- uint64_t imsi = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetImsi ();
- // get the lcId
- uint8_t lcId = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector().at(0);
- ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId));
- NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " bytes rxed " << (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / simulationTime << " ref " << (double)m_estThrPfUl.at (i));
- NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / simulationTime, (double)m_estThrPfUl.at (i), (double)m_estThrPfUl.at (i) * tolerance, " Unfair Throughput!");
- }
+
+ /**
+ * Check that the assignation in uplink is done in a round robin manner.
+ */
+
+ NS_LOG_INFO ("UL - Test with " << m_nUser);
+ std::vector <uint64_t> ulDataRxed;
+ for (int i = 0; i < m_nUser; i++)
+ {
+ // get the imsi
+ uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
+ // get the lcId
+ uint8_t lcId = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at (0);
+ ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId));
+ NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " bytes rxed " << (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / simulationTime << " ref " << (double)m_estThrPfUl.at (i));
+ NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / simulationTime, (double)m_estThrPfUl.at (i), (double)m_estThrPfUl.at (i) * tolerance, " Unfair Throughput!");
+ }
Simulator::Destroy ();
-
+
}
--- a/src/lte/test/lte-test-pf-ff-mac-scheduler.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-pf-ff-mac-scheduler.h Fri Jun 17 17:41:40 2011 +0200
@@ -39,32 +39,32 @@
*/
class LenaPfFfMacSchedulerTestCase1 : public TestCase
{
- public:
- LenaPfFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl);
- virtual ~LenaPfFfMacSchedulerTestCase1 ();
+public:
+ LenaPfFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl);
+ virtual ~LenaPfFfMacSchedulerTestCase1 ();
- private:
- virtual void DoRun (void);
- uint16_t m_nUser;
- uint16_t m_nLc;
- uint16_t m_dist;
- double m_thrRefDl;
- double m_thrRefUl;
+private:
+ virtual void DoRun (void);
+ uint16_t m_nUser;
+ uint16_t m_nLc;
+ uint16_t m_dist;
+ double m_thrRefDl;
+ double m_thrRefUl;
};
class LenaPfFfMacSchedulerTestCase2 : public TestCase
{
- public:
- LenaPfFfMacSchedulerTestCase2 (uint16_t nUser, std::vector<uint16_t> dist, std::vector<uint32_t> estThrPfDl, std::vector<uint32_t> estThrPfUl);
- virtual ~LenaPfFfMacSchedulerTestCase2 ();
-
- private:
- virtual void DoRun (void);
- uint16_t m_nUser;
- std::vector<uint16_t> m_dist;
- std::vector<uint32_t> m_estThrPfDl;
- std::vector<uint32_t> m_estThrPfUl;
+public:
+ LenaPfFfMacSchedulerTestCase2 (uint16_t nUser, std::vector<uint16_t> dist, std::vector<uint32_t> estThrPfDl, std::vector<uint32_t> estThrPfUl);
+ virtual ~LenaPfFfMacSchedulerTestCase2 ();
+
+private:
+ virtual void DoRun (void);
+ uint16_t m_nUser;
+ std::vector<uint16_t> m_dist;
+ std::vector<uint32_t> m_estThrPfDl;
+ std::vector<uint32_t> m_estThrPfUl;
};
@@ -72,8 +72,8 @@
class LenaTestPfFfMacSchedulerSuite : public TestSuite
{
- public:
- LenaTestPfFfMacSchedulerSuite ();
+public:
+ LenaTestPfFfMacSchedulerSuite ();
};
--- a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc Fri Jun 17 17:41:40 2011 +0200
@@ -50,12 +50,12 @@
LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite ()
-: TestSuite ("lte-rr-ff-mac-scheduler", SYSTEM)
+ : TestSuite ("lte-rr-ff-mac-scheduler", SYSTEM)
{
SetVerbose (true);
NS_LOG_INFO ("creating LenaRrFfMacSchedulerTestCase");
-
-
+
+
// DOWNLINK- DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 26 -> 2196 -> 2196000 bytes/sec
// 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 bytes/sec
@@ -76,14 +76,14 @@
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,0,185000,185000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,0,185000,185000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,0,148000,89000));
-
+
// DOWNLINK - DISTANCE 3000 -> MCS 22 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 20 -> 1383 -> 1383000 bytes/sec
// 3 users -> 8 PRB at Itbs 20 -> 469 -> 469000 bytes/sec
// 6 users -> 4 PRB at Itbs 20 -> 233 -> 233000 bytes/sec
// 9 user -> 2 PRB at Itbs 20 -> 113 -> 113000 bytes/sec
// 12 users -> 2 PRB at Itbs 20 -> 113 -> 113000 bytes/sec
- // 15 users -> 2 PRB at Itbs 20 * 0.8 -> 90.4 -> 90400 bytes/sec
+ // 15 users -> 2 PRB at Itbs 20 * 0.8 -> 90.4 -> 90400 bytes/sec
// UPLINK - DISTANCE 3000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 25 PRB at Itbs 18 -> 1239 -> 1239000 bytes/sec
// 3 users -> 8 PRB at Itbs 18 -> 389 -> 389000 bytes/sec
@@ -97,28 +97,28 @@
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,3000,113000,97000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,3000,113000,97000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,3000,90400,47000));
-
+
// DOWNLINK - DISTANCE 6000 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 15 -> 903 -> 903000 bytes/sec
// 3 users -> 8 PRB at Itbs 15 -> 309 -> 309000 bytes/sec
// 6 users -> 4 PRB at Itbs 15 -> 153 -> 153000 bytes/sec
// 9 user -> 2 PRB at Itbs 15 -> 75 -> 75000 bytes/sec
// 12 users -> 2 PRB at Itbs 15 -> 75 -> 75000 bytes/sec
- // 15 users -> 2 PRB at Itbs 15 * 0.8 -> 60 -> 60000 bytes/sec
+ // 15 users -> 2 PRB at Itbs 15 * 0.8 -> 60 -> 60000 bytes/sec
// UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 bytes/sec
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 bytes/sec
// 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 bytes/sec
// 9 user -> 2 PRB at Itbs 11 -> 47 -> 47000 bytes/sec
// 12 users -> 2 PRB at Itbs 11 -> 47 -> 47000 bytes/sec
- // 15 users -> 1 PRB at Itbs 11 -> 22 -> 22000 bytes/sec
+ // 15 users -> 1 PRB at Itbs 11 -> 22 -> 22000 bytes/sec
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,6000,903000,621000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,6000,309000,201000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,6000,153000,97000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,6000,75000,47000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,6000,75000,47000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,6000,60000,22000));
-
+
// DOWNLINK - DISTANCE 9000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 11 -> 597 -> 597000 bytes/sec
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 bytes/sec
@@ -132,46 +132,46 @@
// 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 bytes/sec
// 9 user -> 2 PRB at Itbs 8 -> 32 -> 32000 bytes/sec
// 12 users -> 2 PRB at Itbs 8 -> 32 -> 32000 bytes/sec
- // 15 users -> 1 PRB at Itbs 8 -> 15 -> 15000 bytes/sec
+ // 15 users -> 1 PRB at Itbs 8 -> 15 -> 15000 bytes/sec
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,9000,597000,437000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,9000,201000,137000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,9000,97000,67000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,9000,47000,32000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,9000,47000,32000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,9000,37600,15000));
-
+
// DOWNLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 6 -> 309 -> 309000 bytes/sec
// 3 users -> 8 PRB at Itbs 6 -> 101 -> 101000 bytes/sec
// 6 users -> 4 PRB at Itbs 6 -> 49 -> 49000 bytes/sec
// 9 user -> 2 PRB at Itbs 6 -> 22 -> 22000 bytes/sec
// 12 users -> 2 PRB at Itbs 6 -> 22 -> 22000 bytes/sec
- // 15 users -> 2 PRB at Itbs 6 * 0.8 -> 17.6 -> 17600 bytes/sec
+ // 15 users -> 2 PRB at Itbs 6 * 0.8 -> 17.6 -> 17600 bytes/sec
// UPLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 25 PRB at Itbs 6 -> 233 -> 233000 bytes/sec
// 3 users -> 8 PRB at Itbs 6 -> 69 -> 69000 bytes/sec
// 6 users -> 4 PRB at Itbs 6 -> 32 -> 32000 bytes/sec
// 9 user -> 2 PRB at Itbs 6 -> 15 -> 15000 bytes/sec
// 12 users -> 2 PRB at Itbs 6 -> 15 -> 15000 bytes/sec
- // 15 users -> 1 PRB at Itbs 6 -> 7 -> 7000 bytes/sec
+ // 15 users -> 1 PRB at Itbs 6 -> 7 -> 7000 bytes/sec
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,15000,309000,233000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,15000,101000,69000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,15000,49000,32000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,15000,22000,15000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,15000,22000,15000));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,15000,17600,7000));
-
+
}
static LenaTestRrFfMacSchedulerSuite lenaTestRrFfMacSchedulerSuite;
LenaRrFfMacSchedulerTestCase::LenaRrFfMacSchedulerTestCase (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl)
: TestCase (""),
- m_nUser (nUser),
- m_nLc (nLc),
- m_dist (dist),
- m_thrRefDl (thrRefDl),
- m_thrRefUl (thrRefUl)
+ m_nUser (nUser),
+ m_nLc (nLc),
+ m_dist (dist),
+ m_thrRefDl (thrRefDl),
+ m_thrRefUl (thrRefUl)
{
std::ostringstream oss;
oss << nUser << " UEs, distance " << dist << " m" ;
@@ -214,51 +214,51 @@
LogComponentEnable ("LenaTestRrFfMacCheduler", LOG_LEVEL_ALL);
// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
// LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
-
+
/**
* Initialize Simulation Scenario: 1 eNB and m_nUser UEs
*/
-
+
SetVerbose (true);
-
+
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
-
+
// Create Nodes: eNodeB and UE
NodeContainer enbNodes;
NodeContainer ueNodes;
enbNodes.Create (1);
ueNodes.Create (m_nUser);
-
+
// Install Mobility Model
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (enbNodes);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (ueNodes);
-
+
// Create Devices and install them in the Nodes (eNB and UE)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lena->SetSchedulerType ("ns3::RrFfMacScheduler");
enbDevs = lena->InstallEnbDevice (enbNodes);
ueDevs = lena->InstallUeDevice (ueNodes);
-
+
// Attach a UE to a eNB
- lena->Attach (ueDevs, enbDevs.Get (0));
-
+ lena->Attach (ueDevs, enbDevs.Get (0));
+
// Activate an EPS bearer
enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
EpsBearer bearer (q);
lena->ActivateEpsBearer (ueDevs, bearer);
-
+
lena->SetAttribute ("PropagationModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
-
+
Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
enbPhy->SetAttribute ("TxPower", DoubleValue (30.0));
enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
-
+
// Set UEs' position and power
for (int i = 0; i < m_nUser; i++)
{
@@ -269,45 +269,45 @@
uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
}
-
+
lena->EnableRlcTraces ();
double simulationTime = 0.4;
double tolerance = 0.1;
Simulator::Stop (Seconds (simulationTime));
-
+
Ptr<RlcStatsCalculator> rlcStats = lena->GetRlcStats ();
- rlcStats->SetAttribute ("EpochDuration", TimeValue(Seconds(simulationTime)));
+ rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
-
+
Simulator::Run ();
/**
* Check that the assignation is done in a RR fashion
*/
- NS_LOG_INFO("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
+ NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
std::vector <uint64_t> dlDataRxed;
for (int i = 0; i < m_nUser; i++)
{
// get the imsi
- uint64_t imsi = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetImsi ();
+ uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
// get the lcId
- uint8_t lcId = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector().at(0);
+ uint8_t lcId = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at (0);
dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / simulationTime << " ref " << m_thrRefDl);
- NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / simulationTime, m_thrRefDl, m_thrRefDl * tolerance, " Unfair Throughput!");
+ NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / simulationTime, m_thrRefDl, m_thrRefDl * tolerance, " Unfair Throughput!");
}
-
- NS_LOG_INFO("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
+
+ NS_LOG_INFO ("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
std::vector <uint64_t> ulDataRxed;
for (int i = 0; i < m_nUser; i++)
{
// get the imsi
- uint64_t imsi = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetImsi ();
+ uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
// get the lcId
- uint8_t lcId = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector().at(0);
+ uint8_t lcId = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at (0);
ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId));
NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes txed " << (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / simulationTime << " ref " << m_thrRefUl);
- NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / simulationTime, m_thrRefUl, m_thrRefUl * tolerance, " Unfair Throughput!");
+ NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / simulationTime, m_thrRefUl, m_thrRefUl * tolerance, " Unfair Throughput!");
}
Simulator::Destroy ();
--- a/src/lte/test/lte-test-rr-ff-mac-scheduler.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-rr-ff-mac-scheduler.h Fri Jun 17 17:41:40 2011 +0200
@@ -39,26 +39,26 @@
*/
class LenaRrFfMacSchedulerTestCase : public TestCase
{
- public:
- LenaRrFfMacSchedulerTestCase (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl);
- virtual ~LenaRrFfMacSchedulerTestCase ();
+public:
+ LenaRrFfMacSchedulerTestCase (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl);
+ virtual ~LenaRrFfMacSchedulerTestCase ();
- private:
- virtual void DoRun (void);
- uint16_t m_nUser;
- uint16_t m_nLc;
- uint16_t m_dist;
- double m_thrRefDl;
- double m_thrRefUl;
-
+private:
+ virtual void DoRun (void);
+ uint16_t m_nUser;
+ uint16_t m_nLc;
+ uint16_t m_dist;
+ double m_thrRefDl;
+ double m_thrRefUl;
+
};
class LenaTestRrFfMacSchedulerSuite : public TestSuite
{
- public:
- LenaTestRrFfMacSchedulerSuite ();
+public:
+ LenaTestRrFfMacSchedulerSuite ();
};
--- a/src/lte/test/lte-test-spectrum-value-helper.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-spectrum-value-helper.cc Fri Jun 17 17:41:40 2011 +0200
@@ -38,10 +38,10 @@
protected:
Ptr<SpectrumModel> m_actual;
- Ptr<SpectrumModel> m_expected;
+ Ptr<SpectrumModel> m_expected;
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
};
LteSpectrumModelTestCase::LteSpectrumModelTestCase (const char* str, uint16_t earfcn, uint8_t bw, std::vector<double> fcs)
@@ -49,7 +49,7 @@
{
NS_LOG_FUNCTION (this << str << earfcn << bw);
m_actual = LteSpectrumValueHelper::GetSpectrumModel (earfcn, bw);
- m_expected = Create<SpectrumModel> (fcs);
+ m_expected = Create<SpectrumModel> (fcs);
}
LteSpectrumModelTestCase::~LteSpectrumModelTestCase ()
@@ -74,18 +74,18 @@
protected:
Ptr<SpectrumValue> m_actual;
- Ptr<SpectrumValue> m_expected;
+ Ptr<SpectrumValue> m_expected;
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
};
LteNoisePsdTestCase::LteNoisePsdTestCase (const char* str, uint16_t earfcn, uint8_t bw, double noiseFigureDb, SpectrumValue& expected)
: TestCase (str),
- m_actual (LteSpectrumValueHelper::CreateNoisePowerSpectralDensity (earfcn, bw, noiseFigureDb)),
- m_expected (Create<SpectrumValue> (expected))
+ m_actual (LteSpectrumValueHelper::CreateNoisePowerSpectralDensity (earfcn, bw, noiseFigureDb)),
+ m_expected (Create<SpectrumValue> (expected))
{
- NS_LOG_FUNCTION (this << str << earfcn << bw << noiseFigureDb);
+ NS_LOG_FUNCTION (this << str << earfcn << bw << noiseFigureDb);
}
LteNoisePsdTestCase::~LteNoisePsdTestCase ()
@@ -111,18 +111,18 @@
protected:
Ptr<SpectrumValue> m_actual;
- Ptr<SpectrumValue> m_expected;
+ Ptr<SpectrumValue> m_expected;
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
};
LteTxPsdTestCase::LteTxPsdTestCase (const char* str, uint16_t earfcn, uint8_t bw, double txPowerDbm, std::vector<int> activeRbs, SpectrumValue& expected)
: TestCase (str),
- m_actual (LteSpectrumValueHelper::CreateTxPowerSpectralDensity (earfcn, bw, txPowerDbm, activeRbs)),
- m_expected (Create<SpectrumValue> (expected))
+ m_actual (LteSpectrumValueHelper::CreateTxPowerSpectralDensity (earfcn, bw, txPowerDbm, activeRbs)),
+ m_expected (Create<SpectrumValue> (expected))
{
- NS_LOG_FUNCTION (this << str << earfcn << bw << txPowerDbm);
+ NS_LOG_FUNCTION (this << str << earfcn << bw << txPowerDbm);
}
LteTxPsdTestCase::~LteTxPsdTestCase ()
--- a/src/lte/test/lte-test-uplink-sinr.cc Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-uplink-sinr.cc Fri Jun 17 17:41:40 2011 +0200
@@ -194,7 +194,7 @@
// Phy tags
LtePhyTag pktTag[numOfPbs];
-
+
/**
* Build packet burst (Data and interference)
*/
@@ -234,7 +234,7 @@
{
// Create phy tag (different for each packet burst)
// and add to the first packet
- pktTag[pb] = LtePhyTag (100 * (pb+1));
+ pktTag[pb] = LtePhyTag (100 * (pb + 1));
pkt[pb][i]->AddPacketTag ( pktTag[pb] );
}
@@ -279,13 +279,13 @@
*/
// 2 UEs send data to the eNB through 2 subcarriers
- Simulator::Schedule (ts, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[0], m_sv1, ulPhy->GetSpectrumType(), ds);
- Simulator::Schedule (ts, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[1], m_sv2, ulPhy->GetSpectrumType(), ds);
+ Simulator::Schedule (ts, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[0], m_sv1, ulPhy->GetSpectrumType (), ds);
+ Simulator::Schedule (ts, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[1], m_sv2, ulPhy->GetSpectrumType (), ds);
- Simulator::Schedule (ti1, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[2], i1, ulPhy->GetSpectrumType(), di1);
- Simulator::Schedule (ti2, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[3], i2, ulPhy->GetSpectrumType(), di2);
- Simulator::Schedule (ti3, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[4], i3, ulPhy->GetSpectrumType(), di3);
- Simulator::Schedule (ti4, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[5], i4, ulPhy->GetSpectrumType(), di4);
+ Simulator::Schedule (ti1, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[2], i1, ulPhy->GetSpectrumType (), di1);
+ Simulator::Schedule (ti2, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[3], i2, ulPhy->GetSpectrumType (), di2);
+ Simulator::Schedule (ti3, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[4], i3, ulPhy->GetSpectrumType (), di3);
+ Simulator::Schedule (ti4, &LteSpectrumPhy::StartRx, ulPhy, packetBursts[5], i4, ulPhy->GetSpectrumType (), di4);
Simulator::Stop (Seconds (5.0));
Simulator::Run ();
--- a/src/lte/test/lte-test-uplink-sinr.h Fri Jun 17 17:32:20 2011 +0200
+++ b/src/lte/test/lte-test-uplink-sinr.h Fri Jun 17 17:41:40 2011 +0200
@@ -41,17 +41,17 @@
class LteUplinkSinrTestCase : public TestCase
{
- public:
- LteUplinkSinrTestCase (Ptr<SpectrumValue> sv1, Ptr<SpectrumValue> sv2, Ptr<SpectrumValue> sinr, std::string name);
- virtual ~LteUplinkSinrTestCase ();
+public:
+ LteUplinkSinrTestCase (Ptr<SpectrumValue> sv1, Ptr<SpectrumValue> sv2, Ptr<SpectrumValue> sinr, std::string name);
+ virtual ~LteUplinkSinrTestCase ();
- private:
- virtual void DoRun (void);
+private:
+ virtual void DoRun (void);
- Ptr<SpectrumValue> m_sv1;
- Ptr<SpectrumValue> m_sv2;
- Ptr<const SpectrumModel> m_sm;
- Ptr<SpectrumValue> m_sinr;
+ Ptr<SpectrumValue> m_sv1;
+ Ptr<SpectrumValue> m_sv2;
+ Ptr<const SpectrumModel> m_sm;
+ Ptr<SpectrumValue> m_sinr;
};