Hello Sébastien, You'll find a few comments/questions below. Rediet https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-phy.cc File src/wifi/model/wifi-phy.cc (right): https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-phy.cc#ne... src/wifi/model/wifi-phy.cc:731: } Wouldn't it be more practical to set up an attribute enabling to set this model? https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-phy.cc#ne... src/wifi/model/wifi-phy.cc:2381: } I have the impression that this verification is done too late; TxBegin and SniffTx have been notified. In addition, the state has been switched to Tx. https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-radio-ene... File src/wifi/model/wifi-radio-energy-model.cc (right): https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-radio-ene... src/wifi/model/wifi-radio-energy-model.cc:285: NS_FATAL_ERROR ("WifiRadioEnergyModel: undefined radio state " << state); It means that it'll fail if invoked in OFF mode?
Rediet, thanks for your comments, please check answers inline. https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-phy.cc File src/wifi/model/wifi-phy.cc (right): https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-phy.cc#ne... src/wifi/model/wifi-phy.cc:731: } On 2018/01/11 08:34:34, Rediet wrote: > Wouldn't it be more practical to set up an attribute enabling to set this model? Wifi can only be used with that model, so I see only two possibilities: no energy model or the wifi radio energy model. https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-phy.cc#ne... src/wifi/model/wifi-phy.cc:2381: } Agreed, I think it can come at the same point as this check: if (m_state->IsStateSleep ()) https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-radio-ene... File src/wifi/model/wifi-radio-energy-model.cc (right): https://codereview.appspot.com/332610043/diff/1/src/wifi/model/wifi-radio-ene... src/wifi/model/wifi-radio-energy-model.cc:285: NS_FATAL_ERROR ("WifiRadioEnergyModel: undefined radio state " << state); Yes, we cannot return an infinite time.