22#include <ns3/config.h> 
   24#include <ns3/lte-enb-net-device.h> 
   25#include <ns3/lte-enb-rrc.h> 
   26#include <ns3/lte-ue-net-device.h> 
   27#include <ns3/lte-ue-rrc.h> 
   37    : m_dlOutputFilename(
""),
 
   38      m_ulOutputFilename(
"")
 
  128    std::string ueMapPath = path.substr(0, path.find(
"/DataRadioBearerMap"));
 
  131    if (match.
GetN() != 0)
 
  136        return ueInfo->GetObject<
UeManager>()->GetImsi();
 
  153    std::string ueRlcPath = path.substr(0, path.find(
"/LteUePhy"));
 
  154    ueRlcPath += 
"/LteUeRrc";
 
  157    if (match.
GetN() != 0)
 
  160        return ueRrc->GetObject<
LteUeRrc>()->GetImsi();
 
  179    if (match.
GetN() != 0)
 
  201    std::string enbNetDevicePath = path.substr(0, path.find(
"/LteEnbRrc"));
 
  203    if (match.
GetN() != 0)
 
  212        NS_FATAL_ERROR(
"Lookup " << enbNetDevicePath << 
" got no matches");
 
  223    std::ostringstream oss;
 
  224    std::string p = path.substr(0, path.find(
"/LteEnbMac"));
 
  226    p += 
"/LteEnbRrc/UeMap/" + oss.str();
 
  228    NS_LOG_LOGIC(
"FindImsiFromEnbMac: " << path << 
", " << rnti << 
", " << imsi);
 
  237    std::ostringstream oss;
 
  238    std::string p = path.substr(0, path.find(
"/LteEnbMac"));
 
  240    p += 
"/LteEnbRrc/UeMap/" + oss.str();
 
  242    NS_LOG_LOGIC(
"FindCellIdFromEnbMac: " << path << 
", " << rnti << 
", " << cellId);
 
  251    if (path.find(
"/DlPhyTransmission"))
 
  254        std::ostringstream oss;
 
  255        std::string p = path.substr(0, path.find(
"/LteEnbPhy"));
 
  257        p += 
"/LteEnbRrc/UeMap/" + oss.str();
 
  259        NS_LOG_LOGIC(
"FindImsiForEnb[Tx]: " << path << 
", " << rnti << 
", " << imsi);
 
  261    else if (path.find(
"/UlPhyReception"))
 
  263        std::string p = path.substr(0, path.find(
"/LteUePhy"));
 
  265        NS_LOG_LOGIC(
"FindImsiForEnb[Rx]: " << path << 
", " << rnti << 
", " << imsi);
 
  275    if (path.find(
"/UlPhyTransmission"))
 
  277        std::string p = path.substr(0, path.find(
"/LteUePhy"));
 
  279        NS_LOG_LOGIC(
"FindImsiForUe[Tx]: " << path << 
", " << rnti << 
", " << imsi);
 
  281    else if (path.find(
"/DlPhyReception"))
 
  284        std::ostringstream oss;
 
  285        std::string p = path.substr(0, path.find(
"/LteEnbPhy"));
 
  287        p += 
"/LteEnbRrc/UeMap/" + oss.str();
 
  289        NS_LOG_LOGIC(
"FindImsiForUe[Rx]: " << path << 
", " << rnti << 
", " << imsi);
 
hold a set of objects which match a specific search string.
 
Ptr< Object > Get(std::size_t i) const
 
The eNodeB device implementation.
 
uint16_t GetCellId() const
 
Base class for ***StatsCalculator classes.
 
void SetImsiPath(std::string path, uint64_t imsi)
Stores the (path, imsi) pairs in a map.
 
void SetCellIdPath(std::string path, uint16_t cellId)
Stores the (path, cellId) pairs in a map.
 
bool ExistsCellIdPath(std::string path)
Checks if there is an already stored cell id for the given path.
 
std::string m_ulOutputFilename
Name of the file where the uplink results will be saved.
 
std::string GetUlOutputFilename()
Get the name of the file where the uplink statistics will be stored.
 
void SetDlOutputFilename(std::string outputFilename)
Set the name of the file where the downlink statistics will be stored.
 
static uint64_t FindImsiFromEnbRlcPath(std::string path)
Retrieves IMSI from Enb RLC path in the attribute system.
 
static uint64_t FindImsiForUe(std::string path, uint16_t rnti)
Retrieves IMSI from path for Ue in the attribute system.
 
uint64_t GetImsiPath(std::string path)
Retrieves the imsi information for the given path.
 
~LteStatsCalculator() override
Destructor.
 
static uint64_t FindImsiFromUePhy(std::string path)
Retrieves IMSI from Ue PHY path in the attribute system.
 
std::map< std::string, uint64_t > m_pathImsiMap
List of IMSI by path in the attribute system.
 
void SetUlOutputFilename(std::string outputFilename)
Set the name of the file where the uplink statistics will be stored.
 
static TypeId GetTypeId()
Register this type.
 
std::map< std::string, uint16_t > m_pathCellIdMap
List of CellId by path in the attribute system.
 
LteStatsCalculator()
Constructor.
 
bool ExistsImsiPath(std::string path)
Checks if there is an already stored IMSI for the given path.
 
static uint16_t FindCellIdFromEnbRlcPath(std::string path)
Retrieves CellId from Enb RLC path in the attribute system.
 
std::string GetDlOutputFilename()
Get the name of the file where the downlink statistics will be stored.
 
static uint64_t FindImsiFromLteNetDevice(std::string path)
Retrieves IMSI from LteNetDevice path in the attribute system.
 
static uint16_t FindCellIdFromEnbMac(std::string path, uint16_t rnti)
Retrieves CellId from Enb MAC path in the attribute system.
 
uint16_t GetCellIdPath(std::string path)
Retrieves the cell id information for the given path.
 
std::string m_dlOutputFilename
Name of the file where the downlink results will be saved.
 
static uint64_t FindImsiFromEnbMac(std::string path, uint16_t rnti)
Retrieves IMSI from Enb MAC path in the attribute system.
 
static uint64_t FindImsiForEnb(std::string path, uint16_t rnti)
Retrieves IMSI from path for Enb in the attribute system.
 
The LteUeNetDevice class implements the UE net device.
 
uint64_t GetImsi() const
Get the IMSI.
 
A base class which provides memory management and object aggregation.
 
Smart pointer class similar to boost::intrusive_ptr.
 
a unique identifier for an interface.
 
TypeId SetParent(TypeId tid)
Set the parent TypeId.
 
Manages all the radio bearer information possessed by the ENB RRC for a single UE.
 
MatchContainer LookupMatches(std::string path)
 
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
 
Every class exported by the ns3 library is enclosed in the ns3 namespace.