21 #include <ns3/fatal-error.h> 24 #include <ns3/epc-helper.h> 90 .AddTraceSource (
"StateTransition",
91 "fired upon every UE NAS state transition",
93 "ns3::EpcUeNas::StateTracedCallback")
193 NS_FATAL_ERROR (
"the necessary NAS signaling to activate a bearer after the initial context has already been setup is not implemented");
216 uint8_t bid = (uint8_t) (
id & 0x000000FF);
230 NS_LOG_WARN (
this <<
" NAS OFF, discarding packet");
void SwitchToState(State s)
Switch the UE RRC to the given state.
void ActivateEpsBearer(EpsBearer bearer, Ptr< EpcTft > tft)
Activate an EPS bearer.
Callback< void, Ptr< Packet > > m_forwardUpCallback
upward callback
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 "...
LteAsSapProvider * m_asSapProvider
LTE SAP provider.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
void Add(Ptr< EpcTft > tft, uint32_t id)
add a TFT to the Classifier
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void DoNotifyConnectionSuccessful()
Notify successful connection.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
uint32_t GetCsgId() const
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
Ptr< NetDevice > m_device
The UE NetDevice.
uint32_t Classify(Ptr< Packet > p, EpcTft::Direction direction)
classify an IP packet
static const std::string g_ueNasStateName[EpcUeNas::NUM_STATES]
Map each of UE NAS states to its string representation.
void DoNotifyConnectionReleased()
Notify connection released.
virtual void SendData(Ptr< Packet > packet, uint8_t bid)=0
Send a data packet.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void StartCellSelection(uint32_t dlEarfcn)
Causes NAS to tell AS to find a suitable cell and camp to it.
This class contains the specification of EPS Bearers.
LteAsSapUser * GetAsSapUser()
void SetCsgId(uint32_t csgId)
void SetDevice(Ptr< NetDevice > dev)
Template for the implementation of the LteAsSapUser as a member of an owner class of type C to which ...
virtual void StartCellSelection(uint32_t dlEarfcn)=0
Initiate Idle mode cell selection procedure.
uint64_t m_imsi
The unique UE identifier.
EpcTftClassifier m_tftClassifier
tft classifier
TracedCallback< State, State > m_stateTransitionCallback
The StateTransition trace source.
virtual void ForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn)=0
Force the RRC entity to stay camped on a certain eNodeB.
State m_state
The current UE NAS state.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void DoNotifyConnectionFailed()
Notify connection failed.
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
BearerToBeActivated structure.
bool Send(Ptr< Packet > p)
Enqueue an IP packet on the proper bearer for uplink transmission.
void Disconnect()
instruct the NAS to disconnect
virtual ~EpcUeNas()
Destructor.
void SetForwardUpCallback(Callback< void, Ptr< Packet > > cb)
set the callback used to forward data packets up the stack
LteAsSapUser * m_asSapUser
LTE SAP user.
void DoActivateEpsBearer(EpsBearer bearer, Ptr< EpcTft > tft)
Activate EPS Bearer.
State
Definition of NAS states as per "LTE - From theory to practice", Section 3.2.3.2 "Connection Establis...
static const std::string & ToString(EpcUeNas::State s)
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
virtual void Disconnect()=0
Tell the RRC entity to release the connection.
void SetAsSapProvider(LteAsSapProvider *s)
Set the AS SAP provider to interact with the NAS entity.
static TypeId GetTypeId(void)
Get the type ID.
The PHY layer is switched off.
virtual void Connect(void)=0
Tell the RRC entity to enter Connected mode.
void Connect()
Causes NAS to tell AS to go to ACTIVE state.
A base class which provides memory management and object aggregation.
void SetImsi(uint64_t imsi)
virtual void SetCsgWhiteList(uint32_t csgId)=0
Set the selected Closed Subscriber Group subscription list to be used for cell selection.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void DoRecvData(Ptr< Packet > packet)
Receive data.
std::list< BearerToBeActivated > m_bearersToBeActivatedList
bearers to be activated list
EpsBearer bearer
EPS bearer.
uint8_t m_bidCounter
bid counter
uint32_t m_csgId
Closed Subscriber Group identity.
virtual void DoDispose(void)
Destructor implementation.