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

Handover algorithm implementation based on RSRQ measurements, Event A2 and Event A4. More...

#include <a2-a4-rsrq-handover-algorithm.h>

+ Inheritance diagram for ns3::A2A4RsrqHandoverAlgorithm:
+ Collaboration diagram for ns3::A2A4RsrqHandoverAlgorithm:

Classes

class  UeMeasure
 Measurements reported by a UE for a cell ID. More...
 

Public Member Functions

 A2A4RsrqHandoverAlgorithm ()
 Creates an A2-A4-RSRQ handover algorithm instance. More...
 
virtual ~A2A4RsrqHandoverAlgorithm ()
 
virtual
LteHandoverManagementSapProvider
GetLteHandoverManagementSapProvider ()
 Export the "provider" part of the Handover Management SAP interface. More...
 
virtual void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser *s)
 Set the "user" part of the Handover Management SAP interface that this handover algorithm instance will interact with. More...
 
- Public Member Functions inherited from ns3::LteHandoverAlgorithm
 LteHandoverAlgorithm ()
 
virtual ~LteHandoverAlgorithm ()
 
- 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::LteHandoverAlgorithm
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...
 
void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults)
 Implementation of LteHandoverManagementSapProvider::ReportUeMeas. 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,
Ptr< UeMeasure > > 
MeasurementRow_t
 
typedef std::map< uint16_t,
MeasurementRow_t
MeasurementTable_t
 

Private Member Functions

void EvaluateHandover (uint16_t rnti, uint8_t servingCellRsrq)
 
bool IsValidNeighbour (uint16_t cellId)
 
void UpdateNeighbourMeasurements (uint16_t rnti, uint16_t cellId, uint8_t rsrq)
 

Private Attributes

uint8_t m_a2MeasId
 
uint8_t m_a4MeasId
 
LteHandoverManagementSapProviderm_handoverManagementSapProvider
 
LteHandoverManagementSapUserm_handoverManagementSapUser
 
MeasurementTable_t m_neighbourCellMeasures
 
uint8_t m_neighbourCellOffset
 
uint8_t m_servingCellThreshold
 

Friends

class MemberLteHandoverManagementSapProvider< A2A4RsrqHandoverAlgorithm >
 

Detailed Description

Handover algorithm implementation based on RSRQ measurements, Event A2 and Event A4.

Handover decision made by this algorithm is primarily based on Event A2 measurements (serving cell's RSRQ becomes worse than threshold). When the event is triggered, the first condition of handover is fulfilled.

Event A4 measurements (neighbour cell's RSRQ becomes better than threshold) are used to detect neighbouring cells and their respective RSRQ. When a neighbouring cell's RSRQ is higher than the serving cell's RSRQ by a certain offset, then the second condition of handover is fulfilled.

When the first and second conditions above are fulfilled, the algorithm informs the eNodeB RRC to trigger a handover.

The threshold for Event A2 can be configured in the ServingCellThreshold attribute. The offset used in the second condition can also be configured by setting the NeighbourCellOffset attribute.

The following code snippet is an example of using and configuring the handover algorithm in a simulation program:

Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();

NodeContainer enbNodes;
// configure the nodes here...

lteHelper->SetHandoverAlgorithmType ("ns3::A2A4RsrqHandoverAlgorithm");
lteHelper->SetHandoverAlgorithmAttribute ("ServingCellThreshold",
                                          UintegerValue (30));
lteHelper->SetHandoverAlgorithmAttribute ("NeighbourCellOffset",
                                          UintegerValue (1));
NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbNodes);
Note
Setting the handover algorithm type and attributes after the call to LteHelper::InstallEnbDevice does not have any effect to the devices that have already been installed.

Config Paths

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

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

Attributes

  • ServingCellThreshold: If the RSRQ of the serving cell is worse than this threshold, neighbour cells are consider for handover
  • NeighbourCellOffset: Minimum offset between serving and best neighbour cell to trigger the Handover

No TraceSources are defined for this type.

Definition at line 80 of file a2-a4-rsrq-handover-algorithm.h.

Member Typedef Documentation

typedef std::map<uint16_t, Ptr<UeMeasure> > ns3::A2A4RsrqHandoverAlgorithm::MeasurementRow_t
private

Definition at line 133 of file a2-a4-rsrq-handover-algorithm.h.

Definition at line 135 of file a2-a4-rsrq-handover-algorithm.h.

Constructor & Destructor Documentation

ns3::A2A4RsrqHandoverAlgorithm::A2A4RsrqHandoverAlgorithm ( )

Creates an A2-A4-RSRQ handover algorithm instance.

Definition at line 46 of file a2-a4-rsrq-handover-algorithm.cc.

References m_handoverManagementSapProvider, and NS_LOG_FUNCTION.

ns3::A2A4RsrqHandoverAlgorithm::~A2A4RsrqHandoverAlgorithm ( )
virtual

Definition at line 58 of file a2-a4-rsrq-handover-algorithm.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::A2A4RsrqHandoverAlgorithm::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::LteHandoverAlgorithm.

Definition at line 132 of file a2-a4-rsrq-handover-algorithm.cc.

References m_handoverManagementSapProvider, and NS_LOG_FUNCTION.

void ns3::A2A4RsrqHandoverAlgorithm::DoInitialize ( void  )
protectedvirtual
void ns3::A2A4RsrqHandoverAlgorithm::DoReportUeMeas ( uint16_t  rnti,
LteRrcSap::MeasResults  measResults 
)
protectedvirtual

Implementation of LteHandoverManagementSapProvider::ReportUeMeas.

Parameters
rntiRadio Network Temporary Identity, an integer identifying the UE where the report originates from
measResultsa single report of one measurement identity

Implements ns3::LteHandoverAlgorithm.

Definition at line 140 of file a2-a4-rsrq-handover-algorithm.cc.

References EvaluateHandover(), ns3::LteRrcSap::MeasResults::haveMeasResultNeighCells, m_a2MeasId, m_a4MeasId, m_servingCellThreshold, ns3::LteRrcSap::MeasResults::measId, ns3::LteRrcSap::MeasResults::measResultListEutra, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_WARN, ns3::LteRrcSap::MeasResults::rsrqResult, and UpdateNeighbourMeasurements().

+ Here is the call graph for this function:

void ns3::A2A4RsrqHandoverAlgorithm::EvaluateHandover ( uint16_t  rnti,
uint8_t  servingCellRsrq 
)
private

Definition at line 179 of file a2-a4-rsrq-handover-algorithm.cc.

References IsValidNeighbour(), m_handoverManagementSapUser, m_neighbourCellMeasures, m_neighbourCellOffset, NS_LOG_FUNCTION, NS_LOG_LOGIC, NS_LOG_WARN, and ns3::LteHandoverManagementSapUser::TriggerHandover().

Referenced by DoReportUeMeas().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

LteHandoverManagementSapProvider * ns3::A2A4RsrqHandoverAlgorithm::GetLteHandoverManagementSapProvider ( )
virtual

Export the "provider" part of the Handover Management SAP interface.

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

Implements ns3::LteHandoverAlgorithm.

Definition at line 95 of file a2-a4-rsrq-handover-algorithm.cc.

References m_handoverManagementSapProvider, and NS_LOG_FUNCTION.

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

Definition at line 65 of file a2-a4-rsrq-handover-algorithm.cc.

References m_neighbourCellOffset, m_servingCellThreshold, and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

bool ns3::A2A4RsrqHandoverAlgorithm::IsValidNeighbour ( uint16_t  cellId)
private
Todo:
In the future, this function can be expanded to validate whether the neighbour cell is a valid target cell, e.g., taking into account the NRT in ANR and whether it is a CSG cell with closed access.

Definition at line 231 of file a2-a4-rsrq-handover-algorithm.cc.

References NS_LOG_FUNCTION.

Referenced by EvaluateHandover().

+ Here is the caller graph for this function:

void ns3::A2A4RsrqHandoverAlgorithm::SetLteHandoverManagementSapUser ( LteHandoverManagementSapUser s)
virtual

Set the "user" part of the Handover Management SAP interface that this handover algorithm instance will interact with.

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

Implements ns3::LteHandoverAlgorithm.

Definition at line 87 of file a2-a4-rsrq-handover-algorithm.cc.

References m_handoverManagementSapUser, NS_LOG_FUNCTION, and s.

void ns3::A2A4RsrqHandoverAlgorithm::UpdateNeighbourMeasurements ( uint16_t  rnti,
uint16_t  cellId,
uint8_t  rsrq 
)
private

Definition at line 246 of file a2-a4-rsrq-handover-algorithm.cc.

References m_neighbourCellMeasures, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by DoReportUeMeas().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

Member Data Documentation

uint8_t ns3::A2A4RsrqHandoverAlgorithm::m_a2MeasId
private

Definition at line 116 of file a2-a4-rsrq-handover-algorithm.h.

Referenced by DoInitialize(), and DoReportUeMeas().

uint8_t ns3::A2A4RsrqHandoverAlgorithm::m_a4MeasId
private

Definition at line 117 of file a2-a4-rsrq-handover-algorithm.h.

Referenced by DoInitialize(), and DoReportUeMeas().

LteHandoverManagementSapProvider* ns3::A2A4RsrqHandoverAlgorithm::m_handoverManagementSapProvider
private
LteHandoverManagementSapUser* ns3::A2A4RsrqHandoverAlgorithm::m_handoverManagementSapUser
private
MeasurementTable_t ns3::A2A4RsrqHandoverAlgorithm::m_neighbourCellMeasures
private
uint8_t ns3::A2A4RsrqHandoverAlgorithm::m_neighbourCellOffset
private

Definition at line 140 of file a2-a4-rsrq-handover-algorithm.h.

Referenced by EvaluateHandover(), and GetTypeId().

uint8_t ns3::A2A4RsrqHandoverAlgorithm::m_servingCellThreshold
private

Definition at line 139 of file a2-a4-rsrq-handover-algorithm.h.

Referenced by DoInitialize(), DoReportUeMeas(), and GetTypeId().


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