|
Bugzilla – Full Text Bug Listing |
| Summary: | Changing base station position in wimax-multicast has no effect | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Anirudh <sk.anirudh> |
| Component: | examples | Assignee: | Flavio Kubota <kubota> |
| Status: | NEW --- | ||
| Severity: | minor | CC: | tomh |
| Priority: | P5 | ||
| Version: | ns-3.10 | ||
| Hardware: | All | ||
| OS: | All | ||
Hi I was trying out the wimax-multicast program from the examples/wimax directory and changing the position of the base station seems to have no effect. I later figured this was because a line in the file wimax-multicast.cc calls mobility.Install on both the base station node and the service station nodes. This overrides the mobility information set at the top of the file. After commenting out the lines corresponding to mobility.Install the program works fine ie it responds to changes in base station location. After I remove the mobility.Install lines, when I set the base station's position to 1000000 instead of 1000, no packets are received because it is out of range which is the correct behaviour. I have reproduced code snippets below to help isolate the bug: This is the part where the mobility information is set for base station: BSPosition = CreateObject<ConstantPositionMobilityModel> (); BSPosition->SetPosition (Vector (1000000, 0, 0)); bsNodes.Get (0)->AggregateObject (BSPosition); Here it is set for service stations: for (int i = 0; i < nbSS; i++) { SSPosition[i] = CreateObject<RandomWaypointMobilityModel> (); SSPosAllocator[i] = CreateObject<RandomRectanglePositionAllocator> (); SSPosAllocator[i]->SetX (UniformVariable ((i / 40) * 2000, (i / 40 + 1) * 2000)); SSPosAllocator[i]->SetY (UniformVariable ((i / 40) * 2000, (i / 40 + 1) * 2000)); SSPosition[i]->SetAttribute ("PositionAllocator", PointerValue (SSPosAllocator[i])); SSPosition[i]->SetAttribute ("Speed", RandomVariableValue (UniformVariable (10.3, 40.7))); SSPosition[i]->SetAttribute ("Pause", RandomVariableValue (ConstantVariable (0.01))); ss[i] = ssDevs.Get (i)->GetObject<SubscriberStationNetDevice> (); ss[i]->SetModulationType (WimaxPhy::MODULATION_TYPE_QAM16_12); ssNodes.Get (i)->AggregateObject (SSPosition[i]); } And both of these are overridden further down in the code with the lines: mobility.Install (bsNodes); which overrides base station location and mobility.Install (ssNodes); which overrides service station information. This overriding renders the initial location information irrelevant.