24#include "ns3/callback.h"
26#include "ns3/ipv4-header.h"
28#include "ns3/ipv6-header.h"
30#include "ns3/llc-snap-header.h"
32#include "ns3/packet-burst.h"
33#include "ns3/packet.h"
34#include "ns3/pointer.h"
35#include "ns3/simulator.h"
36#include "ns3/trace-source-accessor.h"
37#include "ns3/uinteger.h"
38#include <ns3/ipv4-l3-protocol.h>
39#include <ns3/ipv6-l3-protocol.h>
41#include <ns3/object-factory.h>
42#include <ns3/object-map.h>
55 TypeId(
"ns3::LteUeNetDevice")
57 .AddConstructor<LteUeNetDevice>()
58 .AddAttribute(
"EpcUeNas",
59 "The NAS associated to this UeNetDevice",
63 .AddAttribute(
"LteUeRrc",
64 "The RRC associated to this UeNetDevice",
68 .AddAttribute(
"LteUeComponentCarrierManager",
69 "The ComponentCarrierManager associated to this UeNetDevice",
73 .AddAttribute(
"ComponentCarrierMapUe",
74 "List of all component Carrier.",
79 "International Mobile Subscriber Identity assigned to this UE",
85 "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
86 "as per 3GPP 36.101 Section 5.7.3.",
92 "The Closed Subscriber Group (CSG) identity that this UE is associated with, "
93 "i.e., giving the UE access to cells which belong to this particular CSG. "
94 "This restriction only applies to initial cell selection and EPC-enabled "
96 "This does not revoke the UE's access to non-CSG cells.",
105 : m_isConstructed(false)
159 return m_ccMap.at(0)->GetMac();
173 return m_ccMap.at(0)->GetPhy();
240std::map<uint8_t, Ptr<ComponentCarrierUe>>
261 it->second->GetPhy()->Initialize();
262 it->second->GetMac()->Initialize();
273 "unsupported protocol " << protocolNumber
274 <<
", only IPv4 and IPv6 are supported");
275 return m_nas->Send(packet, protocolNumber);
a polymophic address class
static const uint16_t PROT_NUMBER
Protocol number (0x0800)
static const uint16_t PROT_NUMBER
The protocol number for IPv6 (0x86DD).
LteNetDevice provides basic implementation for all LTE network devices.
void DoDispose() override
Destructor implementation.
uint32_t m_csgId
the CSG ID
void DoInitialize() override
Initialize() implementation.
Ptr< LteUeRrc > m_rrc
the RRC
static TypeId GetTypeId()
Get the type ID.
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
std::map< uint8_t, Ptr< ComponentCarrierUe > > m_ccMap
CC map.
~LteUeNetDevice() override
Ptr< LteUeComponentCarrierManager > GetComponentCarrierManager() const
Get the componentn carrier manager.
Ptr< LteEnbNetDevice > GetTargetEnb()
Get the target eNB where the UE is registered.
Ptr< LteUeRrc > GetRrc() const
Get the RRC.
Ptr< EpcUeNas > GetNas() const
Get the NAS.
uint64_t GetImsi() const
Get the IMSI.
void SetCsgId(uint32_t csgId)
Enlist the UE device as a member of a particular CSG.
Ptr< LteUeComponentCarrierManager > m_componentCarrierManager
the component carrier manager
Ptr< LteUePhy > GetPhy() const
Get the Phy.
uint32_t m_dlEarfcn
downlink carrier frequency
void SetDlEarfcn(uint32_t earfcn)
Ptr< LteUeMac > GetMac() const
Get the MAC.
Ptr< EpcUeNas > m_nas
the NAS
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
std::map< uint8_t, Ptr< ComponentCarrierUe > > GetCcMap()
Get the ComponentCarrier Map for the UE.
void SetTargetEnb(Ptr< LteEnbNetDevice > enb)
Set the target eNB where the UE is registered.
void DoDispose() override
Destructor implementation.
void SetCcMap(std::map< uint8_t, Ptr< ComponentCarrierUe > > ccm)
Set the ComponentCarrier Map for the UE.
uint32_t GetDlEarfcn() const
Ptr< LteEnbNetDevice > m_targetEnb
target ENB
uint32_t GetCsgId() const
Returns the CSG ID the UE is currently a member of.
bool m_isConstructed
is constructed?
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
#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_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_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeUintegerChecker()
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
ObjectPtrContainerValue ObjectMapValue
ObjectMapValue is an alias for ObjectPtrContainerValue.
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
Ptr< const AttributeChecker > MakeObjectMapChecker()