Bug 1885 - WifiSpectrumValue5MhzFactory::CreateRfFilter does not align with the used 5Mhz SpectrumModel
WifiSpectrumValue5MhzFactory::CreateRfFilter does not align with the used 5Mh...
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: spectrum
ns-3-dev
PC Linux
: P5 minor
Assigned To: Nicola Baldo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-17 07:20 UTC by Taqi
Modified: 2014-03-17 08:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Taqi 2014-03-17 07:20:31 UTC
Assuming the channel in CreateRfFilter(uint32_t channel) represents the same channel in CreateTxPowerSpectralDensity (double txPower, uint32_t channel), then the configuration of the filter:

  (*rf)[channel - 1] = 1;
  (*rf)[channel    ] = 1;
  (*rf)[channel + 1] = 1;
  (*rf)[channel + 2] = 1;

should be with an offset as in CreateTxPowerSpectralDensity:

  (*txPsd)[channel + 3] = 1;
  (*txPsd)[channel + 4] = 1;
  (*txPsd)[channel + 5] = 1;
  (*txPsd)[channel + 6] = 1;
Comment 1 Nicola Baldo 2014-03-17 07:31:57 UTC
Hi Taqi,

you're right, the implementation of CeateRfFilter() is inconsistent. Anyway, there is currently no code using this method. Do you have a use case for it? If so, it would make sense to fix the implementation. Otherwise, I would just remove it.
Comment 2 Taqi 2014-03-17 08:51:50 UTC
Actually I use WifiSpectrumValue5MhzFactory to generate Spectrum Values and Rf Filters for a spectrum sensor implementation I am working on. I can re-implement the functionality though, if you see it is not worth keeping in ns-3 code.
Comment 3 Nicola Baldo 2014-03-17 08:56:22 UTC
Well if there is at least one person finding it useful it makes sense to keep it!
I just fixed it in changeset ad359a6b7e7d.