16#include <ns3/fatal-error.h>
18#include <ns3/node-list.h>
20#include <ns3/nstime.h>
21#include <ns3/simulator.h>
39 : m_ueRrcSapProvider(nullptr),
40 m_enbRrcSapProvider(nullptr)
170 uint16_t cellId =
m_rrc->GetCellId();
176 NS_LOG_DEBUG(
"RNTI " << rnti <<
" sending UE context remove request to cell id " << cellId);
193 uint16_t cellId =
m_rrc->GetCellId();
203 int nDevs = node->GetNDevices();
204 for (
int j = 0; (j < nDevs) && (!found); j++)
213 if (enbDev->HasCellId(cellId))
221 NS_ASSERT_MSG(found,
" Unable to find eNB with CellId =" << cellId);
231 : m_enbRrcSapProvider(nullptr)
252 static TypeId tid =
TypeId(
"ns3::LteEnbRrcProtocolIdeal")
352 int nDevs = node->GetNDevices();
353 for (
int j = 0; j < nDevs; ++j)
359 NS_LOG_LOGIC(
"considering UE IMSI " << ueDev->GetImsi() <<
" that has cellId "
360 << ueRrc->GetCellId());
361 if (ueRrc->GetCellId() == cellId)
363 NS_LOG_LOGIC(
"sending SI to IMSI " << ueDev->GetImsi());
367 ueRrc->GetLteUeRrcSapProvider(),
448static std::map<uint32_t, LteRrcSap::HandoverPreparationInfo>
479 void Print(std::ostream& os)
const override;
503 static TypeId tid =
TypeId(
"ns3::IdealHandoverPreparationInfoHeader")
548 "msgId " << msgId <<
" already in use");
551 std::pair<uint32_t, LteRrcSap::HandoverPreparationInfo>(msgId, msg));
573static std::map<uint32_t, LteRrcSap::RrcConnectionReconfiguration>
603 void Print(std::ostream& os)
const override;
627 static TypeId tid =
TypeId(
"ns3::IdealHandoverCommandHeader")
670 "msgId " << msgId <<
" already in use");
673 std::pair<uint32_t, LteRrcSap::RrcConnectionReconfiguration>(msgId, msg));
iterator in a Buffer instance
This header encodes the map key discussed above.
uint32_t GetMsgId() const
Get the message ID function.
void Serialize(Buffer::Iterator start) const override
static TypeId GetTypeId()
Get the type ID.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetMsgId(uint32_t id)
Set the message ID function.
uint32_t GetSerializedSize() const override
uint32_t Deserialize(Buffer::Iterator start) override
void Print(std::ostream &os) const override
uint32_t m_msgId
message ID
This header encodes the map key discussed above.
uint32_t GetMsgId() const
Get the message ID function.
void Serialize(Buffer::Iterator start) const override
void Print(std::ostream &os) const override
static TypeId GetTypeId()
Get the type ID.
void SetMsgId(uint32_t id)
Set the message ID function.
uint32_t m_msgId
message ID
uint32_t GetSerializedSize() const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint32_t Deserialize(Buffer::Iterator start) override
The eNodeB device implementation.
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
void DoRemoveUe(uint16_t rnti)
Remove UE function.
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Send RRC connection reconfiguration function.
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Encode handover preparation information function.
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
Set UE RRC SAP provider function.
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
Send RRC connection setup function.
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
void SetCellId(uint16_t cellId)
Set the cell ID function.
static TypeId GetTypeId()
Get the type ID.
void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
Send RRC connection reject function.
LteEnbRrcSapUser * m_enbRrcSapUser
the ENB RRC SAP user
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
Send RRC connection reestablishment function.
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
Decode handover command function.
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
Send RRC connection release function.
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Set LTE ENB RRC SAP provider function.
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
the LTE UE RRC SAP provider
~LteEnbRrcProtocolIdeal() override
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
Send RRC connection reestablishment reject function.
friend class MemberLteEnbRrcSapUser< LteEnbRrcProtocolIdeal >
allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolIdeal> class friend access
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
Encode handover preparation information function.
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
Get LTE ENB RRC SAP user function.
Ptr< Packet > DoEncodeHandoverCommand(LteRrcSap::RrcConnectionReconfiguration msg)
Encode handover command function.
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
Setup UE function.
uint16_t m_cellId
the cell ID
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get LTE UE RRC SAP provider function.
void DoDispose() override
Destructor implementation.
Part of the RRC protocol.
virtual void RecvRrcConnectionReestablishmentRequest(uint16_t rnti, RrcConnectionReestablishmentRequest msg)=0
Receive an RRCConnectionReestablishmentRequest message from a UE during an RRC connection re-establis...
virtual void RecvRrcConnectionReestablishmentComplete(uint16_t rnti, RrcConnectionReestablishmentComplete msg)=0
Receive an RRCConnectionReestablishmentComplete message from a UE during an RRC connection re-establi...
virtual void RecvRrcConnectionReconfigurationCompleted(uint16_t rnti, RrcConnectionReconfigurationCompleted msg)=0
Receive an RRCConnectionReconfigurationComplete message from a UE during an RRC connection reconfigur...
virtual void RecvRrcConnectionRequest(uint16_t rnti, RrcConnectionRequest msg)=0
Receive an RRCConnectionRequest message from a UE during an RRC connection establishment procedure (S...
virtual void RecvRrcConnectionSetupCompleted(uint16_t rnti, RrcConnectionSetupCompleted msg)=0
Receive an RRCConnectionSetupComplete message from a UE during an RRC connection establishment proced...
virtual void RecvMeasurementReport(uint16_t rnti, MeasurementReport msg)=0
Receive a MeasurementReport message from a UE during a measurement reporting procedure (Section 5....
virtual void RecvIdealUeContextRemoveRequest(uint16_t rnti)=0
Receive ideal UE context remove request from the UE RRC.
Part of the RRC protocol.
The LteUeNetDevice class implements the UE net device.
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
Ptr< LteUeRrc > m_rrc
the RRC
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
friend class MemberLteUeRrcSapUser< LteUeRrcProtocolIdeal >
allow MemberLteUeRrcSapUser<LteUeRrcProtocolIdeal> class friend access
void DoSendIdealUeContextRemoveRequest(uint16_t rnti)
Send Ideal UE context remove request function.
LteUeRrcSapUser * m_ueRrcSapUser
the RRC SAP user
void DoDispose() override
Destructor implementation.
void SetUeRrc(Ptr< LteUeRrc > rrc)
Set LTE UE RRC function.
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Send RRC connection reestablishment request function.
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Send RRC connection reconfiguration completed function.
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
void SetEnbRrcSapProvider()
Set ENB RRC SAP provider.
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Send RRC connection reestablishment complete function.
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
~LteUeRrcProtocolIdeal() override
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Send RRC connection request function.
LteUeRrcSapProvider * m_ueRrcSapProvider
the UE RRC SAP provider
static TypeId GetTypeId()
Get the type ID.
Part of the RRC protocol.
virtual void RecvRrcConnectionReconfiguration(RrcConnectionReconfiguration msg)=0
Receive an RRCConnectionReconfiguration message from the serving eNodeB during an RRC connection reco...
virtual void RecvRrcConnectionReject(RrcConnectionReject msg)=0
Receive an RRCConnectionReject message from the serving eNodeB during an RRC connection establishment...
virtual void RecvSystemInformation(SystemInformation msg)=0
Receive a SystemInformation message from the serving eNodeB during a system information acquisition p...
virtual void RecvRrcConnectionRelease(RrcConnectionRelease msg)=0
Receive an RRCConnectionRelease message from the serving eNodeB during an RRC connection release proc...
virtual void RecvRrcConnectionReestablishmentReject(RrcConnectionReestablishmentReject msg)=0
Receive an RRCConnectionReestablishmentReject message from the serving eNodeB during an RRC connectio...
virtual void RecvRrcConnectionSetup(RrcConnectionSetup msg)=0
Receive an RRCConnectionSetup message from the serving eNodeB during an RRC connection establishment ...
virtual void RecvRrcConnectionReestablishment(RrcConnectionReestablishment msg)=0
Receive an RRCConnectionReestablishment message from the serving eNodeB during an RRC connection re-e...
Part of the RRC protocol.
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#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_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
static const Time RRC_IDEAL_MSG_DELAY
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static uint32_t g_handoverPreparationInfoMsgIdCounter
handover preparation info message ID counter
static std::map< uint32_t, LteRrcSap::RrcConnectionReconfiguration > g_handoverCommandMsgMap
handover command message map
static uint32_t g_handoverCommandMsgIdCounter
handover command message ID counter
static std::map< uint32_t, LteRrcSap::HandoverPreparationInfo > g_handoverPreparationInfoMsgMap
handover preparation info message map
SetupUeParameters structure.
HandoverPreparationInfo structure.
MeasurementReport structure.
RrcConnectionReconfigurationCompleted structure.
RrcConnectionReconfiguration structure.
RrcConnectionReestablishmentComplete structure.
RrcConnectionReestablishment structure.
RrcConnectionReestablishmentReject structure.
RrcConnectionReestablishmentRequest structure.
RrcConnectionReject structure.
RrcConnectionRelease structure.
RrcConnectionRequest structure.
RrcConnectionSetupCompleted structure.
RrcConnectionSetup structure.
SetupParameters structure.