src/lr-wpan/model/lr-wpan-phy.cc
changeset 11232 865dcb3bf5a0
parent 11205 29b708f01eb1
child 11265 9fa2628d32cb
equal deleted inserted replaced
11231:62ce11a18acd 11232:865dcb3bf5a0
   896           {
   896           {
   897             status = IEEE_802_15_4_PHY_INVALID_PARAMETER;
   897             status = IEEE_802_15_4_PHY_INVALID_PARAMETER;
   898           }
   898           }
   899         if (m_phyPIBAttributes.phyCurrentChannel != attribute->phyCurrentChannel)
   899         if (m_phyPIBAttributes.phyCurrentChannel != attribute->phyCurrentChannel)
   900           {
   900           {
   901             // Cancel a pending tranceiver state change.
   901             // Cancel a pending transceiver state change.
   902             // Switch off the transceiver.
   902             // Switch off the transceiver.
   903             // TODO: Is switching off the transceiver the right choice?
   903             // TODO: Is switching off the transceiver the right choice?
   904             m_trxState = IEEE_802_15_4_PHY_TRX_OFF;
   904             m_trxState = IEEE_802_15_4_PHY_TRX_OFF;
   905             if (m_trxStatePending != IEEE_802_15_4_PHY_IDLE)
   905             if (m_trxStatePending != IEEE_802_15_4_PHY_IDLE)
   906               {
   906               {
   926                   {
   926                   {
   927                     m_pdDataConfirmCallback (IEEE_802_15_4_PHY_TRX_OFF);
   927                     m_pdDataConfirmCallback (IEEE_802_15_4_PHY_TRX_OFF);
   928                   }
   928                   }
   929               }
   929               }
   930             m_phyPIBAttributes.phyCurrentChannel = attribute->phyCurrentChannel;
   930             m_phyPIBAttributes.phyCurrentChannel = attribute->phyCurrentChannel;
       
   931             LrWpanSpectrumValueHelper psdHelper;
       
   932             m_txPsd = psdHelper.CreateTxPowerSpectralDensity (m_phyPIBAttributes.phyTransmitPower, m_phyPIBAttributes.phyCurrentChannel);
   931           }
   933           }
   932         break;
   934         break;
   933       }
   935       }
   934     case phyChannelsSupported:
   936     case phyChannelsSupported:
   935       {   // only the first element is considered in the array
   937       {   // only the first element is considered in the array