Bug 2025 - Changing the channel doesn't affect the Tx params
Changing the channel doesn't affect the Tx params
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: lr-wpan
ns-3-dev
All All
: P5 normal
Assigned To: Tom Henderson
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-04 10:44 UTC by Tommaso Pecorella
Modified: 2015-03-15 04:48 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 Tommaso Pecorella 2014-12-04 10:44:04 UTC
The bug is in this function:
void LrWpanPhy::PlmeSetAttributeRequest (LrWpanPibAttributeIdentifier id,
                                         LrWpanPhyPibAttributes* attribute)

if this function is used to change the channel, m_txPsd is not recomputed.

It should be recomputed. As a matter of fact using the same function to change the Tx power leads to...
            m_phyPIBAttributes.phyTransmitPower = attribute->phyTransmitPower;
            LrWpanSpectrumValueHelper psdHelper;
            m_txPsd = psdHelper.CreateTxPowerSpectralDensity (m_phyPIBAttributes.phyTransmitPower, m_phyPIBAttributes.phyCurrentChannel);

Notice the channel number in the last function call.
Comment 1 Tom Henderson 2015-03-14 15:59:13 UTC
+1
Comment 2 Tommaso Pecorella 2015-03-15 04:48:13 UTC
changeset:   11232:865dcb3bf5a0