I am using the latest dev version of ns-3.
I added the following lines into third.cc to see if I can figure out
how to use ChannelNumber:
insert at line 86 (above the phy.SetChannel (channel.Create ()); line:
YansWifiPhy testCN;
testCN.SetChannelNumber (1000);
When I do this I get an error:
"assert failed. file=../src/devices/wifi/wifi-phy-state-helper.cc,
line=379, cond="IsStateSwitching()"
line 379 is NS_ASSERT(IsStateSwitching());
I checked in yans-wifi-phy.cc for the same assert, and on line 311 it
is NS_ASSERT(!IsStateSwitching());
When I added the ! to line 379 of wifi-phy-state-helper.cc so that it
would be the same as line 311 of yans-wifi-phy.cc, the error went
away.
I'm not sure if I did something wrong with my attempt at using
ChannelNumber, or if the ! got lost.
Michael
> On Fri, Sep 11, 2009 at 6:22 PM, Michael <
nowat...@gmail.com> wrote:
> > wireless adhoc network where groups of nodes
> > are on different channels. What all needs to be set on each node to
> > enable this to work? I tried just setting the channel numbers
> > differently, but all nodes are still able to transmit/receive to all
> > nodes, regardless of which channel number they are assigned. Does
> > this require a separate instance of WifiPhyChannel for each channel
> > number? I didn't see any of the examples that use SetChannelNumber
>
> No: all devices should be connected to the same instance of a
> WifiPhyChannel but they should be assigned different 'channel
> number's. YansWifiPhyChannel does use the 'channel number' to decide
> when to forward a packet to a PHY or not.
>
> Mathieu
> --
> Mathieu Lacage <
mathieu.lac...@gmail.com>