Dear All,
I am working on ns-3-lbt module. I would like to expand spectrumwifiphy model for frequency other than 36,40,44 and 48. As currently these 4 frequencies are only supported from 5GHz band. I wan to configure some channels 52-64 and 100-104 which can be use for indoor propagation in Europe region.
WifiSpectrumHelper class limits the use of toher channels than mention 4 channels. Because in src/wifi/model/spectrum-wifi-helper.cc file we have following FATAL_ERROR.
NS_FATAL_ERROR ("Only channel 36, 40, 44, and 48 supported initially");
Above FATAL_ERROR is called in 3 functions as mentioned below.
1) GetFreqMHzForChannel(uint16_t channel)
2) CreateTxPowerSpectralDensity (double txPower, WifiMode mode, uint32_t channel)
3) CreateRfFilter (uint32_t channel)
First function can be modified easily to support for other channels. But second and third functions uses some logic which i am not able to understand. As example for channel = 36 second and 3rd function contains below code.
Ptr<SpectrumValue>
WifiSpectrumHelper::CreateRfFilter (uint32_t channel)
{
NS_LOG_FUNCTION_NOARGS ();
Ptr<SpectrumValue> c = Create <SpectrumValue> (GetSpectrumModel (WifiPhy::GetOfdmRate6Mbps ()));
(*c) = 0;
if ((channel != 36) && (channel != 40) && (channel != 44) && (channel != 48))
{
NS_FATAL_ERROR ("Only channels 36, 40, 44, and 48 supported initially");
}
// For now, perfect 20Mhz-wide window
Values::iterator vit = c->ValuesBegin ();
for (uint16_t i = 0; i < c->GetSpectrumModel ()->GetNumBands (); i++, vit++)
{
if (channel == 36)
{
if (i >= 6 && i <= 9)
{
*vit = 1;
}
}
---------------
}
I am not able to understand based on what, value of i is chosen for above condition. Can someone give me any reference for it so may be i can extend it for other channels too?
Or is there any other way to support extra channels in SpectrumWifiPhy ?
Best Regards
Saumil Shah