Bug 2571

Summary: code review: CBR (constant bit-rate) application and advanced funtionality for OnOffApplication
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: applicationsAssignee: George Riley <riley>
Status: LAST CALL ---    
Severity: enhancement CC: ns-bugs, tommaso.pecorella
Priority: P3    
Version: unspecified   
Hardware: All   
OS: All   
Attachments: split OnOffApplication AdvancedMode into two independent features

Description Tom Henderson 2016-12-09 09:30:02 EST
Added a new CBR (constant bit-rate) application and advanced functionality for OnOffApplication. 

https://codereview.appspot.com/318880043/
Comment 1 Tom Henderson 2017-01-15 19:43:57 EST
Created attachment 2747 [details]
split OnOffApplication AdvancedMode into two independent features
Comment 2 Tommaso Pecorella 2017-06-05 10:35:27 EDT
RandomSize -> RandomPacketSize
RandomInterval -> RandomPacketInterval

Plus, I'd deprecate (as soon as possible) the old attributes.
As far as I know it's not possible to avoid the two "flag" attributes, sadly.

I could have minor changes to optimize the code, but they're useless if we keep the old attributes too.
Comment 3 Tom Henderson 2017-06-17 02:24:57 EDT
(In reply to Tommaso Pecorella from comment #2)
> RandomSize -> RandomPacketSize
> RandomInterval -> RandomPacketInterval

OK

> 
> Plus, I'd deprecate (as soon as possible) the old attributes.
> As far as I know it's not possible to avoid the two "flag" attributes, sadly.
> 
> I could have minor changes to optimize the code, but they're useless if we
> keep the old attributes too.

What old attributes?  I believe they are all still used.
Comment 4 Tom Henderson 2017-06-17 02:28:00 EDT
(In reply to Tom Henderson from comment #3)
> (In reply to Tommaso Pecorella from comment #2)
> > RandomSize -> RandomPacketSize
> > RandomInterval -> RandomPacketInterval
> 
> OK
> 
> > 
> > Plus, I'd deprecate (as soon as possible) the old attributes.
> > As far as I know it's not possible to avoid the two "flag" attributes, sadly.
> > 
> > I could have minor changes to optimize the code, but they're useless if we
> > keep the old attributes too.
> 
> What old attributes?  I believe they are all still used.

If you mean to delete 'PacketSize' in favor of adding a ConstantRandomVariable when you want to make the RandomPacketSize constant, I did consider that option, but thought it may be too drastic of an API change for the common case.  Most users are unaffected by the extension as currently proposed, and it is easier to ask users to pass an integer than a constant random variable.