Test rrc connection establishment. More...
Public Member Functions | |
LteRrcConnectionEstablishmentTestCase (uint32_t nUes, uint32_t nBearers, uint32_t tConnBase, uint32_t tConnIncrPerUe, uint32_t delayDiscStart, bool errorExpected, bool useIdealRrc, bool admitRrcConnectionRequest, std::string description="") | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
void | CheckConnected (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice) |
Check connected function. | |
void | CheckNotConnected (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice) |
Check not connected function. | |
void | Connect (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice) |
Connect function. | |
void | ConnectionEstablishedCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
Connection established callback function. | |
void | ConnectionTimeoutCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t connEstFailCount) |
Connection timeout callback function. | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
Protected Member Functions inherited from ns3::TestCase | |
TestCase (std::string name) | |
Constructor. | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. | |
TestCase * | GetParent () const |
Get the parent of this TestCase. | |
bool | IsStatusFailure () const |
Check if any tests failed. | |
bool | IsStatusSuccess () const |
Check if all tests passed. | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. | |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
Log the failure of this TestCase. | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. | |
Static Protected Member Functions | |
static std::string | BuildNameString (uint32_t nUes, uint32_t nBearers, uint32_t tConnBase, uint32_t tConnIncrPerUe, uint32_t delayDiscStart, bool useIdealRrc, bool admitRrcConnectionRequest, std::string description="") |
Build name string function. | |
Protected Attributes | |
bool | m_admitRrcConnectionRequest |
If set to false, eNb will not allow UE connections. | |
uint32_t | m_delayConnEnd |
expected duration to perform connection establishment in ms | |
uint32_t | m_delayDiscEnd |
expected duration to complete disconnection in ms | |
uint32_t | m_delayDiscStart |
delay between connection completed and disconnection request in ms | |
std::map< uint64_t, bool > | m_isConnectionEstablished |
key: IMSI | |
Ptr< LteHelper > | m_lteHelper |
LTE helper. | |
uint32_t | m_nBearers |
number of bearers to be setup in each connection | |
uint32_t | m_nUes |
number of UEs in the test | |
uint32_t | m_tConnBase |
connection time base value for all UEs in ms | |
uint32_t | m_tConnIncrPerUe |
additional connection time increment for each UE index (0...nUes-1) in ms | |
bool | m_useIdealRrc |
If set to false, real RRC protocol model will be used. | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
Test rrc connection establishment.
Definition at line 37 of file test-lte-rrc.cc.
LteRrcConnectionEstablishmentTestCase::LteRrcConnectionEstablishmentTestCase | ( | uint32_t | nUes, |
uint32_t | nBearers, | ||
uint32_t | tConnBase, | ||
uint32_t | tConnIncrPerUe, | ||
uint32_t | delayDiscStart, | ||
bool | errorExpected, | ||
bool | useIdealRrc, | ||
bool | admitRrcConnectionRequest, | ||
std::string | description = "" |
||
) |
nUes | number of UEs in the test |
nBearers | number of bearers to be setup in each connection |
tConnBase | connection time base value for all UEs in ms |
tConnIncrPerUe | additional connection time increment for each UE index (0...nUes-1) in ms |
delayDiscStart | expected duration to perform connection establishment in ms |
errorExpected | if true, test case will wait a bit longer to accommodate for transmission error |
useIdealRrc | If set to false, real RRC protocol model will be used |
admitRrcConnectionRequest | If set to false, eNb will not allow UE connections |
description | additional description of the test case |
Definition at line 190 of file test-lte-rrc.cc.
References ns3::TestCase::GetName(), m_delayConnEnd, m_nBearers, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
staticprotected |
Build name string function.
nUes | number of UEs in the test |
nBearers | number of bearers to be setup in each connection |
tConnBase | connection time base value for all UEs in ms |
tConnIncrPerUe | additional connection time increment for each UE index (0...nUes-1) in ms |
delayDiscStart | expected duration to perform connection establishment in ms |
useIdealRrc | If set to false, real RRC protocol model will be used |
admitRrcConnectionRequest | If set to false, eNb will not allow UE connections |
description | additional description of the test case |
Definition at line 151 of file test-lte-rrc.cc.
|
protected |
Check connected function.
ueDevice | the UE device |
enbDevice | the ENB device |
Definition at line 399 of file test-lte-rrc.cc.
References ns3::ObjectPtrContainerValue::Begin(), ns3::UeManager::CONNECTED_NORMALLY, ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::ObjectPtrContainerValue::End(), ns3::ObjectPtrContainerValue::GetN(), m_admitRrcConnectionRequest, m_isConnectionEstablished, m_nBearers, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_WARN, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
protected |
Check not connected function.
ueDevice | the UE device |
enbDevice | the ENB device |
Definition at line 534 of file test-lte-rrc.cc.
References ns3::UeManager::CONNECTED_NORMALLY, ns3::LteUeRrc::CONNECTED_NORMALLY, m_isConnectionEstablished, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.
Referenced by LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
Connect function.
ueDevice | the UE device |
enbDevice | the ENB device |
Definition at line 385 of file test-lte-rrc.cc.
References ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::Attach(), m_lteHelper, m_nBearers, ns3::EpsBearer::NGBR_VIDEO_TCP_DEFAULT, and NS_LOG_FUNCTION.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
Connection established callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
Definition at line 565 of file test-lte-rrc.cc.
References m_isConnectionEstablished, and NS_LOG_FUNCTION.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
Connection timeout callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
connEstFailCount | the T300 timer expiration counter value |
Definition at line 575 of file test-lte-rrc.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
overrideprotectedvirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Reimplemented in LteRrcConnectionEstablishmentErrorTestCase.
Definition at line 273 of file test-lte-rrc.cc.
References ns3::LteHelper::AssignStreams(), ns3::NetDeviceContainer::Begin(), CheckConnected(), Connect(), ns3::Config::Connect(), ConnectionEstablishedCallback(), ConnectionTimeoutCallback(), ns3::NodeContainer::Create(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::End(), ns3::NetDeviceContainer::Get(), ns3::TestCase::GetName(), ns3::LteHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), m_admitRrcConnectionRequest, m_delayConnEnd, m_delayDiscEnd, m_delayDiscStart, m_isConnectionEstablished, m_lteHelper, m_nUes, m_tConnBase, m_tConnIncrPerUe, m_useIdealRrc, ns3::MakeCallback(), ns3::MilliSeconds(), NS_LOG_FUNCTION, ns3::Config::Reset(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::ObjectBase::SetAttribute(), ns3::Config::SetDefault(), and ns3::Simulator::Stop().
|
protected |
If set to false, eNb will not allow UE connections.
Definition at line 143 of file test-lte-rrc.cc.
Referenced by CheckConnected(), DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
expected duration to perform connection establishment in ms
Definition at line 138 of file test-lte-rrc.cc.
Referenced by LteRrcConnectionEstablishmentTestCase(), DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
expected duration to complete disconnection in ms
Definition at line 141 of file test-lte-rrc.cc.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
delay between connection completed and disconnection request in ms
Definition at line 140 of file test-lte-rrc.cc.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
key: IMSI
Definition at line 147 of file test-lte-rrc.cc.
Referenced by CheckConnected(), CheckNotConnected(), ConnectionEstablishedCallback(), DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
LTE helper.
Definition at line 144 of file test-lte-rrc.cc.
Referenced by Connect(), DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
number of bearers to be setup in each connection
Definition at line 134 of file test-lte-rrc.cc.
Referenced by LteRrcConnectionEstablishmentTestCase(), CheckConnected(), and Connect().
|
protected |
number of UEs in the test
Definition at line 67 of file test-lte-rrc.cc.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
connection time base value for all UEs in ms
Definition at line 135 of file test-lte-rrc.cc.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
additional connection time increment for each UE index (0...nUes-1) in ms
Definition at line 136 of file test-lte-rrc.cc.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().
|
protected |
If set to false, real RRC protocol model will be used.
Definition at line 142 of file test-lte-rrc.cc.
Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().