From 7f1ef0a58baf247cd0e50a5f5d2f2d5275437c44 Mon Sep 17 00:00:00 2001 From: jnin Date: Fri, 29 Apr 2011 17:31:25 +0200 Subject: [PATCH] Added IMSI field to LteUeNetDevice as unique UE identifier. Work in progress to use it in Rlc and Mac stats output. --- src/lte/examples/lena-rlc-calculator.cc | 6 +++--- src/lte/model/lte-ue-net-device.cc | 8 ++++++++ src/lte/model/lte-ue-net-device.h | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lte/examples/lena-rlc-calculator.cc b/src/lte/examples/lena-rlc-calculator.cc index aad992359..ed981b34f 100644 --- a/src/lte/examples/lena-rlc-calculator.cc +++ b/src/lte/examples/lena-rlc-calculator.cc @@ -24,7 +24,7 @@ #include "ns3/mobility-module.h" #include "ns3/lte-module.h" #include "ns3/config-store.h" -//#include "ns3/gtk-config-store.h" +#include "ns3/gtk-config-store.h" @@ -87,8 +87,8 @@ int main (int argc, char *argv[]) Simulator::Run (); // Uncomment to show available paths - /*GtkConfigStore config; - config.ConfigureAttributes ();*/ + GtkConfigStore config; + config.ConfigureAttributes (); Simulator::Destroy (); diff --git a/src/lte/model/lte-ue-net-device.cc b/src/lte/model/lte-ue-net-device.cc index 552b022e1..d9a186c1e 100644 --- a/src/lte/model/lte-ue-net-device.cc +++ b/src/lte/model/lte-ue-net-device.cc @@ -47,6 +47,8 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED ( LteUeNetDevice); +uint64_t LteUeNetDevice::m_imsiCounter = 0; + TypeId LteUeNetDevice::GetTypeId (void) { @@ -59,6 +61,11 @@ TypeId LteUeNetDevice::GetTypeId (void) PointerValue (), MakePointerAccessor (&LteUeNetDevice::m_rrc), MakePointerChecker ()) + .AddAttribute("Imsi", + "International Mobile Subscriber Identity assigned to this UE", + UintegerValue (1), + MakeUintegerAccessor (&LteUeNetDevice::m_imsi), + MakeUintegerChecker ()) ; return tid; @@ -69,6 +76,7 @@ LteUeNetDevice::LteUeNetDevice (void) { NS_LOG_FUNCTION (this); NS_FATAL_ERROR ("This constructor should not be called"); + m_imsi = ++m_imsiCounter; } diff --git a/src/lte/model/lte-ue-net-device.h b/src/lte/model/lte-ue-net-device.h index 543f5893a..837c04159 100644 --- a/src/lte/model/lte-ue-net-device.h +++ b/src/lte/model/lte-ue-net-device.h @@ -103,6 +103,9 @@ private: Ptr m_phy; Ptr m_rrc; + uint64_t m_imsi; + static uint64_t m_imsiCounter; + };