Thanks for the reply. I have the same thoughts. But I trying to figure out how to mapping the
for that eNB.
In a standard script to run LTE simulation, we have the following lines of codes to set the position of eNBs:
// Install Mobility Model in eNB
Ptr<ListPositionAllocator> enbPositionAlloc = CreateObject<ListPositionAllocator> ();
for (uint16_t i = 0; i < numberOfEnbs; i++)
{
Vector enbPosition (distance * (i + 1), distance, 30);
enbPositionAlloc->Add (enbPosition);
}
MobilityHelper enbMobility;
enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
enbMobility.SetPositionAllocator (enbPositionAlloc);
enbMobility.Install (enbNodes);
To install eNB device to a node created, we have the following lines of codes:
// Install LTE Devices in eNB and UEs
NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbNodes);
NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);
Referring to the following function in position-allocator.cc we can get the position we set for the eNB:
void
ListPositionAllocator::Add (Vector v)
{
m_positions.push_back (v);
m_current = m_positions.begin ();
}
And, referring to the following function in lte-helper.cc we can get the cellID for the eNB created:
Ptr<NetDevice>
LteHelper::InstallSingleEnbDevice (Ptr<Node> n)
{
NS_ABORT_MSG_IF (m_cellIdCounter == 65535, "max num eNBs exceeded");
uint16_t cellId = ++m_cellIdCounter;
Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> ();
Ptr<LteSpectrumPhy> ulPhy = CreateObject<LteSpectrumPhy> ();
.
.
.
}
Then, how do we map the CellID to its respective location?