#include <epc-ue-nas.h>
Classes | |
struct | BearerToBeActivated |
Public Types | |
enum | State { OFF = 0, ATTACHING, IDLE_REGISTERED, CONNECTING_TO_EPC, ACTIVE, NUM_STATES } |
Definition of NAS states as per "LTE - From theory to practice", Section 3.2.3.2 "Connection Establishment and Release". More... | |
Public Member Functions | |
EpcUeNas () | |
Constructor. More... | |
virtual | ~EpcUeNas () |
Destructor. More... | |
void | ActivateEpsBearer (EpsBearer bearer, Ptr< EpcTft > tft) |
Activate an EPS bearer. More... | |
void | Connect () |
Causes NAS to tell AS to go to ACTIVE state. More... | |
void | Connect (uint16_t cellId, uint16_t dlEarfcn) |
Causes NAS to tell AS to camp to a specific cell and go to ACTIVE state. More... | |
void | Disconnect () |
instruct the NAS to disconnect More... | |
virtual void | DoDispose (void) |
This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
LteAsSapUser * | GetAsSapUser () |
uint32_t | GetCsgId () const |
State | GetState () const |
bool | Send (Ptr< Packet > p) |
Enqueue an IP packet on the proper bearer for uplink transmission. More... | |
void | SetAsSapProvider (LteAsSapProvider *s) |
Set the AS SAP provider to interact with the NAS entity. More... | |
void | SetCsgId (uint32_t csgId) |
void | SetDevice (Ptr< NetDevice > dev) |
void | SetForwardUpCallback (Callback< void, Ptr< Packet > > cb) |
set the callback used to forward data packets up the stack More... | |
void | SetImsi (uint64_t imsi) |
void | StartCellSelection (uint16_t dlEarfcn) |
Causes NAS to tell AS to find a suitable cell and camp to it. More... | |
![]() | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
Run the DoDispose methods of this object and all the objects aggregated to it. More... | |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
This method calls the virtual DoInitialize method on all the objects aggregated to this object. More... | |
![]() | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
void | DoActivateEpsBearer (EpsBearer bearer, Ptr< EpcTft > tft) |
void | DoNotifyConnectionFailed () |
void | DoNotifyConnectionReleased () |
void | DoNotifyConnectionSuccessful () |
void | DoRecvData (Ptr< Packet > packet) |
void | SwitchToState (State s) |
Private Attributes | |
LteAsSapProvider * | m_asSapProvider |
LteAsSapUser * | m_asSapUser |
std::list< BearerToBeActivated > | m_bearersToBeActivatedList |
uint8_t | m_bidCounter |
uint32_t | m_csgId |
Ptr< NetDevice > | m_device |
Callback< void, Ptr< Packet > > | m_forwardUpCallback |
uint64_t | m_imsi |
State | m_state |
TracedCallback< State, State > | m_stateTransitionCallback |
EpcTftClassifier | m_tftClassifier |
Friends | |
class | MemberLteAsSapUser< EpcUeNas > |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
This method is called only once by Object::Initialize. More... | |
virtual void | NotifyNewAggregate (void) |
This method is invoked whenever two sets of objects are aggregated together. More... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
ns3::EpcUeNas is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
Definition at line 34 of file epc-ue-nas.h.
enum ns3::EpcUeNas::State |
Definition of NAS states as per "LTE - From theory to practice", Section 3.2.3.2 "Connection Establishment and Release".
Enumerator | |
---|---|
OFF | |
ATTACHING | |
IDLE_REGISTERED | |
CONNECTING_TO_EPC | |
ACTIVE | |
NUM_STATES |
Definition at line 156 of file epc-ue-nas.h.
ns3::EpcUeNas::EpcUeNas | ( | ) |
Constructor.
Definition at line 57 of file epc-ue-nas.cc.
References m_asSapUser, and NS_LOG_FUNCTION.
|
virtual |
Activate an EPS bearer.
bearer | the characteristics of the bearer to be created |
tft | the TFT identifying the traffic that will go on this bearer |
Definition at line 182 of file epc-ue-nas.cc.
References ACTIVE, ns3::EpcUeNas::BearerToBeActivated::bearer, m_bearersToBeActivatedList, m_state, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::EpcUeNas::BearerToBeActivated::tft.
Referenced by ns3::EmuEpcHelper::ActivateEpsBearer().
void ns3::EpcUeNas::Connect | ( | ) |
Causes NAS to tell AS to go to ACTIVE state.
The end result is equivalent with EMM Registered + ECM Connected states.
Definition at line 151 of file epc-ue-nas.cc.
References ns3::LteAsSapProvider::Connect(), m_asSapProvider, and NS_LOG_FUNCTION.
void ns3::EpcUeNas::Connect | ( | uint16_t | cellId, |
uint16_t | dlEarfcn | ||
) |
Causes NAS to tell AS to camp to a specific cell and go to ACTIVE state.
cellId | the id of the eNB to camp on |
dlEarfcn | the DL frequency of the eNB |
The end result is equivalent with EMM Registered + ECM Connected states. Since RRC Idle Mode cell selection is not supported yet, we force the UE RRC to be camped on a specific eNB.
Definition at line 160 of file epc-ue-nas.cc.
References ns3::LteAsSapProvider::Connect(), ns3::LteAsSapProvider::ForceCampedOnEnb(), m_asSapProvider, and NS_LOG_FUNCTION.
void ns3::EpcUeNas::Disconnect | ( | ) |
instruct the NAS to disconnect
Definition at line 173 of file epc-ue-nas.cc.
References ns3::LteAsSapProvider::Disconnect(), m_asSapProvider, NS_LOG_FUNCTION, OFF, and SwitchToState().
Definition at line 263 of file epc-ue-nas.cc.
References ns3::EpcTftClassifier::Add(), m_bidCounter, m_tftClassifier, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by SwitchToState().
|
virtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
Definition at line 74 of file epc-ue-nas.cc.
References m_asSapUser, and NS_LOG_FUNCTION.
|
private |
Definition at line 240 of file epc-ue-nas.cc.
References ns3::LteAsSapProvider::Connect(), m_asSapProvider, NS_LOG_FUNCTION, and ns3::Simulator::ScheduleNow().
|
private |
Definition at line 256 of file epc-ue-nas.cc.
References NS_LOG_FUNCTION, OFF, and SwitchToState().
|
private |
Definition at line 232 of file epc-ue-nas.cc.
References ACTIVE, NS_LOG_FUNCTION, and SwitchToState().
Definition at line 249 of file epc-ue-nas.cc.
References m_forwardUpCallback, and NS_LOG_FUNCTION.
LteAsSapUser * ns3::EpcUeNas::GetAsSapUser | ( | ) |
Definition at line 130 of file epc-ue-nas.cc.
References m_asSapUser, and NS_LOG_FUNCTION.
uint32_t ns3::EpcUeNas::GetCsgId | ( | ) | const |
Definition at line 116 of file epc-ue-nas.cc.
References m_csgId, and NS_LOG_FUNCTION.
EpcUeNas::State ns3::EpcUeNas::GetState | ( | void | ) | const |
Definition at line 272 of file epc-ue-nas.cc.
References m_state, and NS_LOG_FUNCTION.
|
static |
Definition at line 81 of file epc-ue-nas.cc.
References m_stateTransitionCallback, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
Enqueue an IP packet on the proper bearer for uplink transmission.
p | the packet |
Definition at line 201 of file epc-ue-nas.cc.
References ACTIVE, ns3::EpcTftClassifier::Classify(), m_asSapProvider, m_state, m_tftClassifier, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_WARN, ns3::LteAsSapProvider::SendData(), and ns3::EpcTft::UPLINK.
void ns3::EpcUeNas::SetAsSapProvider | ( | LteAsSapProvider * | s | ) |
Set the AS SAP provider to interact with the NAS entity.
s | the AS SAP provider |
Definition at line 123 of file epc-ue-nas.cc.
References m_asSapProvider, NS_LOG_FUNCTION, and s.
void ns3::EpcUeNas::SetCsgId | ( | uint32_t | csgId | ) |
csgId | Closed Subscriber Group identity |
Definition at line 108 of file epc-ue-nas.cc.
References m_asSapProvider, m_csgId, NS_LOG_FUNCTION, and ns3::LteAsSapProvider::SetCsgWhiteList().
dev | the UE NetDevice |
Definition at line 94 of file epc-ue-nas.cc.
References m_device, and NS_LOG_FUNCTION.
set the callback used to forward data packets up the stack
cb | the callback |
Definition at line 137 of file epc-ue-nas.cc.
References m_forwardUpCallback, and NS_LOG_FUNCTION.
void ns3::EpcUeNas::SetImsi | ( | uint64_t | imsi | ) |
imsi | the unique UE identifier |
Definition at line 101 of file epc-ue-nas.cc.
References m_imsi, and NS_LOG_FUNCTION.
void ns3::EpcUeNas::StartCellSelection | ( | uint16_t | dlEarfcn | ) |
Causes NAS to tell AS to find a suitable cell and camp to it.
dlEarfcn | the DL frequency of the eNB |
Definition at line 144 of file epc-ue-nas.cc.
References m_asSapProvider, NS_LOG_FUNCTION, and ns3::LteAsSapProvider::StartCellSelection().
|
private |
Definition at line 279 of file epc-ue-nas.cc.
References ACTIVE, DoActivateEpsBearer(), m_bearersToBeActivatedList, m_imsi, m_state, m_stateTransitionCallback, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::ToString().
Referenced by Disconnect(), DoNotifyConnectionReleased(), and DoNotifyConnectionSuccessful().
|
friend |
Definition at line 36 of file epc-ue-nas.h.
|
private |
Definition at line 194 of file epc-ue-nas.h.
Referenced by Connect(), Disconnect(), DoNotifyConnectionFailed(), Send(), SetAsSapProvider(), SetCsgId(), and StartCellSelection().
|
private |
Definition at line 195 of file epc-ue-nas.h.
Referenced by DoDispose(), EpcUeNas(), and GetAsSapUser().
|
private |
Definition at line 208 of file epc-ue-nas.h.
Referenced by ActivateEpsBearer(), and SwitchToState().
|
private |
Definition at line 197 of file epc-ue-nas.h.
Referenced by DoActivateEpsBearer().
|
private |
Definition at line 192 of file epc-ue-nas.h.
Referenced by GetCsgId(), and SetCsgId().
Definition at line 188 of file epc-ue-nas.h.
Referenced by SetDevice().
Definition at line 200 of file epc-ue-nas.h.
Referenced by DoRecvData(), and SetForwardUpCallback().
|
private |
Definition at line 190 of file epc-ue-nas.h.
Referenced by SetImsi(), and SwitchToState().
|
private |
Definition at line 184 of file epc-ue-nas.h.
Referenced by ActivateEpsBearer(), GetState(), Send(), and SwitchToState().
|
private |
Definition at line 186 of file epc-ue-nas.h.
Referenced by GetTypeId(), and SwitchToState().
|
private |
Definition at line 198 of file epc-ue-nas.h.
Referenced by DoActivateEpsBearer(), and Send().