Add support for MME UE S1AP ID in HandoverRequest X2 primitive

This commit is contained in:
Manuel Requena
2012-11-27 23:55:25 +01:00
parent c33ceaad3d
commit 2d37cbfb0b
5 changed files with 38 additions and 9 deletions

View File

@@ -149,10 +149,11 @@ NS_OBJECT_ENSURE_REGISTERED (EpcX2HandoverRequestHeader);
EpcX2HandoverRequestHeader::EpcX2HandoverRequestHeader ()
: m_numberOfIes (1 + 1 + 1 + 1),
m_headerLength (6 + 5 + 12 + (3 + 8 + 8 + 4)),
m_headerLength (6 + 5 + 12 + (3 + 4 + 8 + 8 + 4)),
m_oldEnbUeX2apId (0xfffa),
m_cause (0xfffa),
m_targetCellId (0xfffa)
m_targetCellId (0xfffa),
m_mmeUeS1apId (0xfffffffa)
{
m_erabsToBeSetupList.clear ();
}
@@ -164,6 +165,7 @@ EpcX2HandoverRequestHeader::~EpcX2HandoverRequestHeader ()
m_oldEnbUeX2apId = 0xfffb;
m_cause = 0xfffb;
m_targetCellId = 0xfffb;
m_mmeUeS1apId = 0xfffffffb;
m_erabsToBeSetupList.clear ();
}
@@ -213,6 +215,7 @@ EpcX2HandoverRequestHeader::Serialize (Buffer::Iterator start) const
i.WriteHtonU16 (14); // id = UE_CONTEXT_INFORMATION
i.WriteU8 (0); // criticality = REJECT
i.WriteHtonU32 (m_mmeUeS1apId);
i.WriteHtonU64 (m_ueAggregateMaxBitRateDownlink);
i.WriteHtonU64 (m_ueAggregateMaxBitRateUplink);
@@ -268,10 +271,11 @@ EpcX2HandoverRequestHeader::Deserialize (Buffer::Iterator start)
i.ReadNtohU16 ();
i.ReadU8 ();
m_mmeUeS1apId = i.ReadNtohU32 ();
m_ueAggregateMaxBitRateDownlink = i.ReadNtohU64 ();
m_ueAggregateMaxBitRateUplink = i.ReadNtohU64 ();
int sz = i.ReadNtohU32 ();
m_headerLength += 23;
m_headerLength += 27;
m_numberOfIes++;
for (int j = 0; j < sz; j++)
@@ -303,12 +307,13 @@ EpcX2HandoverRequestHeader::Deserialize (Buffer::Iterator start)
void
EpcX2HandoverRequestHeader::Print (std::ostream &os) const
{
os << "OldEnbUeX2apId=" << m_oldEnbUeX2apId;
os << " Cause=" << m_cause;
os << " TargetCellId=" << m_targetCellId;
os << " UeAggrMaxBitRateDownlink= " << m_ueAggregateMaxBitRateDownlink;
os << " UeAggrMaxBitRateUplink= " << m_ueAggregateMaxBitRateUplink;
os << " NumOfBearers=" << m_erabsToBeSetupList.size ();
os << "OldEnbUeX2apId = " << m_oldEnbUeX2apId;
os << " Cause = " << m_cause;
os << " TargetCellId = " << m_targetCellId;
os << " MmeUeS1apId = " << m_mmeUeS1apId;
os << " UeAggrMaxBitRateDownlink = " << m_ueAggregateMaxBitRateDownlink;
os << " UeAggrMaxBitRateUplink = " << m_ueAggregateMaxBitRateUplink;
os << " NumOfBearers = " << m_erabsToBeSetupList.size ();
std::vector <EpcX2Sap::ErabToBeSetupItem>::size_type sz = m_erabsToBeSetupList.size ();
if (sz > 0)
@@ -365,6 +370,18 @@ EpcX2HandoverRequestHeader::SetTargetCellId (uint16_t targetCellId)
m_targetCellId = targetCellId;
}
uint32_t
EpcX2HandoverRequestHeader::GetMmeUeS1apId () const
{
return m_mmeUeS1apId;
}
void
EpcX2HandoverRequestHeader::SetMmeUeS1apId (uint32_t mmeUeS1apId)
{
m_mmeUeS1apId = mmeUeS1apId;
}
std::vector <EpcX2Sap::ErabToBeSetupItem>
EpcX2HandoverRequestHeader::GetBearers () const
{

View File

@@ -101,6 +101,9 @@ public:
uint16_t GetTargetCellId () const;
void SetTargetCellId (uint16_t targetCellId);
uint32_t GetMmeUeS1apId () const;
void SetMmeUeS1apId (uint32_t mmeUeS1apId);
std::vector <EpcX2Sap::ErabToBeSetupItem> GetBearers () const;
void SetBearers (std::vector <EpcX2Sap::ErabToBeSetupItem> bearers);
@@ -120,6 +123,7 @@ private:
uint16_t m_oldEnbUeX2apId;
uint16_t m_cause;
uint16_t m_targetCellId;
uint32_t m_mmeUeS1apId;
uint64_t m_ueAggregateMaxBitRateDownlink;
uint64_t m_ueAggregateMaxBitRateUplink;
std::vector <EpcX2Sap::ErabToBeSetupItem> m_erabsToBeSetupList;

View File

@@ -210,6 +210,7 @@ public:
uint16_t cause;
uint16_t sourceCellId;
uint16_t targetCellId;
uint32_t mmeUeS1apId;
uint64_t ueAggregateMaxBitRateDownlink;
uint64_t ueAggregateMaxBitRateUplink;
std::vector <ErabToBeSetupItem> bearers;

View File

@@ -195,6 +195,7 @@ EpcX2::RecvFromX2cSocket (Ptr<Socket> socket)
params.cause = x2HoReqHeader.GetCause ();
params.sourceCellId = cellsInfo->m_remoteCellId;
params.targetCellId = x2HoReqHeader.GetTargetCellId ();
params.mmeUeS1apId = x2HoReqHeader.GetMmeUeS1apId ();
params.ueAggregateMaxBitRateDownlink = x2HoReqHeader.GetUeAggregateMaxBitRateDownlink ();
params.ueAggregateMaxBitRateUplink = x2HoReqHeader.GetUeAggregateMaxBitRateUplink ();
params.bearers = x2HoReqHeader.GetBearers ();
@@ -203,6 +204,7 @@ EpcX2::RecvFromX2cSocket (Ptr<Socket> socket)
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId);
NS_LOG_LOGIC ("cellsInfo->m_localCellId = " << cellsInfo->m_localCellId);
NS_ASSERT_MSG (params.targetCellId == cellsInfo->m_localCellId,
"TargetCellId mismatches with localCellId");
@@ -317,6 +319,7 @@ EpcX2::DoSendHandoverRequest (EpcX2SapProvider::HandoverRequestParams params)
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId);
NS_ASSERT_MSG (m_x2InterfaceSockets.find (params.targetCellId) != m_x2InterfaceSockets.end (),
"Missing infos for targetCellId = " << params.targetCellId);
@@ -334,6 +337,7 @@ EpcX2::DoSendHandoverRequest (EpcX2SapProvider::HandoverRequestParams params)
x2HoReqHeader.SetOldEnbUeX2apId (params.oldEnbUeX2apId);
x2HoReqHeader.SetCause (params.cause);
x2HoReqHeader.SetTargetCellId (params.targetCellId);
x2HoReqHeader.SetMmeUeS1apId (params.mmeUeS1apId);
x2HoReqHeader.SetUeAggregateMaxBitRateDownlink (params.ueAggregateMaxBitRateDownlink);
x2HoReqHeader.SetUeAggregateMaxBitRateUplink (params.ueAggregateMaxBitRateUplink);
x2HoReqHeader.SetBearers (params.bearers);

View File

@@ -1037,6 +1037,7 @@ LteEnbRrc::SendHandoverRequest (uint16_t rnti, uint16_t cellId)
params.cause = EpcX2SapProvider::HandoverDesirableForRadioReason;
params.sourceCellId = m_cellId;
params.targetCellId = cellId;
params.mmeUeS1apId = 1234567;
params.ueAggregateMaxBitRateDownlink = 200 * 1000;
params.ueAggregateMaxBitRateUplink = 100 * 1000;
params.bearers = ueManager->GetErabList ();
@@ -1050,6 +1051,7 @@ LteEnbRrc::SendHandoverRequest (uint16_t rnti, uint16_t cellId)
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
NS_LOG_LOGIC ("mmmUeS1apId = " << params.oldEnbUeX2apId);
NS_LOG_LOGIC ("rrcContext = " << params.rrcContext);
m_x2SapProvider->SendHandoverRequest (params);
@@ -1124,6 +1126,7 @@ LteEnbRrc::DoRecvHandoverRequest (EpcX2SapUser::HandoverRequestParams params)
NS_LOG_LOGIC ("oldEnbUeX2apId = " << params.oldEnbUeX2apId);
NS_LOG_LOGIC ("sourceCellId = " << params.sourceCellId);
NS_LOG_LOGIC ("targetCellId = " << params.targetCellId);
NS_LOG_LOGIC ("mmeUeS1apId = " << params.mmeUeS1apId);
NS_ASSERT (params.targetCellId == m_cellId);