A Discrete-Event Network Simulator
API
lena-radio-link-failure.cc File Reference
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/mobility-module.h"
#include "ns3/lte-module.h"
#include "ns3/applications-module.h"
#include "ns3/point-to-point-module.h"
#include <iostream>
#include <vector>
#include <stdio.h>
#include <iomanip>
+ Include dependency graph for lena-radio-link-failure.cc:

Go to the source code of this file.

Functions

void EnbRrcTimeout (uint64_t imsi, uint16_t rnti, uint16_t cellId, std::string cause)
 
void NotifyConnectionEstablishedEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
 
void NotifyConnectionEstablishedUe (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 
void NotifyConnectionReleaseAtEnodeB (uint64_t imsi, uint16_t cellId, uint16_t rnti)
 
void NotifyConnectionTimeoutUe (uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t connEstFailCount)
 
void NotifyRandomAccessErrorUe (uint64_t imsi, uint16_t cellId, uint16_t rnti)
 
void NotifyRaResponseTimeoutUe (uint64_t imsi, bool contention, uint8_t preambleTxCounter, uint8_t maxPreambleTxLimit)
 
void PhySyncDetection (uint16_t n310, uint64_t imsi, uint16_t rnti, uint16_t cellId, std::string type, uint8_t count)
 
void PrintUePosition (uint64_t imsi)
 
void RadioLinkFailure (Time t310, uint64_t imsi, uint16_t cellId, uint16_t rnti)
 
void ReceivePacket (Ptr< const Packet > packet, const Address &)
 
void Throughput (bool firstWrite, Time binSize, std::string fileName)
 
static const std::string & ToString (LteUeRrc::State s)
 
void UeStateTransition (uint64_t imsi, uint16_t cellId, uint16_t rnti, LteUeRrc::State oldState, LteUeRrc::State newState)
 

Variables

uint32_t ByteCounter = 0
 
uint16_t counterN310FirsteNB = 0
 
static const std::string g_ueRrcStateName [LteUeRrc::NUM_STATES]
 Map each of UE RRC states to its string representation. More...
 
uint32_t oldByteCounter = 0
 
Time t310StartTimeFirstEnb = Seconds (0)
 

Detailed Description

Usage

$ ./ns3 run "lena-radio-link-failure [Program Options]"

Program Options

--simTime
Total duration of the simulation (in seconds) [+25s]
--numberOfEnbs
Number of eNBs [1]
--n311
Number of in-synch indication [1]
--n310
Number of out-of-synch indication [1]
--t310
Timer for detecting the Radio link failure (in seconds) [+1s]
--interSiteDistance
Inter-site distance in meter [1200]
--useIdealRrc
Use ideal RRC protocol [true]
--enableCtrlErrorModel
Enable control error model [true]
--enableDataErrorModel
Enable data error model [true]
--enableNsLogs
Enable ns-3 logging (debug builds) [false]

Definition in file lena-radio-link-failure.cc.

Function Documentation

◆ EnbRrcTimeout()

void EnbRrcTimeout ( uint64_t  imsi,
uint16_t  rnti,
uint16_t  cellId,
std::string  cause 
)

Definition at line 146 of file lena-radio-link-failure.cc.

References ns3::Time::As(), and ns3::Now().

+ Here is the call graph for this function:

◆ NotifyConnectionEstablishedEnb()

void NotifyConnectionEstablishedEnb ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)

Definition at line 83 of file lena-radio-link-failure.cc.

References ns3::Time::As(), counterN310FirsteNB, and ns3::Now().

+ Here is the call graph for this function:

◆ NotifyConnectionEstablishedUe()

void NotifyConnectionEstablishedUe ( std::string  context,
uint64_t  imsi,
uint16_t  cellid,
uint16_t  rnti 
)

Definition at line 69 of file lena-radio-link-failure.cc.

References ns3::Time::As(), and ns3::Now().

+ Here is the call graph for this function:

◆ NotifyConnectionReleaseAtEnodeB()

void NotifyConnectionReleaseAtEnodeB ( uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)

Definition at line 155 of file lena-radio-link-failure.cc.

References ns3::Now().

+ Here is the call graph for this function:

◆ NotifyConnectionTimeoutUe()

void NotifyConnectionTimeoutUe ( uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti,
uint8_t  connEstFailCount 
)

Definition at line 205 of file lena-radio-link-failure.cc.

References ns3::Time::As(), and ns3::Now().

+ Here is the call graph for this function:

◆ NotifyRandomAccessErrorUe()

void NotifyRandomAccessErrorUe ( uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)

Definition at line 197 of file lena-radio-link-failure.cc.

References ns3::Time::As(), and ns3::Now().

+ Here is the call graph for this function:

◆ NotifyRaResponseTimeoutUe()

void NotifyRaResponseTimeoutUe ( uint64_t  imsi,
bool  contention,
uint8_t  preambleTxCounter,
uint8_t  maxPreambleTxLimit 
)

Definition at line 216 of file lena-radio-link-failure.cc.

References ns3::Time::As(), and ns3::Now().

+ Here is the call graph for this function:

◆ PhySyncDetection()

void PhySyncDetection ( uint16_t  n310,
uint64_t  imsi,
uint16_t  rnti,
uint16_t  cellId,
std::string  type,
uint8_t  count 
)

Definition at line 162 of file lena-radio-link-failure.cc.

References ns3::Time::As(), counterN310FirsteNB, ns3::Now(), NS_LOG_DEBUG, t310StartTimeFirstEnb, and trim-trailing-whitespace::type.

+ Here is the call graph for this function:

◆ PrintUePosition()

void PrintUePosition ( uint64_t  imsi)

Definition at line 46 of file lena-radio-link-failure.cc.

References ns3::Node::GetDevice(), ns3::Node::GetNDevices(), ns3::Object::GetObject(), and GetPosition().

Referenced by RadioLinkFailure().

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

◆ RadioLinkFailure()

void RadioLinkFailure ( Time  t310,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)

Definition at line 181 of file lena-radio-link-failure.cc.

References ns3::Now(), NS_ABORT_MSG_IF, PrintUePosition(), and t310StartTimeFirstEnb.

+ Here is the call graph for this function:

◆ ReceivePacket()

void ReceivePacket ( Ptr< const Packet packet,
const Address  
)

Definition at line 228 of file lena-radio-link-failure.cc.

References ByteCounter, and ns3::Packet::GetSize().

+ Here is the call graph for this function:

◆ Throughput()

void Throughput ( bool  firstWrite,
Time  binSize,
std::string  fileName 
)

Definition at line 234 of file lena-radio-link-failure.cc.

References ns3::Time::As(), ByteCounter, ns3::Time::GetSeconds(), ns3::Now(), oldByteCounter, and Throughput().

Referenced by Throughput().

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

◆ ToString()

static const std::string & ToString ( LteUeRrc::State  s)
static
Parameters
sThe UE RRC state.
Returns
The string representation of the given state.

Definition at line 129 of file lena-radio-link-failure.cc.

References g_ueRrcStateName.

Referenced by LteSecondaryCellSelectionTestCase::StateTransitionCallback(), and UeStateTransition().

+ Here is the caller graph for this function:

◆ UeStateTransition()

void UeStateTransition ( uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti,
LteUeRrc::State  oldState,
LteUeRrc::State  newState 
)

Definition at line 135 of file lena-radio-link-failure.cc.

References ns3::Time::As(), ns3::Now(), and ToString().

+ Here is the call graph for this function:

Variable Documentation

◆ ByteCounter

uint32_t ByteCounter = 0

Definition at line 41 of file lena-radio-link-failure.cc.

Referenced by ReceivePacket(), and Throughput().

◆ counterN310FirsteNB

uint16_t counterN310FirsteNB = 0

Definition at line 39 of file lena-radio-link-failure.cc.

Referenced by NotifyConnectionEstablishedEnb(), and PhySyncDetection().

◆ g_ueRrcStateName

const std::string g_ueRrcStateName[LteUeRrc::NUM_STATES]
static
Initial value:
=
{
"IDLE_START",
"IDLE_CELL_SEARCH",
"IDLE_WAIT_MIB_SIB1",
"IDLE_WAIT_MIB",
"IDLE_WAIT_SIB1",
"IDLE_CAMPED_NORMALLY",
"IDLE_WAIT_SIB2",
"IDLE_RANDOM_ACCESS",
"IDLE_CONNECTING",
"CONNECTED_NORMALLY",
"CONNECTED_HANDOVER",
"CONNECTED_PHY_PROBLEM",
"CONNECTED_REESTABLISHING"
}

Map each of UE RRC states to its string representation.

Definition at line 108 of file lena-radio-link-failure.cc.

Referenced by ToString().

◆ oldByteCounter

uint32_t oldByteCounter = 0

Definition at line 42 of file lena-radio-link-failure.cc.

Referenced by Throughput().

◆ t310StartTimeFirstEnb

Time t310StartTimeFirstEnb = Seconds (0)

Definition at line 40 of file lena-radio-link-failure.cc.

Referenced by PhySyncDetection(), and RadioLinkFailure().