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>
36 : m_dlOutputFilename (
""),
37 m_ulOutputFilename (
"")
54 .AddConstructor<LteStatsCalculator> ()
146 std::string ueMapPath = path.substr (0, path.find (
"/DataRadioBearerMap"));
149 if (match.
GetN () != 0)
169 std::string ueRlcPath = path.substr (0, path.find (
"/LteUePhy"));
170 ueRlcPath +=
"/LteUeRrc";
173 if (match.
GetN () != 0)
196 if (match.
GetN () != 0)
216 std::string enbNetDevicePath = path.substr (0, path.find (
"/LteEnbRrc"));
218 if (match.
GetN () != 0)
226 NS_FATAL_ERROR (
"Lookup " << enbNetDevicePath <<
" got no matches");
236 std::ostringstream oss;
237 std::string p = path.substr (0, path.find (
"/LteEnbMac"));
239 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
241 NS_LOG_LOGIC (
"FindImsiFromEnbMac: " << path <<
", " << rnti <<
", " << imsi);
250 std::ostringstream oss;
251 std::string p = path.substr (0, path.find (
"/LteEnbMac"));
253 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
255 NS_LOG_LOGIC (
"FindCellIdFromEnbMac: " << path <<
", "<< rnti <<
", " << cellId);
265 if (path.find (
"/DlPhyTransmission"))
268 std::ostringstream oss;
269 std::string p = path.substr (0, path.find (
"/LteEnbPhy"));
271 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
273 NS_LOG_LOGIC (
"FindImsiForEnb[Tx]: " << path <<
", " << rnti <<
", " << imsi);
275 else if (path.find (
"/UlPhyReception"))
277 std::string p = path.substr (0, path.find (
"/LteUePhy"));
279 NS_LOG_LOGIC (
"FindImsiForEnb[Rx]: " << path <<
", " << rnti <<
", " << imsi);
290 if (path.find (
"/UlPhyTransmission"))
292 std::string p = path.substr (0, path.find (
"/LteUePhy"));
294 NS_LOG_LOGIC (
"FindImsiForUe[Tx]: " << path <<
", " << rnti <<
", " << imsi);
296 else if (path.find (
"/DlPhyReception"))
299 std::ostringstream oss;
300 std::string p = path.substr (0, path.find (
"/LteEnbPhy"));
302 p +=
"/LteEnbRrc/UeMap/" + oss.str ();
304 NS_LOG_LOGIC (
"FindImsiForUe[Rx]: " << path <<
", " << rnti <<
", " << imsi);
static uint64_t FindImsiFromLteNetDevice(std::string path)
static uint64_t FindImsiFromUePhy(std::string path)
#define NS_LOG_FUNCTION(parameters)
static uint64_t FindImsiFromEnbMac(std::string path, uint16_t rnti)
NS_LOG_COMPONENT_DEFINE("GrantedTimeWindowMpiInterface")
uint16_t GetCellId() const
void SetCellIdPath(std::string path, uint16_t cellId)
Stores the (path, cellId) pairs in a map.
static uint16_t FindCellIdFromEnbRlcPath(std::string path)
static TypeId GetTypeId(void)
#define NS_FATAL_ERROR(msg)
fatal error handling
Config::MatchContainer LookupMatches(std::string path)
static uint16_t FindCellIdFromEnbMac(std::string path, uint16_t rnti)
std::map< std::string, uint64_t > m_pathImsiMap
void SetUlOutputFilename(std::string outputFilename)
Set the name of the file where the uplink statistics will be stored.
static uint64_t FindImsiForEnb(std::string path, uint16_t rnti)
#define NS_LOG_LOGIC(msg)
uint32_t GetN(void) const
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink statistics will be stored.
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.
Ptr< Object > Get(uint32_t i) const
static uint64_t FindImsiFromEnbRlcPath(std::string path)
static uint64_t FindImsiForUe(std::string path, uint16_t rnti)
hold a set of objects which match a specific search string.
uint16_t GetCellIdPath(std::string path)
Retrieves the cell id information for the given path.
uint64_t GetImsi(void) const
uint64_t GetImsiPath(std::string path)
Retrieves the imsi information for the given path.
std::map< std::string, uint16_t > m_pathCellIdMap
virtual ~LteStatsCalculator()
Destructor.
std::string m_dlOutputFilename
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
The eNodeB device implementation.
Ptr< T > GetObject(void) const
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
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.