A Discrete-Event Network Simulator
API
LteRrcConnectionEstablishmentTestCase Class Reference

Test rrc connection establishment. More...

+ Inheritance diagram for LteRrcConnectionEstablishmentTestCase:
+ Collaboration diagram for LteRrcConnectionEstablishmentTestCase:

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. More...
 
std::string GetName (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void CheckConnected (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice)
 Check connected function. More...
 
void CheckNotConnected (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice)
 Check not connected function. More...
 
void Connect (Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice)
 Connect function. More...
 
void ConnectionEstablishedCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
 Connection established callback function. More...
 
void ConnectionTimeoutCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t connEstFailCount)
 Connection timeout callback function. More...
 
virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor. More...
 
void AddTestCase (TestCase *testCase, TestDuration duration=QUICK)
 Add an individual child TestCase to this test suite. More...
 
TestCaseGetParent () const
 Get the parent of this TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) const
 Check if all tests passed. More...
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found. More...
 
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. More...
 
bool MustAssertOnFailure (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) const
 Check if this run should continue on failure. More...
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory. More...
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory. More...
 

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. More...
 

Protected Attributes

bool m_admitRrcConnectionRequest
 If set to false, eNb will not allow UE connections. More...
 
uint32_t m_delayConnEnd
 expected duration to perform connection establishment in ms More...
 
uint32_t m_delayDiscEnd
 expected duration to complete disconnection in ms More...
 
uint32_t m_delayDiscStart
 delay between connection completed and disconnection request in ms More...
 
std::map< uint64_t, bool > m_isConnectionEstablished
 key: IMSI More...
 
Ptr< LteHelperm_lteHelper
 LTE helper. More...
 
uint32_t m_nBearers
 number of bearers to be setup in each connection More...
 
uint32_t m_nUes
 number of UEs in the test More...
 
uint32_t m_tConnBase
 connection time base value for all UEs in ms More...
 
uint32_t m_tConnIncrPerUe
 additional connection time increment for each UE index (0...nUes-1) in ms More...
 
bool m_useIdealRrc
 If set to false, real RRC protocol model will be used. More...
 

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...
 

Detailed Description

Test rrc connection establishment.

Definition at line 39 of file test-lte-rrc.cc.

Constructor & Destructor Documentation

◆ LteRrcConnectionEstablishmentTestCase()

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 = "" 
)
Parameters
nUesnumber of UEs in the test
nBearersnumber of bearers to be setup in each connection
tConnBaseconnection time base value for all UEs in ms
tConnIncrPerUeadditional connection time increment for each UE index (0...nUes-1) in ms
delayDiscStartexpected duration to perform connection establishment in ms
errorExpectedif true, test case will wait a bit longer to accommodate for transmission error
useIdealRrcIf set to false, real RRC protocol model will be used
admitRrcConnectionRequestIf set to false, eNb will not allow UE connections
descriptionadditional description of the test case

Definition at line 188 of file test-lte-rrc.cc.

References ns3::TestCase::GetName(), m_delayConnEnd, m_nBearers, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

Member Function Documentation

◆ BuildNameString()

std::string LteRrcConnectionEstablishmentTestCase::BuildNameString ( uint32_t  nUes,
uint32_t  nBearers,
uint32_t  tConnBase,
uint32_t  tConnIncrPerUe,
uint32_t  delayDiscStart,
bool  useIdealRrc,
bool  admitRrcConnectionRequest,
std::string  description = "" 
)
staticprotected

Build name string function.

Parameters
nUesnumber of UEs in the test
nBearersnumber of bearers to be setup in each connection
tConnBaseconnection time base value for all UEs in ms
tConnIncrPerUeadditional connection time increment for each UE index (0...nUes-1) in ms
delayDiscStartexpected duration to perform connection establishment in ms
useIdealRrcIf set to false, real RRC protocol model will be used
admitRrcConnectionRequestIf set to false, eNb will not allow UE connections
descriptionadditional description of the test case
Returns
the name string

Definition at line 146 of file test-lte-rrc.cc.

◆ CheckConnected()

void LteRrcConnectionEstablishmentTestCase::CheckConnected ( Ptr< NetDevice ueDevice,
Ptr< NetDevice enbDevice 
)
protected

◆ CheckNotConnected()

void LteRrcConnectionEstablishmentTestCase::CheckNotConnected ( Ptr< NetDevice ueDevice,
Ptr< NetDevice enbDevice 
)
protected

Check not connected function.

Parameters
ueDevicethe UE device
enbDevicethe ENB device

Definition at line 498 of file test-lte-rrc.cc.

References ns3::Object::GetObject(), ns3::LteEnbNetDevice::GetRrc(), m_isConnectionEstablished, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.

Referenced by LteRrcConnectionEstablishmentErrorTestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Connect()

void LteRrcConnectionEstablishmentTestCase::Connect ( Ptr< NetDevice ueDevice,
Ptr< NetDevice enbDevice 
)
protected

Connect function.

Parameters
ueDevicethe UE device
enbDevicethe ENB device

Definition at line 369 of file test-lte-rrc.cc.

References ns3::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::Attach(), m_lteHelper, m_nBearers, and NS_LOG_FUNCTION.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConnectionEstablishedCallback()

void LteRrcConnectionEstablishmentTestCase::ConnectionEstablishedCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)
protected

Connection established callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe RNTI

Definition at line 529 of file test-lte-rrc.cc.

References m_isConnectionEstablished, and NS_LOG_FUNCTION.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

+ Here is the caller graph for this function:

◆ ConnectionTimeoutCallback()

void LteRrcConnectionEstablishmentTestCase::ConnectionTimeoutCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti,
uint8_t  connEstFailCount 
)
protected

Connection timeout callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe RNTI
connEstFailCountthe T300 timer expiration counter value

Definition at line 538 of file test-lte-rrc.cc.

References NS_LOG_FUNCTION.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

Member Data Documentation

◆ m_admitRrcConnectionRequest

bool LteRrcConnectionEstablishmentTestCase::m_admitRrcConnectionRequest
protected

If set to false, eNb will not allow UE connections.

Definition at line 137 of file test-lte-rrc.cc.

Referenced by CheckConnected(), DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_delayConnEnd

uint32_t LteRrcConnectionEstablishmentTestCase::m_delayConnEnd
protected

expected duration to perform connection establishment in ms

Definition at line 133 of file test-lte-rrc.cc.

Referenced by LteRrcConnectionEstablishmentTestCase(), DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_delayDiscEnd

uint32_t LteRrcConnectionEstablishmentTestCase::m_delayDiscEnd
protected

expected duration to complete disconnection in ms

Definition at line 135 of file test-lte-rrc.cc.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_delayDiscStart

uint32_t LteRrcConnectionEstablishmentTestCase::m_delayDiscStart
protected

delay between connection completed and disconnection request in ms

Definition at line 134 of file test-lte-rrc.cc.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_isConnectionEstablished

std::map<uint64_t, bool> LteRrcConnectionEstablishmentTestCase::m_isConnectionEstablished
protected

◆ m_lteHelper

Ptr<LteHelper> LteRrcConnectionEstablishmentTestCase::m_lteHelper
protected

LTE helper.

Definition at line 138 of file test-lte-rrc.cc.

Referenced by Connect(), DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_nBearers

uint32_t LteRrcConnectionEstablishmentTestCase::m_nBearers
protected

number of bearers to be setup in each connection

Definition at line 130 of file test-lte-rrc.cc.

Referenced by LteRrcConnectionEstablishmentTestCase(), CheckConnected(), and Connect().

◆ m_nUes

uint32_t LteRrcConnectionEstablishmentTestCase::m_nUes
protected

number of UEs in the test

Definition at line 68 of file test-lte-rrc.cc.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_tConnBase

uint32_t LteRrcConnectionEstablishmentTestCase::m_tConnBase
protected

connection time base value for all UEs in ms

Definition at line 131 of file test-lte-rrc.cc.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_tConnIncrPerUe

uint32_t LteRrcConnectionEstablishmentTestCase::m_tConnIncrPerUe
protected

additional connection time increment for each UE index (0...nUes-1) in ms

Definition at line 132 of file test-lte-rrc.cc.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().

◆ m_useIdealRrc

bool LteRrcConnectionEstablishmentTestCase::m_useIdealRrc
protected

If set to false, real RRC protocol model will be used.

Definition at line 136 of file test-lte-rrc.cc.

Referenced by DoRun(), and LteRrcConnectionEstablishmentErrorTestCase::DoRun().


The documentation for this class was generated from the following file: