30 #include <ns3/uinteger.h>
43 m_servingCellId (servingCellId)
62 .AddAttribute (
"Threshold",
63 "Minimum RSRQ range value required for detecting a neighbour cell",
66 MakeUintegerChecker<uint8_t> (0, 34))
79 NS_FATAL_ERROR (
"Serving cell ID " << cellId <<
" may not be added into NRT");
84 NS_FATAL_ERROR (
"There is already an entry in the NRT for cell ID " << cellId);
89 neighbourRelation.
noHo =
true;
90 neighbourRelation.
noX2 =
false;
104 NS_FATAL_ERROR (
"Cell ID " << cellId <<
" cannot be found in NRT");
131 NS_LOG_LOGIC (
this <<
" requesting Event A4 measurements"
132 <<
" (threshold=" << (uint16_t)
m_threshold <<
")");
155 uint8_t measId = measResults.
measId;
160 NS_LOG_WARN (
this <<
" Skipping unexpected measurement identity " << (uint16_t) measId);
167 for (std::list <LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
173 "RSRQ measure missing for cellId " << it->physCellId);
181 <<
" with entry of cell " << it->physCellId);
182 if (itNrt->second.noX2 ==
false)
186 <<
" to cell " << it->physCellId);
187 itNrt->second.noHo =
false;
189 itNrt->second.detectedAsNeighbour =
true;
195 <<
" with newly discovered neighbouring cell "
199 neighbourRelation.
noHo =
true;
200 neighbourRelation.
noX2 =
true;
210 NS_LOG_WARN (
this <<
" Event A4 received without measurement results from neighbouring cells");
257 NS_FATAL_ERROR (
"Cell ID " << cellId <<
" cannot be found in NRT");
259 return &(it->second);
friend class MemberLteAnrSapProvider< LteAnr >
let the forwarder class access the protected and private members
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.
virtual void DoInitialize()
Initialize() implementation.
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.
virtual void DoDispose()
Destructor implementation.
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.
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 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.
@ EVENT_A4
Event A4: Neighbour becomes better than absolute threshold.
@ RSRQ
Reference Signal Received Quality.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
enum ns3::LteRrcSap::ReportConfigEutra::@67 triggerQuantity
Trigger type enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@66 eventId
Event enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@69 reportInterval
Report interval enumeration.
@ THRESHOLD_RSRQ
RSRQ is used for the threshold.
uint8_t range
Value range used in RSRP/RSRQ threshold.
enum ns3::LteRrcSap::ThresholdEutra::@64 choice
Threshold enumeration.