A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
std::string GetName () const
 
TestCaseoperator= (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, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
 
TestCaseGetParent () 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< LteHelperm_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 class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 

Detailed Description

Test rrc connection establishment.

Definition at line 26 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 179 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 140 of file test-lte-rrc.cc.

◆ CheckConnected()

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

Check connected function.

Parameters
ueDevicethe UE device
enbDevicethe ENB device

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

References ns3::ObjectPtrContainerValue::Begin(), ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::UeManager::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().

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

◆ 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 523 of file test-lte-rrc.cc.

References ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::UeManager::CONNECTED_NORMALLY, m_isConnectionEstablished, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.

Referenced by LteRrcConnectionEstablishmentErrorTestCase::DoRun().

+ 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 374 of file test-lte-rrc.cc.

References m_lteHelper, m_nBearers, ns3::EpsBearer::NGBR_VIDEO_TCP_DEFAULT, and NS_LOG_FUNCTION.

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

+ 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 554 of file test-lte-rrc.cc.

References m_isConnectionEstablished, and NS_LOG_FUNCTION.

Referenced by LteRrcConnectionEstablishmentErrorTestCase::DoRun(), and 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 564 of file test-lte-rrc.cc.

References NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

◆ DoRun()

void LteRrcConnectionEstablishmentTestCase::DoRun ( )
overrideprotectedvirtual

Member Data Documentation

◆ m_admitRrcConnectionRequest

bool LteRrcConnectionEstablishmentTestCase::m_admitRrcConnectionRequest
protected

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

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

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

◆ m_delayConnEnd

uint32_t LteRrcConnectionEstablishmentTestCase::m_delayConnEnd
protected

expected duration to perform connection establishment in ms

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

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

◆ m_delayDiscEnd

uint32_t LteRrcConnectionEstablishmentTestCase::m_delayDiscEnd
protected

expected duration to complete disconnection in ms

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

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

◆ m_delayDiscStart

uint32_t LteRrcConnectionEstablishmentTestCase::m_delayDiscStart
protected

delay between connection completed and disconnection request in ms

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

Referenced by LteRrcConnectionEstablishmentErrorTestCase::DoRun(), and 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 133 of file test-lte-rrc.cc.

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

◆ m_nBearers

uint32_t LteRrcConnectionEstablishmentTestCase::m_nBearers
protected

number of bearers to be setup in each connection

Definition at line 123 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 56 of file test-lte-rrc.cc.

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

◆ m_tConnBase

uint32_t LteRrcConnectionEstablishmentTestCase::m_tConnBase
protected

connection time base value for all UEs in ms

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

Referenced by LteRrcConnectionEstablishmentErrorTestCase::DoRun(), and 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 125 of file test-lte-rrc.cc.

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

◆ m_useIdealRrc

bool LteRrcConnectionEstablishmentTestCase::m_useIdealRrc
protected

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

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

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


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