21 #include <ns3/fatal-error.h> 112 std::map<uint64_t, Ptr<UeInfo> >::iterator it =
m_ueInfoMap.find (imsi);
114 NS_ASSERT_MSG (it->second->bearerCounter < 11,
"too many bearers already! " << it->second->bearerCounter);
116 bearerInfo.
bearerId = ++(it->second->bearerCounter);
117 bearerInfo.
tft = tft;
118 bearerInfo.
bearer = bearer;
119 it->second->bearersToBeActivated.push_back (bearerInfo);
130 std::map<uint64_t, Ptr<UeInfo> >::iterator it =
m_ueInfoMap.find (imsi);
132 it->second->cellId = gci;
137 for (std::list<BearerInfo>::iterator bit = it->second->bearersToBeActivated.begin ();
138 bit != it->second->bearersToBeActivated.end ();
144 bearerContext.
tft = bit->tft;
158 EpcMme::DoPathSwitchRequest (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t gci, std::list<EpcS1apSapMme::ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList)
162 uint64_t imsi = mmeUeS1Id;
163 std::map<uint64_t, Ptr<UeInfo> >::iterator it =
m_ueInfoMap.find (imsi);
165 NS_LOG_INFO (
"IMSI " << imsi <<
" old eNB: " << it->second->cellId <<
", new eNB: " << gci);
166 it->second->cellId = gci;
167 it->second->enbUeS1Id = enbUeS1Id;
183 uint64_t imsi = msg.
teid;
184 std::list<EpcS1apSapEnb::ErabToBeSetupItem> erabToBeSetupList;
185 for (std::list<EpcS11SapMme::BearerContextCreated>::iterator bit = msg.
bearerContextsCreated.begin ();
190 erab.
erabId = bit->epsBearerId;
193 erab.
sgwTeid = bit->sgwFteid.teid;
194 erabToBeSetupList.push_back (erab);
196 std::map<uint64_t, Ptr<UeInfo> >::iterator it =
m_ueInfoMap.find (imsi);
198 uint16_t cellId = it->second->cellId;
199 uint16_t enbUeS1Id = it->second->enbUeS1Id;
200 uint64_t mmeUeS1Id = it->second->mmeUeS1Id;
201 std::map<uint16_t, Ptr<EnbInfo> >::iterator jt =
m_enbInfoMap.find (cellId);
203 jt->second->s1apSapEnb->InitialContextSetupRequest (mmeUeS1Id, enbUeS1Id, erabToBeSetupList);
212 uint64_t imsi = msg.teid;
213 std::map<uint64_t, Ptr<UeInfo> >::iterator it =
m_ueInfoMap.find (imsi);
215 uint64_t enbUeS1Id = it->second->enbUeS1Id;
216 uint64_t mmeUeS1Id = it->second->mmeUeS1Id;
217 uint16_t cgi = it->second->cellId;
218 std::list<EpcS1apSapEnb::ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList;
219 std::map<uint16_t, Ptr<EnbInfo> >::iterator jt =
m_enbInfoMap.find (it->second->cellId);
221 jt->second->s1apSapEnb->PathSwitchRequestAcknowledge (enbUeS1Id, mmeUeS1Id, cgi, erabToBeSwitchedInUplinkList);
228 uint64_t imsi = mmeUeS1Id;
229 std::map<uint64_t, Ptr<UeInfo> >::iterator it =
m_ueInfoMap.find (imsi);
236 for (std::list<EpcS1apSapMme::ErabToBeReleasedIndication>::iterator bit = erabToBeReleaseIndication.begin (); bit != erabToBeReleaseIndication.end (); ++bit)
240 msg.bearerContextsToBeRemoved.push_back (bearerContext);
250 uint64_t imsi = msg.teid;
251 std::map<uint64_t, Ptr<UeInfo> >::iterator it =
m_ueInfoMap.find (imsi);
257 for (std::list<EpcS11SapMme::BearerContextRemoved>::iterator bit = msg.
bearerContextsRemoved.begin ();
263 res.bearerContextsRemoved.push_back (bearerContext);
278 if (bit->bearerId == epsBearerId)
std::list< BearerContextRemoved > bearerContextsRemoved
list of bearer context removed
void DoDeleteBearerRequest(EpcS11SapMme::DeleteBearerRequestMessage msg)
Delete Bearer Request function.
void AddUe(uint64_t imsi)
Add a new UE to the MME.
enum ns3::EpcS11SapMme::ModifyBearerResponseMessage::Cause cause
the cause
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 "...
Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17.1.
MME side of the S1-AP Service Access Point (SAP), provides the MME methods to be called when an S1-AP...
MME side of the S11 Service Access Point (SAP), provides the MME methods to be called when an S11 mes...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
void DoModifyBearerResponse(EpcS11SapMme::ModifyBearerResponseMessage msg)
Modify Bearer Response function.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint8_t epsBearerId
EPS bearer ID.
std::map< uint16_t, Ptr< EnbInfo > > m_enbInfoMap
EnbInfo stored by EGCI.
EpcS1apSapMme * GetS1apSapMme()
#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.
This object implements the MME functionality.
uint64_t imsi
UE identifier.
void DoErabReleaseIndication(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabToBeReleasedIndication > erabToBeReleaseIndication)
ERAB Release Indication function.
BearerContextToBeCreated structure.
EpcS11SapSgw * m_s11SapSgw
EpcS11SapSgw.
EpsBearer bearerLevelQos
bearer QOS level
Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10.2.
BearerContextToBeCreated structure.
This class contains the specification of EPS Bearers.
eNB side of the S1-AP Service Access Point (SAP), provides the eNB methods to be called when an S1-AP...
EpcS11SapMme * GetS11SapMme()
uint8_t AddBearer(uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer)
Add an EPS bearer to the list of bearers to be activated for this UE.
uint64_t mmeUeS1Id
mmeUeS1Id
virtual void ModifyBearerRequest(ModifyBearerRequestMessage msg)=0
send a Modify Bearer Request message
Ptr< EpcTft > tft
traffic flow template
virtual ~EpcMme()
Destructor.
BearerContextRemovedSgwPgw structure.
uint8_t epsBearerId
EPS bearer ID.
uint8_t bearerId
bearer ID
Modify Bearer Request message, see 3GPP TS 29.274 7.2.7
Ipv4Address transportLayerAddress
transport layer address
Ptr< EpcTft > tft
traffic flow template
std::list< BearerInfo > bearersToBeActivated
list of bearers to be activated
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::list< BearerContextCreated > bearerContextsCreated
bearer contexts created
virtual void CreateSessionRequest(CreateSessionRequestMessage msg)=0
send a Create Session Request message
EpsBearer erabLevelQosParameters
Level QOS parameters.
virtual void DoDispose()
Destructor implementation.
uint8_t epsBearerId
EPS bearer ID.
void DoInitialUeMessage(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi)
Initial UE Message function.
Ipv4 addresses are stored in host order in this class.
SGW side of the S11 Service Access Point (SAP), provides the SGW methods to be called when an S11 mes...
std::list< BearerContextToBeCreated > bearerContextsToBeCreated
list of bearer contexts to be created
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoMap
UeInfo stored by IMSI.
void DoInitialContextSetupResponse(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabSetupItem > erabSetupList)
Initial Context Setup Response function.
void AddEnb(uint16_t ecgi, Ipv4Address enbS1UAddr, EpcS1apSapEnb *enbS1apSap)
Add a new ENB to the MME.
void DoPathSwitchRequest(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< EpcS1apSapMme::ErabSwitchedInDownlinkItem > erabToBeSwitchedInDownlinkList)
Path Switch Request function.
Template for the implementation of the EpcS1apSapMme as a member of an owner class of type C to which...
A base class which provides memory management and object aggregation.
Modify Bearer Response message, see 3GPP TS 29.274 7.2.7
EpcS1apSapMme * m_s1apSapMme
EpcS1apSapMme.
ErabToBeSetupItem structure.
EpsBearer bearer
bearer QOS characteristics
void RemoveBearer(Ptr< UeInfo > ueInfo, uint8_t epsBearerId)
This Function erases all contexts of bearer from MME side.
void SetS11SapSgw(EpcS11SapSgw *s)
Set the SGW side of the S11 SAP.
a unique identifier for an interface.
Template for the implementation of the EpcS11SapMme as a member of an owner class of type C to which ...
virtual void DeleteBearerCommand(DeleteBearerCommandMessage msg)=0
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent on the S11 inte...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
EpcS11SapMme * m_s11SapMme
EpcS11SapMme.
uint16_t bearerCounter
bearer counter
Ipv4Address s1uAddr
IP address.
void DoCreateSessionResponse(EpcS11SapMme::CreateSessionResponseMessage msg)
Create Session Response function.
virtual void DeleteBearerResponse(DeleteBearerResponseMessage msg)=0
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent on the S11 inte...
static TypeId GetTypeId(void)
Get the type ID.
Hold info on an EPS bearer to be activated.
Create Session Request message, see 3GPP TS 29.274 7.2.1
EpcS1apSapEnb * s1apSapEnb
EpcS1apSapEnb.
Create Session Response message, see 3GPP TS 29.274 7.2.2