rmartin5 / aqua-sim-ng

Aqua-Sim on NS3
85 stars 42 forks source link

The transmission distance problem. #15

Closed Duola-li closed 4 years ago

Duola-li commented 5 years ago

I set the transmission range of node A to 3500m, but sometimes the nodes outside 4000m receive requests directly sent by node A. Every time node A sends a request packet, I print its transmission range , which is always 3500m, but that's what happened. Here is my code.

AquaSimChannelHelper channel = AquaSimChannelHelper::Default(); if (range>0){ channel.SetPropagation("ns3::AquaSimRangePropagation"); } AquaSimHelper asHelper = AquaSimHelper::Default(); Ptr c = channel.Create(); asHelper.SetChannel(c); .... if (range>0){ sink->GetPhy()->SetTransRange(range); dev1->GetPhy()->SetTransRange(range); dev2->GetPhy()->SetTransRange(range); dev3->GetPhy()->SetTransRange(range); dev4->GetPhy()->SetTransRange(range);

Duola-li commented 4 years ago

I get it! This is because the nodes are mobile!