added CONNECTION_REJECTED state at LteEnbRrc

This commit is contained in:
Nicola Baldo
2012-12-19 13:59:51 +01:00
parent 9ad7e663fb
commit d43adf4f17
4 changed files with 42 additions and 33 deletions

View File

@@ -5,7 +5,8 @@ size="20,20"
NO_CONTEXT [shape="ellipse", label="no context"]
INITIAL_RANDOM_ACCESS [shape="box",width=5]
CONNECTION_SETUP [shape="box",width=5]
CONNECTION_SETUP [shape="box",width=5]
CONNECTION_REJECTED [shape="box",width=5]
CONNECTED_NORMALLY [shape="box",width=5]
CONNECTION_RECONFIGURATION [shape="box",width=5]
HANDOVER_PREPARATION [shape="box",width=5]
@@ -15,8 +16,11 @@ HANDOVER_LEAVING [shape="box",width=5]
CONTEXT_DESTROYED [shape="ellipse", label="context destroyed"]
NO_CONTEXT -> INITIAL_RANDOM_ACCESS [label="rx RA preamble",labeldistance=0]
INITIAL_RANDOM_ACCESS -> CONNECTION_SETUP [label="rx RRC CONNECTION REQUEST"]
CONNECTION_SETUP -> CONNECTED_NORMALLY [label="rx RRC CONNECTION SETUP COMPLETED"]
INITIAL_RANDOM_ACCESS -> CONNECTION_REJECTED [label="rx RRC CONN REQUEST, AdmitRrcConnectionRequest = false"]
CONNECTION_REJECTED -> CONTEXT_DESTROYED [label="maxConnectionDelay timeout"]
INITIAL_RANDOM_ACCESS -> CONTEXT_DESTROYED [label="maxRecvConnRejectDelay timeout"]
INITIAL_RANDOM_ACCESS -> CONNECTION_SETUP [label="rx RRC CONN REQUEST, AdmitRrcConnectionRequest = true"]
CONNECTION_SETUP -> CONNECTED_NORMALLY [label="rx RRC CONN SETUP COMPLETED"]
CONNECTED_NORMALLY -> CONNECTION_RECONFIGURATION [label="reconfiguration trigger"]
CONNECTION_RECONFIGURATION -> CONNECTED_NORMALLY [label="rx RRC CONN RECONF COMPLETED"]
CONNECTED_NORMALLY -> HANDOVER_PREPARATION [label="handover trigger"]

View File

@@ -99,6 +99,7 @@ const char* g_ueManagerStateName[UeManager::NUM_STATES] =
{
"INITIAL_RANDOM_ACCESS",
"CONNECTION_SETUP",
"CONNECTION_REJECTED",
"CONNECTED_NORMALLY",
"CONNECTION_RECONFIGURATION",
"CONNECTION_REESTABLISHMENT",
@@ -686,18 +687,32 @@ UeManager::RecvRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg)
{
case INITIAL_RANDOM_ACCESS:
{
m_connectionTimeout.Cancel ();
m_imsi = msg.ueIdentity;
if (m_rrc->m_s1SapProvider != 0)
if (m_rrc->m_admitRrcConnectionRequest == true)
{
m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti);
}
LteRrcSap::RrcConnectionSetup msg2;
msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier ();
msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated ();
m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2);
RecordDataRadioBearersToBeStarted ();
SwitchToState (CONNECTION_SETUP);
m_connectionTimeout.Cancel ();
m_imsi = msg.ueIdentity;
if (m_rrc->m_s1SapProvider != 0)
{
m_rrc->m_s1SapProvider->InitialUeMessage (m_imsi, m_rnti);
}
LteRrcSap::RrcConnectionSetup msg2;
msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier ();
msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated ();
m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2);
RecordDataRadioBearersToBeStarted ();
SwitchToState (CONNECTION_SETUP);
}
else
{
m_connectionTimeout.Cancel ();
NS_LOG_INFO ("rejecting connection request for RNTI " << m_rnti);
LteRrcSap::RrcConnectionReject rejectMsg;
rejectMsg.waitTime = 3;
m_rrc->m_rrcSapUser->SendRrcConnectionReject (m_rnti, rejectMsg);
Time maxRecvConnRejectDelay = MilliSeconds (30);
m_connectionTimeout = Simulator::Schedule (maxRecvConnRejectDelay, &LteEnbRrc::ConnectionTimeout, m_rrc, m_rnti);
SwitchToState (CONNECTION_REJECTED);
}
}
break;
@@ -1331,17 +1346,7 @@ LteEnbRrc::DoRecvRrcConnectionRequest (uint16_t rnti, LteRrcSap::RrcConnectionRe
{
NS_LOG_FUNCTION (this << rnti);
if (m_admitRrcConnectionRequest == true)
{
GetUeManager (rnti)->RecvRrcConnectionRequest (msg);
}
else
{
NS_LOG_INFO ("rejecting connection request to rnti " << rnti);
LteRrcSap::RrcConnectionReject rejectMsg;
rejectMsg.waitTime = 3;
m_rrcSapUser->SendRrcConnectionReject (rnti, rejectMsg);
}
}
void

View File

@@ -69,6 +69,7 @@ public:
{
INITIAL_RANDOM_ACCESS = 0,
CONNECTION_SETUP,
CONNECTION_REJECTED,
CONNECTED_NORMALLY,
CONNECTION_RECONFIGURATION,
CONNECTION_REESTABLISHMENT,

View File

@@ -320,12 +320,10 @@ LteRrcTestSuite::LteRrcTestSuite ()
{
NS_LOG_FUNCTION (this);
//AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 50, 0, 0, 0, 1, 0, true));
for (uint32_t useIdealRrc = 0; useIdealRrc <= 1; ++useIdealRrc)
{
// <----- all times in ms ----------------->
// nUes, nBearers, tConnBase, tConnIncrPerUe, delayDiscStart, useIdealRrc, admitRrcConnectionRequest
// nUes, nBearers, tConnBase, tConnIncrPerUe, delayDiscStart, useIdealRrc, admitRrcConnectionRequest
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 1, 0, 0, 0, 1, useIdealRrc, true));
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 1, 0, 100, 0, 1, useIdealRrc, true));
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 1, 1, 0, 0, 1, useIdealRrc, true));
@@ -347,12 +345,13 @@ LteRrcTestSuite::LteRrcTestSuite ()
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 20, 0, 10, 1, 1, useIdealRrc, true));
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 50, 0, 0, 0, 1, useIdealRrc, true));
// Test cases to check admitRrcConnectionRequest=false
//AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 1, 0, 0, 0, 1, useIdealRrc, false));
//AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 1, 2, 100, 0, 1, useIdealRrc, false));
//AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 2, 0, 20, 0, 1, useIdealRrc, false));
//AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 2, 1, 20, 0, 1, useIdealRrc, false));
//AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 3, 0, 20, 0, 1, useIdealRrc, false));
//Test cases to check admitRrcConnectionRequest=false
// nUes, nBearers, tConnBase, tConnIncrPerUe, delayDiscStart, useIdealRrc, admitRrcConnectionRequest
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 1, 0, 0, 0, 1, useIdealRrc, false));
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 1, 2, 100, 0, 1, useIdealRrc, false));
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 2, 0, 20, 0, 1, useIdealRrc, false));
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 2, 1, 20, 0, 1, useIdealRrc, false));
AddTestCase (new LteRrcConnectionEstablishmentTestCase ( 3, 0, 20, 0, 1, useIdealRrc, false));
// // time consuming tests with a lot of UEs
// AddTestCase (new LteRrcConnectionEstablishmentTestCase (100, 0, 10, 0, 1, useIdealRrc, true));