21 #include <ns3/fatal-error.h>
23 #include <ns3/nstime.h>
24 #include <ns3/node-list.h>
26 #include <ns3/simulator.h>
46 : m_ueRrcSapProvider (0),
47 m_enbRrcSapProvider (0)
67 static TypeId tid =
TypeId (
"ns3::LteUeRrcProtocolIdeal")
69 .AddConstructor<LteUeRrcProtocolIdeal> ()
172 uint16_t cellId =
m_rrc->GetCellId ();
179 (i != listEnd) && (!found);
185 (j < nDevs) && (!found);
195 if (enbDev->GetCellId () == cellId)
203 NS_ASSERT_MSG (found,
" Unable to find eNB with CellId =" << cellId);
214 : m_enbRrcSapProvider (0)
235 static TypeId tid =
TypeId (
"ns3::LteEnbRrcProtocolIdeal")
237 .AddConstructor<LteEnbRrcProtocolIdeal> ()
263 std::map<uint16_t, LteUeRrcSapProvider*>::const_iterator it;
272 std::map<uint16_t, LteUeRrcSapProvider*>::iterator it;
337 for (
int j = 0; j < nDevs; ++j)
343 NS_LOG_LOGIC (
"considering UE IMSI " << ueDev->GetImsi () <<
" that has cellId " << ueRrc->GetCellId ());
344 if (ueRrc->GetCellId () ==
m_cellId)
346 NS_LOG_LOGIC (
"sending SI to IMSI " << ueDev->GetImsi ());
347 ueRrc->GetLteUeRrcSapProvider ()->RecvSystemInformation (msg);
350 ueRrc->GetLteUeRrcSapProvider (),
439 virtual void Print (std::ostream &os)
const;
464 static TypeId tid =
TypeId (
"ns3::IdealHandoverPreparationInfoHeader")
466 .AddConstructor<IdealHandoverPreparationInfoHeader> ()
545 virtual void Print (std::ostream &os)
const;
570 static TypeId tid =
TypeId (
"ns3::IdealHandoverCommandHeader")
572 .AddConstructor<IdealHandoverCommandHeader> ()
627 std::map<uint32_t, LteRrcSap::RrcConnectionReconfiguration>::iterator it =
g_handoverCommandMsgMap.find (msgId);
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
LteUeRrcSapProvider * m_ueRrcSapProvider
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
LteEnbRrcSapProvider * m_enbRrcSapProvider
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
virtual void RecvRrcConnectionSetupCompleted(uint16_t rnti, RrcConnectionSetupCompleted msg)=0
Receive an RRCConnectionSetupComplete message from a UE during an RRC connection establishment proced...
Part of the RRC protocol.
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
std::map< uint32_t, LteRrcSap::HandoverPreparationInfo > g_handoverPreparationInfoMsgMap
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Part of the RRC protocol.
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
virtual uint32_t GetSerializedSize(void) const
void SetUeRrc(Ptr< LteUeRrc > rrc)
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Template for the implementation of the LteEnbRrcSapUser as a member of an owner class of type C to wh...
LteEnbRrcSapUser * m_enbRrcSapUser
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
void SetMsgId(uint32_t id)
uint32_t g_handoverPreparationInfoMsgIdCounter
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
static TypeId GetTypeId(void)
virtual void RecvRrcConnectionRelease(RrcConnectionRelease msg)=0
Receive an RRCConnectionRelease message from the serving eNodeB during an RRC connection release proc...
iterator in a Buffer instance
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
virtual ~LteEnbRrcProtocolIdeal()
virtual void RecvRrcConnectionReestablishmentReject(RrcConnectionReestablishmentReject msg)=0
Receive an RRCConnectionReestablishmentReject message from the serving eNodeB during an RRC connectio...
virtual void RecvRrcConnectionReject(RrcConnectionReject msg)=0
Receive an RRCConnectionReject message from the serving eNodeB during an RRC connection establishment...
const Time RRC_IDEAL_MSG_DELAY
void DoSendSystemInformation(LteRrcSap::SystemInformation msg)
virtual void Serialize(Buffer::Iterator start) const
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
static TypeId GetTypeId(void)
static Iterator End(void)
virtual void RecvRrcConnectionReconfiguration(RrcConnectionReconfiguration msg)=0
Receive an RRCConnectionReconfiguration message from the serving eNodeB during an RRC connection reco...
virtual void RecvRrcConnectionReestablishment(RrcConnectionReestablishment msg)=0
Receive an RRCConnectionReestablishment message from the serving eNodeB during an RRC connection re-e...
virtual void Print(std::ostream &os) const
Ptr< NetDevice > GetDevice(uint32_t index) const
void SetCellId(uint16_t cellId)
virtual uint32_t Deserialize(Buffer::Iterator start)
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
virtual void Print(std::ostream &os) const
#define NS_LOG_LOGIC(msg)
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
LteUeRrcSapUser * m_ueRrcSapUser
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion, without errors and without consuming any radio resources.
virtual void Serialize(Buffer::Iterator start) const
void SetEnbRrcSapProvider()
uint32_t GetNDevices(void) const
Part of the RRC protocol.
void SetMsgId(uint32_t id)
LteUeRrcSapUser * GetLteUeRrcSapUser()
virtual void RecvRrcConnectionSetup(RrcConnectionSetup msg)=0
Receive an RRCConnectionSetup message from the serving eNodeB during an RRC connection establishment ...
std::vector< Ptr< Node > >::const_iterator Iterator
virtual void RecvRrcConnectionRequest(uint16_t rnti, RrcConnectionRequest msg)=0
Receive an RRCConnectionRequest message from a UE during an RRC connection establishment procedure (S...
static TypeId GetTypeId(void)
virtual void RecvSystemInformation(SystemInformation msg)=0
Receive a SystemInformation message from the serving eNodeB during a system information acquisition p...
NS_LOG_COMPONENT_DEFINE("LteRrcProtocolIdeal")
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
#define NS_ASSERT_MSG(condition, message)
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
std::map< uint32_t, LteRrcSap::RrcConnectionReconfiguration > g_handoverCommandMsgMap
void DoSetup(LteUeRrcSapUser::SetupParameters params)
virtual void RecvRrcConnectionReestablishmentRequest(uint16_t rnti, RrcConnectionReestablishmentRequest msg)=0
Receive an RRCConnectionReestablishmentRequest message from a UE during an RRC connection re-establis...
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
static Iterator Begin(void)
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
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 DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
virtual uint32_t Deserialize(Buffer::Iterator start)
LteEnbRrcSapProvider * m_enbRrcSapProvider
static TypeId GetTypeId(void)
virtual TypeId GetInstanceTypeId(void) const
uint32_t g_handoverCommandMsgIdCounter
virtual void RecvRrcConnectionReestablishmentComplete(uint16_t rnti, RrcConnectionReestablishmentComplete msg)=0
Receive an RRCConnectionReestablishmentComplete message from a UE during an RRC connection re-establi...
Template for the implementation of the LteUeRrcSapUser as a member of an owner class of type C to whi...
a base class which provides memory management and object aggregation
Ptr< Packet > DoEncodeHandoverCommand(LteRrcSap::RrcConnectionReconfiguration msg)
Part of the RRC protocol.
virtual TypeId GetInstanceTypeId(void) const
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
void WriteU32(uint32_t data)
The eNodeB device implementation.
virtual void RecvRrcConnectionReconfigurationCompleted(uint16_t rnti, RrcConnectionReconfigurationCompleted msg)=0
Receive an RRCConnectionReconfigurationComplete message from a UE during an RRC connection reconfigur...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
virtual ~LteUeRrcProtocolIdeal()
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
void DoRemoveUe(uint16_t rnti)
void AddHeader(const Header &header)
Add header to this packet.
virtual uint32_t GetSerializedSize(void) const
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion, without errors and without consuming any radio resources.
The LteUeNetDevice class implements the UE net device.