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")
176 uint16_t cellId =
m_rrc->GetCellId ();
183 (i != listEnd) && (!found);
189 (j < nDevs) && (!found);
207 NS_ASSERT_MSG (found,
" Unable to find eNB with CellId =" << cellId);
217 : m_enbRrcSapProvider (0)
238 static TypeId tid =
TypeId (
"ns3::LteEnbRrcProtocolIdeal")
267 std::map<uint16_t, LteUeRrcSapProvider*>::const_iterator it;
276 std::map<uint16_t, LteUeRrcSapProvider*>::iterator it;
341 for (
int j = 0; j < nDevs; ++j)
347 NS_LOG_LOGIC (
"considering UE IMSI " << ueDev->GetImsi () <<
" that has cellId " << ueRrc->GetCellId ());
348 if (ueRrc->GetCellId () == cellId)
350 NS_LOG_LOGIC (
"sending SI to IMSI " << ueDev->GetImsi ());
351 ueRrc->GetLteUeRrcSapProvider ()->RecvSystemInformation (msg);
354 ueRrc->GetLteUeRrcSapProvider (),
457 virtual void Print (std::ostream &os)
const;
482 static TypeId tid =
TypeId (
"ns3::IdealHandoverPreparationInfoHeader")
578 virtual void Print (std::ostream &os)
const;
603 static TypeId tid =
TypeId (
"ns3::IdealHandoverCommandHeader")
661 std::map<uint32_t, LteRrcSap::RrcConnectionReconfiguration>::iterator it =
g_handoverCommandMsgMap.find (msgId);
This header encodes the map key discussed above.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
RrcConnectionRequest structure.
LteUeRrcSapProvider * m_ueRrcSapProvider
the UE RRC SAP provider
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
Send RRC connection reestablishment reject function.
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
virtual void Print(std::ostream &os) const
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
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.
MeasurementReport structure.
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Send RRC connection reconfiguration completed function.
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Send RRC connection reestablishment request function.
static std::map< uint32_t, LteRrcSap::HandoverPreparationInfo > g_handoverPreparationInfoMsgMap
handover preparation info message map
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
virtual void DoDispose(void)
Destructor implementation.
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Send RRC connection reconfiguration function.
Part of the RRC protocol.
Ptr< LteUeRrc > m_rrc
the RRC
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
Send RRC connection release function.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetUeRrc(Ptr< LteUeRrc > rrc)
Set LTE UE RRC function.
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Set LTE ENB RRC SAP provider function.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Template for the implementation of the LteEnbRrcSapUser as a member of an owner class of type C to wh...
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
LteEnbRrcSapUser * m_enbRrcSapUser
the ENB RRC SAP user
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
Send RRC connection setup function.
void SetMsgId(uint32_t id)
Set the message ID function.
static uint32_t g_handoverPreparationInfoMsgIdCounter
handover preparation info message ID counter
SetupParameters structure.
static const Time RRC_IDEAL_MSG_DELAY
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
static TypeId GetTypeId(void)
Get the type ID.
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 DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
Setup UE function.
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...
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
Encode handover preparation information function.
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
RrcConnectionReestablishment structure.
static TypeId GetTypeId(void)
Get the type ID.
static Iterator End(void)
virtual void RecvRrcConnectionReconfiguration(RrcConnectionReconfiguration msg)=0
Receive an RRCConnectionReconfiguration message from the serving eNodeB during an RRC connection reco...
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual void RecvRrcConnectionReestablishment(RrcConnectionReestablishment msg)=0
Receive an RRCConnectionReestablishment message from the serving eNodeB during an RRC connection re-e...
RrcConnectionReconfiguration structure.
SetupUeParameters structure.
void SetCellId(uint16_t cellId)
Set the cell ID function.
RrcConnectionReconfigurationCompleted structure.
virtual uint32_t GetSerializedSize(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual uint32_t Deserialize(Buffer::Iterator start)
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Send RRC connection request function.
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
the LTE UE RRC SAP provider
RrcConnectionSetupCompleted structure.
HandoverPreparationInfo structure.
This header encodes the map key discussed above.
LteUeRrcSapUser * m_ueRrcSapUser
the RRC SAP user
RrcConnectionSetup structure.
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Encode handover preparation information function.
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion, without errors and without consuming any radio resources.
void SetEnbRrcSapProvider()
Set ENB RRC SAP provider.
RrcConnectionReestablishmentRequest structure.
Part of the RRC protocol.
void SetMsgId(uint32_t id)
Set the message ID function.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
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
Node container iterator.
RrcConnectionReject structure.
virtual void Serialize(Buffer::Iterator start) const
uint16_t m_cellId
the cell ID
uint32_t GetMsgId()
Get the message ID function.
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)
Get the type ID.
virtual void RecvSystemInformation(SystemInformation msg)=0
Receive a SystemInformation message from the serving eNodeB during a system information acquisition p...
RrcConnectionReestablishmentReject structure.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
uint32_t GetMsgId()
Get the message ID function.
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get LTE UE RRC SAP provider function.
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
Decode handover command function.
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
Send RRC connection reject function.
static std::map< uint32_t, LteRrcSap::RrcConnectionReconfiguration > g_handoverCommandMsgMap
handover command message map
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
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)
Send RRC connection reestablishment complete function.
static Iterator Begin(void)
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
Send RRC connection reestablishment function.
virtual void Serialize(Buffer::Iterator start) const
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
Set UE RRC SAP provider function.
RrcConnectionReestablishmentComplete structure.
virtual void RecvMeasurementReport(uint16_t rnti, MeasurementReport msg)=0
Receive a MeasurementReport message from a UE during a measurement reporting procedure (Section 5...
virtual uint32_t GetSerializedSize(void) const
virtual void DoDispose(void)
Destructor implementation.
virtual uint32_t Deserialize(Buffer::Iterator start)
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
static TypeId GetTypeId(void)
Get the type ID.
static uint32_t g_handoverCommandMsgIdCounter
handover command message ID counter
virtual void Print(std::ostream &os) const
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)
Encode handover command function.
Part of the RRC protocol.
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
Get LTE ENB RRC SAP user function.
RrcConnectionRelease structure.
uint32_t m_msgId
message ID
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.
Ptr< LteEnbRrc > GetRrc() const
TypeId SetParent(TypeId tid)
Set the parent TypeId.
bool HasCellId(uint16_t cellId) const
virtual ~LteUeRrcProtocolIdeal()
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
uint32_t m_msgId
message ID
void DoRemoveUe(uint16_t rnti)
Remove UE function.
void AddHeader(const Header &header)
Add header to this packet.
uint32_t GetNDevices(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.