Change variable in a class method - RLC and PDCP

164 views
Skip to first unread message

Felipe Fideles

unread,
Jun 29, 2015, 8:40:28 PM6/29/15
to ns-3-...@googlegroups.com
Hi,

I am needing to change and have access to the variables that represent the RLC and PDCP delays. Is there a way to change them without changing the code of the .cc files?

They can be found in the file radio-bearer-stats-calculator.cc and in lte-pdcp.cc (lines 207-212):

Best Regards,


Felipe Fideles

unread,
Jul 1, 2015, 9:11:36 AM7/1/15
to ns-3-...@googlegroups.com

Any help will be appreciated. Thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lW8PR69kePY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Jul 2, 2015, 6:37:05 PM7/2/15
to ns-3-...@googlegroups.com
Patience....

From a quick look I'd say that no you'll have to modify the .cc.

Have fun,

T.

Felipe Fideles

unread,
Jul 3, 2015, 1:30:51 PM7/3/15
to ns-3-...@googlegroups.com
Thanks for answering. When changing the files, I am adding an attribute pdcp_delay to the class, so that I can access it through an attribute. However, I am getting the following error when trying to access the variable through a Config::SetDefault:

msg="Could not set default value for ns3::LtePdcp::pdcp_delay", file=../src/core/model/config.cc, line=682

I'm trying to access it through:
Config::SetDefault ("ns3::LtePdcp::pdcp_delay", UintegerValue(80));

The lte-pdcp.h and lte-pdcp.cc are attached. My changes are between /****/ notes.

Thanks,

--
Felipe Fideles




lte-pdcp.cc
lte-pdcp.h

Konstantinos

unread,
Jul 3, 2015, 1:53:31 PM7/3/15
to ns-3-...@googlegroups.com, f.fi...@gmail.com
Hi,

Please check how you define the attribute and how you use it.
https://www.nsnam.org/docs/manual/html/attributes.html#defining-attributes

I think that the name needs to be a single word (the highlighted part below)

   
.AddAttribute ("PDCP Delay",
                   
"PDCP Delay",
                   
UintegerValue (50),
                   
MakeUintegerAccessor (&LtePdcp::pdcp_delay),
                   
MakeUintegerChecker<uint32_t>())

and when you want to change it, you need to refer it with that name not the underlying member variable. Here you need to change the highlighted part with the same name you will put in the highlighted part above.


Config::SetDefault ("ns3::LtePdcp::pdcp_delay", UintegerValue(80));



Regards,
K


On Friday, 3 July 2015 18:30:51 UTC+1, Felipe Fideles wrote:
Thanks for answering. When changing the files, I am adding an attribute pdcp_delay to the class, so that I can access it through an attribute. However, I am getting the following error when trying to access the variable through a Config::SetDefault:

msg="Could not set default value for ns3::LtePdcp::pdcp_delay", file=../src/core/model/config.cc, line=682

I'm trying to access it through:
Config::SetDefault ("ns3::LtePdcp::pdcp_delay", UintegerValue(80));

The lte-pdcp.h and lte-pdcp.cc are attached. My changes are between /****/ notes.

Thanks,

--
Felipe Fideles




2015-07-02 18:37 GMT-04:00 Tommaso Pecorella <tomm...@gmail.com>:
Patience....

From a quick look I'd say that no you'll have to modify the .cc.

Have fun,

T.


On Tuesday, June 30, 2015 at 2:40:28 AM UTC+2, Felipe Fideles wrote:
Hi,

I am needing to change and have access to the variables that represent the RLC and PDCP delays. Is there a way to change them without changing the code of the .cc files?

They can be found in the file radio-bearer-stats-calculator.cc and in lte-pdcp.cc (lines 207-212):

Best Regards,


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lW8PR69kePY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Felipe Fideles

unread,
Jul 3, 2015, 2:06:27 PM7/3/15
to ns-3-...@googlegroups.com
Thank you very much, it worked!

--
Felipe Fideles





--
Felipe Fideles




To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lW8PR69kePY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Felipe Fideles

unread,
Jul 18, 2015, 1:21:03 PM7/18/15
to ns-3-...@googlegroups.com
Hi, I have the following topology in the file attached:

UE1 ->eNB1 -> PGW -> eNB2 -> UE2


I want to run simulations to experiment with varying the delays. The delay should be randomly modified and I want to see what is the effect that it causes in the packets.

What do you suggest to modify the delays? I already tried to change the default value of the propagation channel delay using 

p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (20)));

But nothing happens. 

Regards,

Felipe

Felipe Fideles

unread,
Jul 18, 2015, 1:21:54 PM7/18/15
to ns-3-...@googlegroups.com
The file is attached now.


test.cc

Konstantinos

unread,
Jul 18, 2015, 6:17:52 PM7/18/15
to ns-3-...@googlegroups.com, f.fi...@gmail.com
Hi Filipe,

What do you expect this delay to do? 
Do you want to simulate some type of processing delay?
Because the random delay experienced in LTE is related to the traffic load/available RBs/schedulers etc.
Your previous file (lte-pdcp.cc) just added an attribute for delay, but it actually did not use that delay anywhere apart from in a trace-source.

Regarding the p2p propagation delay, that will only affect P2P links that the specific p2p-helper is used for (the PGW and RemoteHost).
The P2P links between eNB and PGW are constructed internally.

Regards,
K.

Felipe Fideles

unread,
Jul 19, 2015, 1:24:59 PM7/19/15
to ns-3-...@googlegroups.com
Hi Konstantinos,

Thank you for answering. I need to be able to change latencies in any of the pieces of the model in the program so that they affect packets' delays and I can measure them as an output. I just need to know what type of input delay I should change.

To measure the packet delay, I can use timestamps, right?

Is it possible also to change them dinamically as the simulations are running? I mean, set a input variable for that.

Regards,

Felipe

Konstantinos

unread,
Jul 19, 2015, 5:31:39 PM7/19/15
to ns-3-...@googlegroups.com, f.fi...@gmail.com
Hi,


On Sunday, July 19, 2015 at 6:24:59 PM UTC+1, Felipe Fideles wrote:
Hi Konstantinos,

Thank you for answering. I need to be able to change latencies in any of the pieces of the model in the program so that they affect packets' delays and I can measure them as an output. I just need to know what type of input delay I should change.


latency is generally very abstract (unless you define what you actually measure - e.g. end-to-end latency, link latency, etc) and by 'model' do you mean the whole LTE model? That's again very general.
As I said in the previous reply, there is latency coming from the scheduling/queueing etc that you can't deterministically control as they are function of the load and other parameters. 
Changing the delay for the p2p links between enbs and pgw is not in the public API. However, that does not obstruct you from changing the API as NS-3 is open-source. 
 
To measure the packet delay, I can use timestamps, right?

Yes, but you can also use the LTE traces and FlowMonitor statistics already there.
 

Is it possible also to change them dinamically as the simulations are running? I mean, set a input variable for that.


Answer the first question and that will give you more insights on what can be changed dynamically during simulations.

Felipe Fideles

unread,
Jul 19, 2015, 6:11:15 PM7/19/15
to ns-3-...@googlegroups.com
I would like to measure end-to-end delays. And by model, sorry about that, I meant the topology I have in the program

UE1 ->eNB1 -> PGW -> eNB2 -> UE2


Is there a way to input a delay on the system that can actually change the end-to-end delays? 

Sorry by the simple questions, I am trying to understand how the delays work in ns3.

Felipe

Konstantinos

unread,
Jul 19, 2015, 6:24:15 PM7/19/15
to ns-3-...@googlegroups.com, f.fi...@gmail.com
No, you can't input a simple variable representing the delay, it's more complex than that.
NS3 is quite close to real systems so the delay will be a function of several parameters and can change during the simulation e.g. if the traffic load changes, if the nodes are moving.
I would recommend to study the NS-3 documentation that explains the system model of LTE implementation.

Felipe Fideles

unread,
Jul 20, 2015, 1:21:35 PM7/20/15
to ns-3-...@googlegroups.com
Thanks, I will take a look at that.

So, even if I change the p2p delay I can't change the end-to-end packet delay that can be calculated with timestamps? I was looking for putting delay on the nodes with constant traffic and position of them.

Thank you for your help. I really appreciated that.

Regards,

Felipe


Konstantinos

unread,
Jul 20, 2015, 2:46:50 PM7/20/15
to ns-3-...@googlegroups.com, f.fi...@gmail.com
Hi,

I didn't say that you can't change the delay, but there are several inputs that account the end-to-end delay.
The P2P delay will be the delay from the "EPC" component. The most important factor though for comparing two schedulers, will be the access delay on the wireless medium which is not affected by the p2p delay.
You can have constant traffic/position on the nodes, but the number of the nodes will affect the performance. 
e.g. in your example you only have 1 UE/ENB. That is not a realistic scenario, neither will it give valid results.

Regards,
K.
Reply all
Reply to author
Forward
0 new messages