|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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 ());
376 ueRrc->GetLteUeRrcSapProvider ()->RecvSystemInformation (msg);
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);
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void DoSendRrcConnectionReestablishmentReject(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg)
Send RRC connection reestablishment reject function.
void DoSendRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Send RRC connection reestablishment request function.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
SetupUeParameters structure.
RrcConnectionSetupCompleted structure.
virtual void RecvRrcConnectionReestablishmentReject(RrcConnectionReestablishmentReject msg)=0
Receive an RRCConnectionReestablishmentReject message from the serving eNodeB during an RRC connectio...
virtual void RecvRrcConnectionSetupCompleted(uint16_t rnti, RrcConnectionSetupCompleted msg)=0
Receive an RRCConnectionSetupComplete message from a UE during an RRC connection establishment proced...
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
static Iterator Begin(void)
RrcConnectionRelease structure.
uint32_t GetMsgId()
Get the message ID function.
void AddHeader(const Header &header)
Add header to this packet.
Part of the RRC protocol.
virtual void RecvSystemInformation(SystemInformation msg)=0
Receive a SystemInformation message from the serving eNodeB during a system information acquisition p...
void DoSendRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Send RRC connection request function.
Part of the RRC protocol.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual ~LteEnbRrcProtocolIdeal()
static uint32_t g_handoverCommandMsgIdCounter
handover command message ID counter
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
virtual void DoDispose(void)
Destructor implementation.
static uint32_t g_handoverPreparationInfoMsgIdCounter
handover preparation info message ID counter
void DoSendRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Send RRC connection reestablishment complete function.
static TypeId GetTypeId(void)
Get the type ID.
void SetUeRrc(Ptr< LteUeRrc > rrc)
Set LTE UE RRC function.
virtual void RecvRrcConnectionReestablishment(RrcConnectionReestablishment msg)=0
Receive an RRCConnectionReestablishment message from the serving eNodeB during an RRC connection re-e...
RrcConnectionReconfigurationCompleted structure.
RrcConnectionReject structure.
HandoverPreparationInfo structure.
void SetMsgId(uint32_t id)
Set the message ID function.
RrcConnectionSetup structure.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
virtual void RecvRrcConnectionReestablishmentComplete(uint16_t rnti, RrcConnectionReestablishmentComplete msg)=0
Receive an RRCConnectionReestablishmentComplete message from a UE during an RRC connection re-establi...
uint32_t m_msgId
message ID
static TypeId GetTypeId(void)
Get the type ID.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void RecvRrcConnectionSetup(RrcConnectionSetup msg)=0
Receive an RRCConnectionSetup message from the serving eNodeB during an RRC connection establishment ...
static TypeId GetTypeId(void)
Get the type ID.
This header encodes the map key discussed above.
virtual void Serialize(Buffer::Iterator start) const
void DoSendRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Send RRC connection reconfiguration completed function.
Ptr< LteEnbRrc > GetRrc() const
virtual void RecvRrcConnectionReconfigurationCompleted(uint16_t rnti, RrcConnectionReconfigurationCompleted msg)=0
Receive an RRCConnectionReconfigurationComplete message from a UE during an RRC connection reconfigur...
virtual void RecvRrcConnectionReestablishmentRequest(uint16_t rnti, RrcConnectionReestablishmentRequest msg)=0
Receive an RRCConnectionReestablishmentRequest message from a UE during an RRC connection re-establis...
void DoSetup(LteUeRrcSapUser::SetupParameters params)
Setup function.
uint32_t m_msgId
message ID
LteUeRrcSapProvider * m_ueRrcSapProvider
the UE RRC SAP provider
void DoSendIdealUeContextRemoveRequest(uint16_t rnti)
Send Ideal UE context remove request function.
void DoSendSystemInformation(uint16_t cellId, LteRrcSap::SystemInformation msg)
Send system information function.
Smart pointer class similar to boost::intrusive_ptr.
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand(Ptr< Packet > p)
Decode handover command function.
uint32_t GetMsgId()
Get the message ID function.
void DoSendRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Send RRC connection setup completed function.
virtual void RecvRrcConnectionRelease(RrcConnectionRelease msg)=0
Receive an RRCConnectionRelease message from the serving eNodeB during an RRC connection release proc...
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
A base class which provides memory management and object aggregation.
RrcConnectionRequest structure.
RrcConnectionReestablishmentReject structure.
virtual void RecvIdealUeContextRemoveRequest(uint16_t rnti)=0
Receive ideal UE context remove request from the UE RRC.
void SetCellId(uint16_t cellId)
Set the cell ID function.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
friend class MemberLteEnbRrcSapUser< LteEnbRrcProtocolIdeal >
allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolIdeal> class friend access
void DoSendRrcConnectionRelease(uint16_t rnti, LteRrcSap::RrcConnectionRelease msg)
Send RRC connection release function.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
The LteUeNetDevice class implements the UE net device.
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
void SetMsgId(uint32_t id)
Set the message ID function.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t m_cellId
the cell ID
void DoSendRrcConnectionSetup(uint16_t rnti, LteRrcSap::RrcConnectionSetup msg)
Send RRC connection setup function.
LteUeRrcSapUser * GetLteUeRrcSapUser()
Get LTE UE RRC SAP user function.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
virtual void RecvRrcConnectionReject(RrcConnectionReject msg)=0
Receive an RRCConnectionReject message from the serving eNodeB during an RRC connection establishment...
RrcConnectionReestablishment structure.
virtual void Print(std::ostream &os) const
Part of the RRC protocol.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation(Ptr< Packet > p)
Encode handover preparation information function.
RrcConnectionReestablishmentRequest structure.
MeasurementReport structure.
static const Time RRC_IDEAL_MSG_DELAY
LteEnbRrcSapUser * m_enbRrcSapUser
the ENB RRC SAP user
void DoSendRrcConnectionReject(uint16_t rnti, LteRrcSap::RrcConnectionReject msg)
Send RRC connection reject function.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
void DoSendMeasurementReport(LteRrcSap::MeasurementReport msg)
Send measurement report function.
static std::map< uint32_t, LteRrcSap::RrcConnectionReconfiguration > g_handoverCommandMsgMap
handover command message map
iterator in a Buffer instance
This header encodes the map key discussed above.
Ptr< LteUeRrc > m_rrc
the RRC
Part of the RRC protocol.
static Iterator End(void)
std::map< uint16_t, LteUeRrcSapProvider * > m_enbRrcSapProviderMap
the LTE UE RRC SAP provider
virtual uint32_t GetSerializedSize(void) const
Ptr< Packet > DoEncodeHandoverPreparationInformation(LteRrcSap::HandoverPreparationInfo msg)
Encode handover preparation information function.
virtual void Serialize(Buffer::Iterator start) const
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void SetUeRrcSapProvider(uint16_t rnti, LteUeRrcSapProvider *p)
Set UE RRC SAP provider function.
SetupParameters structure.
void SetEnbRrcSapProvider()
Set ENB RRC SAP provider.
LteUeRrcSapProvider * GetUeRrcSapProvider(uint16_t rnti)
Get LTE UE RRC SAP provider function.
virtual void Print(std::ostream &os) const
void SetLteUeRrcSapProvider(LteUeRrcSapProvider *p)
Set LTE UE RRC SAP provider function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
RrcConnectionReconfiguration structure.
virtual void DoDispose(void)
Destructor implementation.
virtual ~LteUeRrcProtocolIdeal()
void DoSendRrcConnectionReconfiguration(uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg)
Send RRC connection reconfiguration function.
Models the transmission of RRC messages from the UE to the eNB in an ideal fashion,...
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
virtual void RecvRrcConnectionReconfiguration(RrcConnectionReconfiguration msg)=0
Receive an RRCConnectionReconfiguration message from the serving eNodeB during an RRC connection reco...
LteEnbRrcSapProvider * m_enbRrcSapProvider
the ENB RRC SAP provider
static TypeId GetTypeId(void)
Get the type ID.
friend class MemberLteUeRrcSapUser< LteUeRrcProtocolIdeal >
allow MemberLteUeRrcSapUser<LteUeRrcProtocolIdeal> class friend access
uint32_t GetNDevices(void) const
static std::map< uint32_t, LteRrcSap::HandoverPreparationInfo > g_handoverPreparationInfoMsgMap
handover preparation info message map
LteEnbRrcSapUser * GetLteEnbRrcSapUser()
Get LTE ENB RRC SAP user function.
virtual void RecvRrcConnectionRequest(uint16_t rnti, RrcConnectionRequest msg)=0
Receive an RRCConnectionRequest message from a UE during an RRC connection establishment procedure (S...
bool HasCellId(uint16_t cellId) const
RrcConnectionReestablishmentComplete structure.
Ptr< Packet > DoEncodeHandoverCommand(LteRrcSap::RrcConnectionReconfiguration msg)
Encode handover command function.
The eNodeB device implementation.
LteUeRrcSapUser * m_ueRrcSapUser
the RRC SAP user
void DoSendRrcConnectionReestablishment(uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg)
Send RRC connection reestablishment function.
void DoRemoveUe(uint16_t rnti)
Remove UE function.
void SetLteEnbRrcSapProvider(LteEnbRrcSapProvider *p)
Set LTE ENB RRC SAP provider function.
void DoSetupUe(uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params)
Setup UE function.