A Discrete-Event Network Simulator
API
lena-radio-link-failure.cc File Reference
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/lte-module.h"
#include "ns3/mobility-module.h"
#include "ns3/network-module.h"
#include "ns3/point-to-point-module.h"
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <vector>
+ 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)
 eNB RRC timeout tracer. More...
 
void NotifyConnectionEstablishedEnb (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
 eNB Notify connection established. More...
 
void NotifyConnectionEstablishedUe (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
 UE Notify connection established. More...
 
void NotifyConnectionReleaseAtEnodeB (uint64_t imsi, uint16_t cellId, uint16_t rnti)
 Notification of connection release at eNB. More...
 
void NotifyConnectionTimeoutUe (uint64_t imsi, uint16_t cellId, uint16_t rnti, uint8_t connEstFailCount)
 UE Connection timeout notification. More...
 
void NotifyRandomAccessErrorUe (uint64_t imsi, uint16_t cellId, uint16_t rnti)
 UE Random access error notification. More...
 
void NotifyRaResponseTimeoutUe (uint64_t imsi, bool contention, uint8_t preambleTxCounter, uint8_t maxPreambleTxLimit)
 UE RA response timeout notification. More...
 
void PhySyncDetection (uint16_t n310, uint64_t imsi, uint16_t rnti, uint16_t cellId, std::string type, uint8_t count)
 PHY sync detection tracer. More...
 
void PrintUePosition (uint64_t imsi)
 Print the position of a UE with given IMSI. More...
 
void RadioLinkFailure (Time t310, uint64_t imsi, uint16_t cellId, uint16_t rnti)
 Radio link failure tracer. More...
 
void ReceivePacket (Ptr< const Packet > packet, const Address &)
 Receive a packet. More...
 
void Throughput (bool firstWrite, Time binSize, std::string fileName)
 Write the throughput to file. More...
 
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)
 UE state transition tracer. More...
 

Variables

uint32_t ByteCounter = 0
 Byte counter. More...
 
uint16_t counterN310FirsteNB = 0
 Counter of N310 indications. More...
 
static const std::string g_ueRrcStateName [LteUeRrc::NUM_STATES]
 Map each of UE RRC states to its string representation. More...
 
uint32_t oldByteCounter = 0
 Old Byte counter,. More...
 
Time t310StartTimeFirstEnb = Seconds(0)
 Time of first N310 indication. More...
 

Function Documentation

◆ EnbRrcTimeout()

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

eNB RRC timeout tracer.

Parameters
imsiThe IMSI.
rntiThe RNTI.
cellIdThe Cell ID.
causeThe reason for timeout.

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

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

+ Here is the call graph for this function:

◆ NotifyConnectionEstablishedEnb()

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

eNB Notify connection established.

Parameters
contextThe context.
imsiThe IMSI.
cellIdThe Cell ID.
rntiThe RNTI.

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

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

+ Here is the call graph for this function:

◆ NotifyConnectionEstablishedUe()

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

UE Notify connection established.

Parameters
contextThe context.
imsiThe IMSI.
cellidThe Cell ID.
rntiThe RNTI.

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

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

+ Here is the call graph for this function:

◆ NotifyConnectionReleaseAtEnodeB()

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

Notification of connection release at eNB.

Parameters
imsiThe IMSI.
cellIdThe Cell ID.
rntiThe RNTI.

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

References ns3::Simulator::Now().

+ Here is the call graph for this function:

◆ NotifyConnectionTimeoutUe()

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

UE Connection timeout notification.

Parameters
imsiThe IMSI.
cellIdThe Cell ID.
rntiThe RNTI.
connEstFailCountConnection failure count.

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

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

+ Here is the call graph for this function:

◆ NotifyRandomAccessErrorUe()

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

UE Random access error notification.

Parameters
imsiThe IMSI.
cellIdThe Cell ID.
rntiThe RNTI.

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

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

+ Here is the call graph for this function:

◆ NotifyRaResponseTimeoutUe()

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

UE RA response timeout notification.

Parameters
imsiThe IMSI.
contentionContention flag.
preambleTxCounterPreamble Tx counter.
maxPreambleTxLimitMax preamble Ts limit.

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

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

+ 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 
)

PHY sync detection tracer.

Parameters
n310310 data.
imsiThe IMSI.
rntiThe RNTI.
cellIdThe Cell ID.
typeThe type.
countThe count.

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

References ns3::Time::As(), counterN310FirsteNB, ns3::Simulator::Now(), NS_LOG_DEBUG, ns3::Time::S, t310StartTimeFirstEnb, and check-style-clang-format::type.

+ Here is the call graph for this function:

◆ PrintUePosition()

void PrintUePosition ( uint64_t  imsi)

Print the position of a UE with given IMSI.

Parameters
imsiThe IMSI.

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::Node::GetDevice(), ns3::Node::GetNDevices(), and ns3::Object::GetObject().

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 
)

Radio link failure tracer.

Parameters
t310310 data.
imsiThe IMSI.
cellIdThe Cell ID.
rntiThe RNTI.

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

References ns3::Simulator::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  
)

Receive a packet.

Parameters
packetThe packet.

Definition at line 304 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 
)

Write the throughput to file.

Parameters
firstWriteTrue if first time writing.
binSizeBin size.
fileNameOutput filename.

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

References openflow-switch::app, ns3::Time::As(), ByteCounter, ns3::Time::GetSeconds(), ns3::Simulator::Now(), oldByteCounter, ns3::Time::S, ns3::Simulator::Schedule(), and throughput.

+ Here is the call 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 136 of file lena-radio-link-failure.cc.

References ns3::g_ueRrcStateName.

Referenced by LteSecondaryCellSelectionTestCase::StateTransitionCallback().

+ 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 
)

UE state transition tracer.

Parameters
imsiThe IMSI.
cellIdThe Cell ID.
rntiThe RNTI.
oldStateThe old state.
newStateThe new state.

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

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

+ Here is the call graph for this function:

Variable Documentation

◆ ByteCounter

uint32_t ByteCounter = 0

Byte counter.

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

Referenced by ReceivePacket(), and Throughput().

◆ counterN310FirsteNB

uint16_t counterN310FirsteNB = 0

Counter of N310 indications.

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 115 of file lena-radio-link-failure.cc.

◆ oldByteCounter

uint32_t oldByteCounter = 0

Old Byte counter,.

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

Referenced by Throughput().

◆ t310StartTimeFirstEnb

Time t310StartTimeFirstEnb = Seconds(0)

Time of first N310 indication.

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

Referenced by PhySyncDetection(), and RadioLinkFailure().