19#include <ns3/uinteger.h>
29 : m_anrSapUser(nullptr),
32 m_servingCellId(servingCellId)
50 .AddAttribute(
"Threshold",
51 "Minimum RSRQ range value required for detecting a neighbour cell",
68 NS_FATAL_ERROR(
"Serving cell ID " << cellId <<
" may not be added into NRT");
73 NS_FATAL_ERROR(
"There is already an entry in the NRT for cell ID " << cellId);
78 neighbourRelation.
noHo =
true;
79 neighbourRelation.
noX2 =
false;
116 NS_LOG_LOGIC(
this <<
" requesting Event A4 measurements"
117 <<
" (threshold=" << (uint16_t)
m_threshold <<
")");
138 uint8_t measId = measResults.
measId;
143 NS_LOG_WARN(
this <<
" Skipping unexpected measurement identity " << (uint16_t)measId);
155 "RSRQ measure missing for cellId " << it->physCellId);
163 <<
" with entry of cell " << it->physCellId);
164 if (!itNrt->second.noX2)
169 itNrt->second.noHo =
false;
171 itNrt->second.detectedAsNeighbour =
true;
177 <<
" with newly discovered neighbouring cell "
181 neighbourRelation.
noHo =
true;
182 neighbourRelation.
noX2 =
true;
194 this <<
" Event A4 received without measurement results from neighbouring cells");
236 NS_FATAL_ERROR(
"Cell ID " << cellId <<
" cannot be found in NRT");
238 return &(it->second);
friend class MemberLteAnrSapProvider< LteAnr >
let the forwarder class access the protected and private members
void DoInitialize() override
Initialize() implementation.
virtual LteAnrSapProvider * GetLteAnrSapProvider()
Export the "provider" part of the ANR SAP interface.
void DoReportUeMeas(LteRrcSap::MeasResults measResults)
Implementation of LteAnrSapProvider::ReportUeMeas.
bool DoGetNoHo(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoHo.
LteAnrSapProvider * m_anrSapProvider
Reference to the "provider" part of the ANR SAP interface, which is automatically created when this c...
uint8_t m_measId
The expected measurement identity.
LteAnrSapUser * m_anrSapUser
Reference to the "user" part of the ANR SAP interface, which is provided by the eNodeB RRC instance.
static TypeId GetTypeId()
Get the type ID.
void RemoveNeighbourRelation(uint16_t cellId)
Remove an existing Neighbour Relation entry.
bool DoGetNoRemove(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoRemove.
const NeighbourRelation_t * Find(uint16_t cellId) const
uint8_t m_threshold
The attribute Threshold.
LteAnr(uint16_t servingCellId)
Creates an ANR instance.
NeighbourRelationTable_t m_neighbourRelationTable
neighbor relation table
void DoAddNeighbourRelation(uint16_t cellId)
Implementation of LteAnrSapProvider::AddNeighbourRelation.
void AddNeighbourRelation(uint16_t cellId)
Provide an advance information about a related neighbouring cell and add it as a new Neighbour Relati...
uint16_t m_servingCellId
Serving cell ID.
bool DoGetNoX2(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoX2.
virtual void SetLteAnrSapUser(LteAnrSapUser *s)
Set the "user" part of the ANR SAP interface that this ANR instance will interact with.
void DoDispose() override
Destructor implementation.
Service Access Point (SAP) offered by the ANR instance to the eNodeB RRC instance.
Service Access Point (SAP) offered by the eNodeB RRC instance to the ANR instance.
virtual uint8_t AddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
A base class which provides memory management and object aggregation.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Ptr< const AttributeChecker > MakeUintegerChecker()
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Neighbour Relation between two eNodeBs (serving eNodeB and neighbour eNodeB).
bool detectedAsNeighbour
detected as neighbor
bool haveMeasResultNeighCells
have measure result neighbor cells
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
Specifies criteria for triggering of an E-UTRA measurement reporting event.
enum ns3::LteRrcSap::ReportConfigEutra::@62 eventId
Event enumeration.
@ RSRQ
Reference Signal Received Quality.
@ EVENT_A4
Event A4: Neighbour becomes better than absolute threshold.
enum ns3::LteRrcSap::ReportConfigEutra::@65 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@63 triggerQuantity
Trigger type enumeration.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
@ THRESHOLD_RSRQ
RSRQ is used for the threshold.
enum ns3::LteRrcSap::ThresholdEutra::@60 choice
Threshold enumeration.
uint8_t range
Value range used in RSRP/RSRQ threshold.