21 #include <ns3/fatal-error.h>
23 #include <ns3/nstime.h>
24 #include <ns3/node-list.h>
26 #include <ns3/simulator.h>
49 : m_ueRrcSapProvider (0),
50 m_enbRrcSapProvider (0)
70 static TypeId tid =
TypeId (
"ns3::LteUeRrcProtocolIdeal")
178 uint16_t cellId =
m_rrc->GetCellId ();
185 <<
" sending UE context remove request to cell id " << cellId);
199 uint16_t cellId =
m_rrc->GetCellId ();
207 (i != listEnd) && (!found);
213 (j < nDevs) && (!found);
231 NS_ASSERT_MSG (found,
" Unable to find eNB with CellId =" << cellId);
241 : m_enbRrcSapProvider (0)
262 static TypeId tid =
TypeId (
"ns3::LteEnbRrcProtocolIdeal")
291 std::map<uint16_t, LteUeRrcSapProvider*>::const_iterator it;
300 std::map<uint16_t, LteUeRrcSapProvider*>::iterator it;
303 <<
" could not find RNTI = " << rnti);
366 for (
int j = 0; j < nDevs; ++j)
372 NS_LOG_LOGIC (
"considering UE IMSI " << ueDev->GetImsi () <<
" that has cellId " << ueRrc->GetCellId ());
373 if (ueRrc->GetCellId () == cellId)
375 NS_LOG_LOGIC (
"sending SI to IMSI " << ueDev->GetImsi ());
379 ueRrc->GetLteUeRrcSapProvider (),
482 virtual void Print (std::ostream &os)
const;
507 static TypeId tid =
TypeId (
"ns3::IdealHandoverPreparationInfoHeader")
603 virtual void Print (std::ostream &os)
const;
628 static TypeId tid =
TypeId (
"ns3::IdealHandoverCommandHeader")
686 std::map<uint32_t, LteRrcSap::RrcConnectionReconfiguration>::iterator it =
g_handoverCommandMsgMap.find (msgId);
iterator in a Buffer instance
This header encodes the map key discussed above.
virtual void Serialize(Buffer::Iterator start) const
virtual void Print(std::ostream &os) const
void SetMsgId(uint32_t id)
Set the message ID function.
uint32_t GetMsgId()
Get the message ID function.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual uint32_t GetSerializedSize(void) const
static TypeId GetTypeId(void)
Get the type ID.
uint32_t m_msgId
message ID
This header encodes the map key discussed above.
uint32_t GetMsgId()
Get the message ID function.
virtual void Print(std::ostream &os) const
void SetMsgId(uint32_t id)
Set the message ID function.
virtual uint32_t GetSerializedSize(void) const
virtual void Serialize(Buffer::Iterator start) const
uint32_t m_msgId
message ID
static TypeId GetTypeId(void)
Get the type ID.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
The eNodeB device implementation.
bool HasCellId(uint16_t cellId) const
Ptr< LteEnbRrc > GetRrc() const
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.
static TypeId GetTypeId(void)
Get the type ID.
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
void SetCellId(uint16_t cellId)
Set the cell ID function.
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.
virtual void DoDispose(void)
Destructor implementation.
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
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.
virtual ~LteEnbRrcProtocolIdeal()
uint16_t m_cellId
the cell ID
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get LTE UE RRC SAP provider function.
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
static TypeId GetTypeId(void)
Get the type ID.
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
virtual void DoDispose(void)
Destructor implementation.
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 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.
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
virtual ~LteUeRrcProtocolIdeal()
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.
uint32_t GetNDevices(void) const
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
static Iterator End(void)
static Iterator Begin(void)
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
A base class which provides memory management and object aggregation.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void AddHeader(const Header &header)
Add header to this packet.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(Time const &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.
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.