30 #include <ns3/uinteger.h>
43 m_servingCellId (servingCellId)
61 .AddAttribute (
"Threshold",
62 "Minimum RSRQ range value required for detecting a neighbour cell",
65 MakeUintegerChecker<uint8_t> (0, 34))
78 NS_FATAL_ERROR (
"Serving cell ID " << cellId <<
" may not be added into NRT");
83 NS_FATAL_ERROR (
"There is already an entry in the NRT for cell ID " << cellId);
88 neighbourRelation.
noHo =
true;
89 neighbourRelation.
noX2 =
false;
103 NS_FATAL_ERROR (
"Cell ID " << cellId <<
" cannot be found in NRT");
130 NS_LOG_LOGIC (
this <<
" requesting Event A4 measurements"
131 <<
" (threshold=" << (uint16_t)
m_threshold <<
")");
154 uint8_t measId = measResults.
measId;
159 NS_LOG_WARN (
this <<
" Skipping unexpected measurement identity " << (uint16_t) measId);
166 for (std::list <LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
172 "RSRQ measure missing for cellId " << it->physCellId);
180 <<
" with entry of cell " << it->physCellId);
181 if (itNrt->second.noX2 ==
false)
185 <<
" to cell " << it->physCellId);
186 itNrt->second.noHo =
false;
188 itNrt->second.detectedAsNeighbour =
true;
194 <<
" with newly discovered neighbouring cell "
198 neighbourRelation.
noHo =
true;
199 neighbourRelation.
noX2 =
true;
209 NS_LOG_WARN (
this <<
" Event A4 received without measurement results from neighbouring cells");
256 NS_FATAL_ERROR (
"Cell ID " << cellId <<
" cannot be found in NRT");
258 return &(it->second);
uint8_t m_threshold
The attribute Threshold.
virtual uint8_t AddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual void DoInitialize()
This method is called only once by Object::Initialize.
Reference Signal Received Quality.
const NeighbourRelation_t * Find(uint16_t cellId) const
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
void DoAddNeighbourRelation(uint16_t cellId)
Implementation of LteAnrSapProvider::AddNeighbourRelation.
std::list< MeasResultEutra > measResultListEutra
LteAnrSapProvider * m_anrSapProvider
Reference to the "provider" part of the ANR SAP interface, which is automatically created when this c...
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
void AddNeighbourRelation(uint16_t cellId)
Provide an advance information about a related neighbouring cell and add it as a new Neighbour Relati...
enum ns3::LteRrcSap::ReportConfigEutra::@72 eventId
Choice of E-UTRA event triggered reporting criteria.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_FATAL_ERROR(msg)
fatal error handling
enum ns3::LteRrcSap::ReportConfigEutra::@76 reportInterval
Indicates the interval between periodical reports.
Event A4: Neighbour becomes better than absolute threshold.
bool DoGetNoX2(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoX2.
RSRQ is used for the threshold.
Hold an unsigned integer type.
Neighbour Relation between two eNodeBs (serving eNodeB and neighbour eNodeB).
Service Access Point (SAP) offered by the eNodeB RRC instance to the ANR instance.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
virtual void SetLteAnrSapUser(LteAnrSapUser *s)
Set the "user" part of the ANR SAP interface that this ANR instance will interact with...
void RemoveNeighbourRelation(uint16_t cellId)
Remove an existing Neighbour Relation entry.
enum ns3::LteRrcSap::ThresholdEutra::@70 choice
bool haveMeasResultNeighCells
uint8_t range
Value range used in RSRP/RSRQ threshold.
LteAnr(uint16_t servingCellId)
Creates an ANR instance.
bool DoGetNoRemove(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoRemove.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
enum ns3::LteRrcSap::ReportConfigEutra::@74 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
Service Access Point (SAP) offered by the ANR instance to the eNodeB RRC instance.
virtual LteAnrSapProvider * GetLteAnrSapProvider()
Export the "provider" part of the ANR SAP interface.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
void DoReportUeMeas(LteRrcSap::MeasResults measResults)
Implementation of LteAnrSapProvider::ReportUeMeas.
a base class which provides memory management and object aggregation
static TypeId GetTypeId()
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
bool DoGetNoHo(uint16_t cellId) const
Implementation of LteAnrSapProvider::GetNoHo.
LteAnrSapUser * m_anrSapUser
Reference to the "user" part of the ANR SAP interface, which is provided by the eNodeB RRC instance...
NeighbourRelationTable_t m_neighbourRelationTable
Template for the implementation of the LteAnrSapProvider as a member of an owner class of type C to w...