Bug 2171 - power-adaptation-distance.cc:202:22: error: call to 'pow' is ambiguous

This commit is contained in:
Matías Richart
2015-08-25 06:46:23 -07:00
parent 2998c02be4
commit 61c9d74b0e
2 changed files with 4 additions and 4 deletions

View File

@@ -129,7 +129,7 @@ private:
void SetupPhy (Ptr<WifiPhy> phy);
Time GetCalcTxTime (WifiMode mode);
std::map<Mac48Address, uint32_t> actualPower;
std::map<Mac48Address, double> actualPower;
std::map<Mac48Address, WifiMode> actualMode;
uint32_t m_bytesTotal;
double totalEnergy;
@@ -199,7 +199,7 @@ NodeStatistics::PhyCallback (std::string path, Ptr<const Packet> packet)
if (head.GetType() == WIFI_MAC_DATA)
{
totalEnergy += pow (10, actualPower[dest] / 10) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalEnergy += pow (10.0, actualPower[dest] / 10.0) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
}
}

View File

@@ -102,7 +102,7 @@ private:
void SetupPhy (Ptr<WifiPhy> phy);
Time GetCalcTxTime (WifiMode mode);
std::map<Mac48Address, uint32_t> actualPower;
std::map<Mac48Address, double> actualPower;
std::map<Mac48Address, WifiMode> actualMode;
uint32_t m_bytesTotal;
double totalEnergy;
@@ -195,7 +195,7 @@ NodeStatistics::PhyCallback (std::string path, Ptr<const Packet> packet)
if (head.GetType() == WIFI_MAC_DATA)
{
totalEnergy += pow(10, actualPower[dest] / 10) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalEnergy += pow (10.0, actualPower[dest] / 10.0) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
}
}