Skip to first unread message

el9339

unread,
Nov 30, 2017, 7:06:47 AM11/30/17
to ns-3-users
Hi,

I have a system in wich I connect a user to a several eNBs, however I just want to see the traces coming from one eNB, so How can I disconnect the traces created by the other eNB? I tried with this code.

  Ptr<BoundCallbackArgument> arg = Create<BoundCallbackArgument> ();
  arg->imsi = imsi;
  arg->cellId = cellId;
  arg->stats = m_rlcStats;

  // diconnect traces
  // At UE
      Config::Disconnect (ueRrcPath + "/Srb0/LteRlc/TxPDU",
                          MakeBoundCallback (&UlTxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/Srb0/LteRlc/RxPDU",
                          MakeBoundCallback (&DlRxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/Srb1/LteRlc/TxPDU",
                          MakeBoundCallback (&UlTxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/Srb1/LteRlc/RxPDU",
                          MakeBoundCallback (&DlRxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/DataRadioBearerMap/*/LteRlc/TxPDU",
                          MakeBoundCallback (&UlTxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/DataRadioBearerMap/*/LteRlc/RxPDU",
                          MakeBoundCallback (&DlRxPduCallback, arg));


Nevertheless, It seems doesn't work because traces from the undesired eNB are still generating. Any suggestions?

Thank you in advance.
Best Regards,

El,

Tommaso Pecorella

unread,
Nov 30, 2017, 7:32:06 PM11/30/17
to ns-3-users
Hi,

sorry but I have a question. Do you want to disconnect them at runtime or what ?
My suggestion would be to not connect them in first place...

T.

el9339

unread,
Dec 1, 2017, 4:56:16 AM12/1/17
to ns-3-users
Hi Tommaso, 

Thanks for your quick reply. 
Yes, I would like to connect and disconnect them at runtime. So the idea is dynamically to change the status of the traces for different eNBs in order to print properly the packets received from the desired eNB to the user. I cannot skip the connection part since the attach process considers at the begining of the simulation. 

On the other hand, I could see in "Radio-Bearer-Stats-Connector" class that methods such as: "DisconnectAllTracesUe()" and "DisconnectAllTracesEnb()" are completely empty. Is any other reference to this issue? I am not able to find it..

Thanks!
BR,

El

Tommaso Pecorella

unread,
Dec 3, 2017, 7:28:10 AM12/3/17
to ns-3-users
Hi,

please provide a small script showing the problem.

Thanks,

T.

el9339

unread,
Dec 4, 2017, 5:33:09 AM12/4/17
to ns-3-users
Hi Tommaso,

I attach here a kind of pseudocode that is more help than the full code since it includes more things apart from the conect/disconnection process. 

// MAIN
Attach(ues, enb(0));

// Scheduler (PF-FF-MAC-SCHEDULER slightly modified)
  • After assigning the available RBs to the different UEs
    • Connect the assigned UEs to ENB (1)
    • Disconnect traces of the assigned UEs from ENB(0)
for (uint16_t i=0; i<ueDevsContainer.GetN(); i++)
{
Ptr<LteUeNetDevice> ueNetDevice = ueDevsContainer.Get(i)->GetObject<LteUeNetDevice>();
if (ueNetDevice->GetImsi() == imsi)
{
Ptr<LteUeRrc> ueRrc = ueNetDevice->GetRrc();
ueRrc->DisconnectPreviousTraces(cellId);
}


// LTE-UE-RRC

void
DisconnectPreviousTraces(uint16_t cellId)
{
m_disconect(m_imsi, cellId, m_rnti); // m_disconnect is a tracesource connected to RadioBearerStatsConnector::DisconnectPreviousTracesUE

}

// Radio-Bearer-Stats-Connector

void
DisconnectPreviousTracesUE(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
{
  NS_LOG_FUNCTION (this << imsi << cellId << rnti);
  std::string ueRrcPath =  context.substr (0, context.rfind ("/"));
 
  std::ostringstream sourceCellPath;
  hipercellPath <<  "/NodeList/0/DeviceList/0/LteEnbRrc/UeMap/" << (uint32_t) rnti; // I ADDED THIS INFORMATION BECAUSE IT COMES FROM THE ORIGIN CELL TO WHICH THE UEs WHERE ATTACHED
  std::string ueManagerPath = hipercellPath.str ();
  if (m_rlcStats)
{
  Ptr<BoundCallbackArgument> arg = Create<BoundCallbackArgument> ();
  arg->imsi = imsi;
  arg->cellId = cellId;
  arg->stats = m_rlcStats;

  // diconnect eventually previously connected SRB0 both at UE and eNB
  // At UE
      Config::Disconnect (ueRrcPath + "/Srb0/LteRlc/TxPDU",
                          MakeBoundCallback (&UlTxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/Srb0/LteRlc/RxPDU",
                          MakeBoundCallback (&DlRxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/Srb1/LteRlc/TxPDU",
                          MakeBoundCallback (&UlTxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/Srb1/LteRlc/RxPDU",
                          MakeBoundCallback (&DlRxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/DataRadioBearerMap/*/LteRlc/TxPDU",
                          MakeBoundCallback (&UlTxPduCallback, arg));
      Config::Disconnect (ueRrcPath + "/DataRadioBearerMap/*/LteRlc/RxPDU",
                          MakeBoundCallback (&DlRxPduCallback, arg));


  // At eNB
      Config::Disconnect (ueManagerPath + "/Srb0/LteRlc/TxPDU",
                          MakeBoundCallback (&DlTxPduCallback, arg));
      Config::Disconnect (ueManagerPath + "/Srb0/LteRlc/RxPDU",
                          MakeBoundCallback (&UlRxPduCallback, arg));
      Config::Disconnect (ueManagerPath + "/Srb1/LteRlc/TxPDU",
                          MakeBoundCallback (&DlTxPduCallback, arg));
      Config::Disconnect (ueManagerPath + "/Srb1/LteRlc/RxPDU",
                          MakeBoundCallback (&UlRxPduCallback, arg));
      Config::Disconnect (ueManagerPath + "/DataRadioBearerMap/*/LteRlc/TxPDU",
                  MakeBoundCallback (&UlTxPduCallback, arg));
      Config::Disconnect (ueManagerPath + "/DataRadioBearerMap/*/LteRlc/RxPDU",
                  MakeBoundCallback (&DlRxPduCallback, arg));

}
}



After debugging this code it seems the disconnection process is done sucessfully since ObjectBase::TraceDisconnect(...) returns "ok", however checking the RlcStatsFile you could see that the RX PDUs are 2 times the PDUs received trully...

I would really appreciate any help from your side since it is quite important for me and also for the project I am working on. 

Thank you very much for your help.
BR,

El

Tommaso Pecorella

unread,
Dec 4, 2017, 4:47:39 PM12/4/17
to ns-3-users
Small pseudocode isn't a working script. Do you expect that we re-build a script to mimic your ?

T.

el9339

unread,
Dec 5, 2017, 2:42:28 AM12/5/17
to ns-3-users
No, of course not, you are right, but I don't have a small script to share with you because for running just this part I will have to share with you the full code (lte-enb-mac, lte-enb-rrc, lte-rlc, lte-ue-mac, lte-ue-rrc, radio-bearer-stats-connector, radio-bearer-stats calculator, pfffmacscheduler, etc). I am just asking for help regarding with a problem with the disconnection process of the traces since the methods "DisconnectAllTracesUe" and "DisconnectAllTracesEnb" in RadioBeareStatsConnector class are completely empty (as I mentioned above). 
I would appreciate if you could indicate me how to proceed...

BR,
El 

Juan

unread,
Dec 12, 2017, 7:02:00 AM12/12/17
to ns-3-users
Hi,
 
I'm interested on the same question. I want to disconnect the traces corresponding to one link UE-eNB because I want to reconnect this UE to another eNB without attaching to the new eNB, just connect it manually as well as the required traces. I would like to do that dynamically in scheduler class.

el9339

unread,
Dec 19, 2017, 4:09:58 AM12/19/17
to ns-3-users
Any help?? 

Tommaso Pecorella

unread,
Dec 23, 2017, 6:44:12 PM12/23/17
to ns-3-users
Hi,

you're right, the functions are empty. I'd suggest to check with the LTE maintainer.

T.

el9339

unread,
Dec 28, 2017, 9:00:01 AM12/28/17
to ns-3-users
Ok, Thank you. I will contact them.

BR,
El
Reply all
Reply to author
Forward
0 new messages