Bug 1187

Summary: Provide DELETE_PERIOD scaling factor K as an attribute
Product: ns-3 Reporter: John Abraham <john.abraham.in>
Component: aodvAssignee: ns-bugs <ns-bugs>
Status: PATCH PENDING ---    
Severity: normal CC: ammo6818, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description John Abraham 2011-06-16 00:24:16 EDT
Provide DELETE_PERIOD scaling factor K as an attribute.
The current DELETE_PERIOD of 15 may be excessive for several MANET simulations.
Comment 1 Tom Henderson 2011-06-28 16:28:35 EDT
Agree with the proposal to add K.

I noticed a possible problem with the current implementation:

RoutingProtocol::RoutingProtocol () :


  DeletePeriod (Time (5 * std::max (ActiveRouteTimeout, HelloInterval))),
  m_routingTable (DeletePeriod),

m_routingTable is initialized with the DeletePeriod provided by the above default initializer, not by the attribute value  (attribute initialization is called after the constructor is called).

I'm not sure the attribute DeletePeriod is ever used; can you check?
Comment 2 Robert Ammon 2017-02-25 19:43:07 EST
DeletePeriod is indeed used by the RoutingTable implementation.

Changes uploaded as http://codereview.appspot.com/320720043 to use attributes to override constructor settings.