Bug 1677 - The annotation of YansWifiPhy needs correction
The annotation of YansWifiPhy needs correction
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
All All
: P5 normal
Assigned To: Nicola Baldo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-08 08:39 UTC by Junling Bu
Modified: 2013-05-27 07:53 UTC (History)
2 users (show)

See Also:


Attachments
update comments for yans-wifi-phy (1.59 KB, patch)
2013-05-27 07:41 UTC, Junling Bu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Junling Bu 2013-05-08 08:39:57 UTC
on src/wifi/model/yans-wifi-phy.h line 74
 * Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)
but as IEEE 802.11-2007 17.3.8.3.2 defines
Channel center frequency = Channel starting frequency + 5 × nch (MHz)
where nch = 0,1,…200
I don't know why here is nch-1. 

on src/wifi/model/yan-wifi-phy.c line 112
 "Delay between two short frames transmitted on different frequencies. NOTE: Unused now.",
but on line 363
m_state->SwitchToChannelSwitching (m_channelSwitchDelay);
here m_channelSwitchDelay is used actually.

because I think annotation is very important, so I want to correct them.
If I misunderstood here, sorry to report this.
Comment 1 Nicola Baldo 2013-05-25 15:49:37 UTC
Hi Junling,

thanks for your bug report! You're right in both cases: about the formula for the channel frequency, in fact YansWifiPhy::GetChannelFrequencyMhz () implements the formula as you reported. About ChannelSwitchDelay, the comment is clearly obsolete. Would you mind creating a patch updating the attribute descriptions and the comments in the code as needed?
Comment 2 Junling Bu 2013-05-27 07:41:56 UTC
Created attachment 1603 [details]
update comments for yans-wifi-phy
Comment 3 Nicola Baldo 2013-05-27 07:53:42 UTC
Thanks! Just pushed:

changeset:   9818:cfb12f56257a
tag:         tip
user:        Junling Bu <linlinjavaer@gmail.com>
date:        Mon May 27 13:45:39 2013 +0200
summary:     fixed Bug 1677 - The annotation of YansWifiPhy needs correction