uan: (fixes #1631) fix Acoustic Modem drawn energy calculation.
This commit is contained in:
@@ -113,6 +113,7 @@ Bugs fixed
|
||||
- Bug 1132 - useless for loops in block-ack-test-suite.cc
|
||||
- Bug 1205 - EDCA is incorrectly modelled as DCF
|
||||
- Bug 1571 - TCP zero-window and flow control window updates by the receiver
|
||||
- Bug 1631 - Acoustic modem Energy consumption calc is wrong
|
||||
- Bug 1761 - Rounding with olsr::EmfToSeconds
|
||||
- Bug 1783 - BytesInFlight value fixed
|
||||
- Bug 1954 - Serialized size of wifi-net-device differ for TX and RX trace
|
||||
|
||||
@@ -200,20 +200,20 @@ AcousticModemEnergyModel::ChangeState (int newState)
|
||||
|
||||
// energy to decrease = current * voltage * time
|
||||
double energyToDecrease = 0.0;
|
||||
double supplyVoltage = m_source->GetSupplyVoltage ();
|
||||
|
||||
switch (m_currentState)
|
||||
{
|
||||
case UanPhy::TX:
|
||||
energyToDecrease = duration.GetSeconds () * m_txPowerW * supplyVoltage;
|
||||
energyToDecrease = duration.GetSeconds () * m_txPowerW;
|
||||
break;
|
||||
case UanPhy::RX:
|
||||
energyToDecrease = duration.GetSeconds () * m_rxPowerW * supplyVoltage;
|
||||
energyToDecrease = duration.GetSeconds () * m_rxPowerW;
|
||||
break;
|
||||
case UanPhy::IDLE:
|
||||
energyToDecrease = duration.GetSeconds () * m_idlePowerW * supplyVoltage;
|
||||
energyToDecrease = duration.GetSeconds () * m_idlePowerW;
|
||||
break;
|
||||
case UanPhy::SLEEP:
|
||||
energyToDecrease = duration.GetSeconds () * m_sleepPowerW * supplyVoltage;
|
||||
energyToDecrease = duration.GetSeconds () * m_sleepPowerW;
|
||||
break;
|
||||
default:
|
||||
NS_FATAL_ERROR ("AcousticModemEnergyModel:Undefined radio state!");
|
||||
|
||||
Reference in New Issue
Block a user