24 #include <ns3/config.h> 25 #include <ns3/lte-enb-rrc.h> 26 #include <ns3/lte-ue-rrc.h> 27 #include <ns3/lte-enb-net-device.h> 28 #include <ns3/lte-ue-net-device.h> 37 : m_dlOutputFilename (
""),
38 m_ulOutputFilename (
"")
148 std::string ueMapPath = path.substr (0, path.find (
"/DataRadioBearerMap"));
151 if (match.
GetN () != 0)
171 std::string ueRlcPath = path.substr (0, path.find (
"/LteUePhy"));
172 ueRlcPath +=
"/LteUeRrc";
175 if (match.
GetN () != 0)
198 if (match.
GetN () != 0)
218 std::string enbNetDevicePath = path.substr (0, path.find (
"/LteEnbRrc"));
220 if (match.
GetN () != 0)
228 NS_FATAL_ERROR (
"Lookup " << enbNetDevicePath <<
" got no matches");
238 std::ostringstream oss;
239 std::string p = path.substr (0, path.find (
"/LteEnbMac"));
241 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
243 NS_LOG_LOGIC (
"FindImsiFromEnbMac: " << path <<
", " << rnti <<
", " << imsi);
252 std::ostringstream oss;
253 std::string p = path.substr (0, path.find (
"/LteEnbMac"));
255 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
257 NS_LOG_LOGIC (
"FindCellIdFromEnbMac: " << path <<
", "<< rnti <<
", " << cellId);
267 if (path.find (
"/DlPhyTransmission"))
270 std::ostringstream oss;
271 std::string p = path.substr (0, path.find (
"/LteEnbPhy"));
273 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
275 NS_LOG_LOGIC (
"FindImsiForEnb[Tx]: " << path <<
", " << rnti <<
", " << imsi);
277 else if (path.find (
"/UlPhyReception"))
279 std::string p = path.substr (0, path.find (
"/LteUePhy"));
281 NS_LOG_LOGIC (
"FindImsiForEnb[Rx]: " << path <<
", " << rnti <<
", " << imsi);
292 if (path.find (
"/UlPhyTransmission"))
294 std::string p = path.substr (0, path.find (
"/LteUePhy"));
296 NS_LOG_LOGIC (
"FindImsiForUe[Tx]: " << path <<
", " << rnti <<
", " << imsi);
298 else if (path.find (
"/DlPhyReception"))
301 std::ostringstream oss;
302 std::string p = path.substr (0, path.find (
"/LteEnbPhy"));
304 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
306 NS_LOG_LOGIC (
"FindImsiForUe[Rx]: " << path <<
", " << rnti <<
", " << imsi);
Base class for ***StatsCalculator classes.
static uint64_t FindImsiFromLteNetDevice(std::string path)
Retrieves IMSI from LteNetDevice path in the attribute system.
static uint64_t FindImsiFromUePhy(std::string path)
Retrieves IMSI from Ue PHY path in the attribute system.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
static uint64_t FindImsiFromEnbMac(std::string path, uint16_t rnti)
Retrieves IMSI from Enb MAC path in the attribute system.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
void SetCellIdPath(std::string path, uint16_t cellId)
Stores the (path, cellId) pairs in a map.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint64_t GetImsi(void) const
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Ptr< Object > Get(std::size_t i) const
std::size_t GetN(void) const
static uint16_t FindCellIdFromEnbRlcPath(std::string path)
Retrieves CellId from Enb RLC path in the attribute system.
static TypeId GetTypeId(void)
Register this type.
uint64_t GetImsi() const
Get the IMSI.
static uint16_t FindCellIdFromEnbMac(std::string path, uint16_t rnti)
Retrieves CellId from Enb MAC 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.
uint16_t GetCellId() const
static uint64_t FindImsiForEnb(std::string path, uint16_t rnti)
Retrieves IMSI from path for Enb in the attribute system.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink statistics will be stored.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
LteStatsCalculator()
Constructor.
Manages all the radio bearer information possessed by the ENB RRC for a single UE.
bool ExistsCellIdPath(std::string path)
Checks if there is an already stored cell id for the given path.
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.
hold a set of objects which match a specific search string.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
uint16_t GetCellIdPath(std::string path)
Retrieves the cell id information for the given path.
uint64_t GetImsiPath(std::string path)
Retrieves the imsi information for the given path.
MatchContainer LookupMatches(std::string path)
std::map< std::string, uint16_t > m_pathCellIdMap
List of CellId by path in the attribute system.
virtual ~LteStatsCalculator()
Destructor.
std::string m_dlOutputFilename
Name of the file where the downlink results will be saved.
void SetImsiPath(std::string path, uint64_t imsi)
Stores the (path, imsi) pairs in a map.
A base class which provides memory management and object aggregation.
std::string m_ulOutputFilename
Name of the file where the uplink results will be saved.
The eNodeB device implementation.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
bool ExistsImsiPath(std::string path)
Checks if there is an already stored IMSI for the given path.
std::string GetDlOutputFilename(void)
Get the name of the file where the downlink statistics will be stored.
The LteUeNetDevice class implements the UE net device.