Bugzilla – Full Text Bug Listing |
Summary: | Add ability to set the mobility bounding rectangle after mobility model has been installed | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Robert Ammon <ammo6818> |
Component: | mobility models | Assignee: | ns-bugs <ns-bugs> |
Status: | NEEDINFO --- | ||
Severity: | enhancement | CC: | tomh |
Priority: | P3 | ||
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | All |
Description
Robert Ammon
2017-02-26 09:50:36 EST
I see another possible alternative, which is to change the direct variable access in the attribute to an accessor method: .AddAttribute ("Bounds", "The 2d bounding area", RectangleValue (Rectangle (-100, 100, -100, 100)), MakeRectangleAccessor (&RandomDirection2dMobilityModel::m_bounds), MakeRectangleChecker ()) which performs the m_helper.UpdateWithBounds (m_bounds). Would that be acceptable? I think the main issue you have is that while Bounds is changeable, you can't trigger the call to UpdateWithBounds(). If we use the attribute technique, we can avoid the new setter in the API. Also, what happens in each of these models if the bounds are updated such that the current positions now fall outside of the new bounds-- will the models be able to correctly handle such occurrences? |