A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::LteAnr Class Reference

Automatic Neighbour Relation function. More...

#include <lte-anr.h>

+ Inheritance diagram for ns3::LteAnr:
+ Collaboration diagram for ns3::LteAnr:

Classes

struct  NeighbourRelation_t
 Neighbour Relation between two eNodeBs (serving eNodeB and neighbour eNodeB). More...
 

Public Member Functions

 LteAnr (uint16_t servingCellId)
 Creates an ANR instance. More...
 
virtual ~LteAnr ()
 
void AddNeighbourRelation (uint16_t cellId)
 Provide an advance information about a related neighbouring cell and add it as a new Neighbour Relation entry. More...
 
virtual LteAnrSapProviderGetLteAnrSapProvider ()
 Export the "provider" part of the ANR SAP interface. More...
 
void RemoveNeighbourRelation (uint16_t cellId)
 Remove an existing Neighbour Relation entry. More...
 
virtual void SetLteAnrSapUser (LteAnrSapUser *s)
 Set the "user" part of the ANR SAP interface that this ANR instance will interact with. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 
virtual ~Object ()
 
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 Run the DoDispose methods of this object and all the objects aggregated to it. More...
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 This method calls the virtual DoInitialize method on all the objects aggregated to this object. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

virtual void DoDispose ()
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
virtual void DoInitialize ()
 This method is called only once by Object::Initialize. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void NotifyNewAggregate (void)
 This method is invoked whenever two sets of objects are aggregated together. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 This method is invoked once all member attributes have been initialized. More...
 

Private Types

typedef std::map< uint16_t,
NeighbourRelation_t
NeighbourRelationTable_t
 

Private Member Functions

void DoAddNeighbourRelation (uint16_t cellId)
 Implementation of LteAnrSapProvider::AddNeighbourRelation. More...
 
bool DoGetNoHo (uint16_t cellId) const
 Implementation of LteAnrSapProvider::GetNoHo. More...
 
bool DoGetNoRemove (uint16_t cellId) const
 Implementation of LteAnrSapProvider::GetNoRemove. More...
 
bool DoGetNoX2 (uint16_t cellId) const
 Implementation of LteAnrSapProvider::GetNoX2. More...
 
void DoReportUeMeas (LteRrcSap::MeasResults measResults)
 Implementation of LteAnrSapProvider::ReportUeMeas. More...
 
const NeighbourRelation_tFind (uint16_t cellId) const
 

Private Attributes

LteAnrSapProviderm_anrSapProvider
 Reference to the "provider" part of the ANR SAP interface, which is automatically created when this class instantiates. More...
 
LteAnrSapUserm_anrSapUser
 Reference to the "user" part of the ANR SAP interface, which is provided by the eNodeB RRC instance. More...
 
uint8_t m_measId
 
NeighbourRelationTable_t m_neighbourRelationTable
 
uint16_t m_servingCellId
 
uint8_t m_threshold
 The attribute Threshold. More...
 

Friends

class MemberLteAnrSapProvider< LteAnr >
 

Detailed Description

Automatic Neighbour Relation function.

ANR is a conceptually a list of neighbouring cells called the Neighbour Relation Table (NRT). ANR has the capability of automatically inserting new entries into NRT based on measurement reports obtained from the eNodeB RRC instance. Besides this, ANR also supports manual insertion and accepts queries for the NRT content.

The LteHelper class automatically installs one ANR instance for each eNodeB RRC instance. When installed, ANR will assist the eNodeB RRC's handover function, e.g., by preventing an X2-based handover execution if there is no X2 interface to the target neighbour cell. If this is not desired, it can be disabled by the following code sample:

Config::SetDefault ("ns3::LteHelper::AnrEnabled", BooleanValue (false));
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();

The communication between an ANR instance and the eNodeB RRC instance is done through the ANR SAP interface. The ANR instance corresponds to the "provider" part of this interface, while the eNodeB RRC instance takes the role of the "user" part. The following code skeleton establishes the connection between both instances:

Ptr<LteEnbRrc> u = ...;
Ptr<LteAnr> p = ...;
u->SetLteAnrSapProvider (p->GetLteAnrSapProvider ());
p->SetLteAnrSapUser (u->GetLteAnrSapUser ());

However, user rarely needs to use the above code, since it has already been taken care by LteHelper::InstallEnbDevice.

The current ANR model is inspired from Section 22.3.2a and 22.3.3 of 3GPP TS 36.300.

See also
SetLteAnrSapProvider, SetLteAnrSapUser

Config Paths

ns3::LteAnr is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::LteEnbNetDevice/LteAnr
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/LteAnr

Attributes

  • Threshold: Minimum RSRQ range value required for detecting a neighbour cell

No TraceSources are defined for this type.

Definition at line 80 of file lte-anr.h.

Member Typedef Documentation

typedef std::map<uint16_t, NeighbourRelation_t> ns3::LteAnr::NeighbourRelationTable_t
private

Definition at line 215 of file lte-anr.h.

Constructor & Destructor Documentation

ns3::LteAnr::LteAnr ( uint16_t  servingCellId)

Creates an ANR instance.

Parameters
servingCellIdthe cell ID of the eNodeB instance whom this ANR instance is to be associated with

Definition at line 39 of file lte-anr.cc.

References m_anrSapProvider, and NS_LOG_FUNCTION.

ns3::LteAnr::~LteAnr ( )
virtual

Definition at line 50 of file lte-anr.cc.

References m_servingCellId, and NS_LOG_FUNCTION.

Member Function Documentation

void ns3::LteAnr::AddNeighbourRelation ( uint16_t  cellId)

Provide an advance information about a related neighbouring cell and add it as a new Neighbour Relation entry.

Parameters
cellIdthe cell ID of the new neighbour

This function simulates the Neighbour Relation addition operation by network operations and maintenance, as depicted in Section 22.3.2a of 3GPP TS 36.300.

An entry added by this function will have the NoRemove flag set to TRUE and the NoHo flag set to TRUE. Hence, the cell may not act as the target cell of a handover, unless a measurement report of the cell is received, which will update the NoHo flag to FALSE.

Definition at line 72 of file lte-anr.cc.

References ns3::LteAnr::NeighbourRelation_t::detectedAsNeighbour, m_neighbourRelationTable, m_servingCellId, ns3::LteAnr::NeighbourRelation_t::noHo, ns3::LteAnr::NeighbourRelation_t::noRemove, ns3::LteAnr::NeighbourRelation_t::noX2, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by DoAddNeighbourRelation().

+ Here is the caller graph for this function:

void ns3::LteAnr::DoAddNeighbourRelation ( uint16_t  cellId)
private

Implementation of LteAnrSapProvider::AddNeighbourRelation.

Parameters
cellIdthe Physical Cell ID of the new neighbouring cell

Definition at line 219 of file lte-anr.cc.

References AddNeighbourRelation(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::LteAnr::DoDispose ( void  )
protectedvirtual

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

It is safe to call GetObject from within this method.

Reimplemented from ns3::Object.

Definition at line 143 of file lte-anr.cc.

References m_anrSapProvider, m_neighbourRelationTable, and NS_LOG_FUNCTION.

bool ns3::LteAnr::DoGetNoHo ( uint16_t  cellId) const
private

Implementation of LteAnrSapProvider::GetNoHo.

Parameters
cellIdthe Physical Cell ID of the neighbouring cell of interest
Returns
if true, the Neighbour Relation shall not be used by the eNodeB for handover reasons

Definition at line 235 of file lte-anr.cc.

References Find(), m_servingCellId, ns3::LteAnr::NeighbourRelation_t::noHo, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

bool ns3::LteAnr::DoGetNoRemove ( uint16_t  cellId) const
private

Implementation of LteAnrSapProvider::GetNoRemove.

Parameters
cellIdthe Physical Cell ID of the neighbouring cell of interest
Returns
if true, the Neighbour Relation shall not be removed from the NRT

Definition at line 227 of file lte-anr.cc.

References Find(), m_servingCellId, ns3::LteAnr::NeighbourRelation_t::noRemove, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

bool ns3::LteAnr::DoGetNoX2 ( uint16_t  cellId) const
private

Implementation of LteAnrSapProvider::GetNoX2.

Parameters
cellIdthe Physical Cell ID of the neighbouring cell of interest
Returns
if true, the Neighbour Relation shall not use an X2 interface in order to initiate procedures towards the eNodeB parenting the target cell

Definition at line 243 of file lte-anr.cc.

References Find(), m_servingCellId, ns3::LteAnr::NeighbourRelation_t::noX2, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::LteAnr::DoInitialize ( void  )
protectedvirtual

This method is called only once by Object::Initialize.

If the user calls Object::Initialize multiple times, DoInitialize is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.

Reimplemented from ns3::Object.

Definition at line 127 of file lte-anr.cc.

References ns3::LteAnrSapUser::AddUeMeasReportConfigForAnr(), ns3::LteRrcSap::ThresholdEutra::choice, ns3::LteRrcSap::ReportConfigEutra::EVENT_A4, ns3::LteRrcSap::ReportConfigEutra::eventId, m_anrSapUser, m_measId, m_threshold, ns3::LteRrcSap::ReportConfigEutra::MS480, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::LteRrcSap::ThresholdEutra::range, ns3::LteRrcSap::ReportConfigEutra::reportInterval, ns3::LteRrcSap::ReportConfigEutra::RSRQ, ns3::LteRrcSap::ReportConfigEutra::threshold1, ns3::LteRrcSap::ThresholdEutra::THRESHOLD_RSRQ, and ns3::LteRrcSap::ReportConfigEutra::triggerQuantity.

+ Here is the call graph for this function:

const LteAnr::NeighbourRelation_t * ns3::LteAnr::Find ( uint16_t  cellId) const
private

Definition at line 251 of file lte-anr.cc.

References m_neighbourRelationTable, and NS_FATAL_ERROR.

Referenced by DoGetNoHo(), DoGetNoRemove(), and DoGetNoX2().

+ Here is the caller graph for this function:

LteAnrSapProvider * ns3::LteAnr::GetLteAnrSapProvider ( )
virtual

Export the "provider" part of the ANR SAP interface.

Returns
the reference to the "provider" part of the interface, typically to be kept by an LteEnbRrc instance

Definition at line 119 of file lte-anr.cc.

References m_anrSapProvider, and NS_LOG_FUNCTION.

TypeId ns3::LteAnr::GetTypeId ( void  )
static

Definition at line 57 of file lte-anr.cc.

References m_threshold, and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::LteAnr::RemoveNeighbourRelation ( uint16_t  cellId)

Remove an existing Neighbour Relation entry.

Parameters
cellIdthe cell ID to be removed from the NRT

This function simulates the Neighbour Relation removal operation by network operations and maintenance, as depicted in Section 22.3.2a of 3GPP TS 36.300.

Definition at line 96 of file lte-anr.cc.

References m_neighbourRelationTable, m_servingCellId, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

void ns3::LteAnr::SetLteAnrSapUser ( LteAnrSapUser s)
virtual

Set the "user" part of the ANR SAP interface that this ANR instance will interact with.

Parameters
sa reference to the "user" part of the interface, typically a member of an LteEnbRrc instance

Definition at line 111 of file lte-anr.cc.

References m_anrSapUser, NS_LOG_FUNCTION, and s.

Friends And Related Function Documentation

friend class MemberLteAnrSapProvider< LteAnr >
friend

Definition at line 136 of file lte-anr.h.

Member Data Documentation

LteAnrSapProvider* ns3::LteAnr::m_anrSapProvider
private

Reference to the "provider" part of the ANR SAP interface, which is automatically created when this class instantiates.

Definition at line 189 of file lte-anr.h.

Referenced by DoDispose(), GetLteAnrSapProvider(), and LteAnr().

LteAnrSapUser* ns3::LteAnr::m_anrSapUser
private

Reference to the "user" part of the ANR SAP interface, which is provided by the eNodeB RRC instance.

Definition at line 195 of file lte-anr.h.

Referenced by DoInitialize(), and SetLteAnrSapUser().

uint8_t ns3::LteAnr::m_measId
private

Definition at line 223 of file lte-anr.h.

Referenced by DoInitialize(), and DoReportUeMeas().

NeighbourRelationTable_t ns3::LteAnr::m_neighbourRelationTable
private
uint16_t ns3::LteAnr::m_servingCellId
private
uint8_t ns3::LteAnr::m_threshold
private

The attribute Threshold.

Definition at line 200 of file lte-anr.h.

Referenced by DoInitialize(), and GetTypeId().


The documentation for this class was generated from the following files: