|
|
| 129 |
void SetupPhy (Ptr<WifiPhy> phy); |
129 |
void SetupPhy (Ptr<WifiPhy> phy); |
| 130 |
Time GetCalcTxTime (WifiMode mode); |
130 |
Time GetCalcTxTime (WifiMode mode); |
| 131 |
|
131 |
|
| 132 |
std::map<Mac48Address, uint32_t> actualPower; |
132 |
std::map<Mac48Address, double> actualPower; |
| 133 |
std::map<Mac48Address, WifiMode> actualMode; |
133 |
std::map<Mac48Address, WifiMode> actualMode; |
| 134 |
uint32_t m_bytesTotal; |
134 |
uint32_t m_bytesTotal; |
| 135 |
double totalEnergy; |
135 |
double totalEnergy; |
|
|
| 199 |
|
199 |
|
| 200 |
if (head.GetType() == WIFI_MAC_DATA) |
200 |
if (head.GetType() == WIFI_MAC_DATA) |
| 201 |
{ |
201 |
{ |
| 202 |
totalEnergy += pow (10, actualPower[dest] / 10) * GetCalcTxTime (actualMode[dest]).GetSeconds (); |
202 |
totalEnergy += pow (10.0, actualPower[dest] / 10.0) * GetCalcTxTime (actualMode[dest]).GetSeconds (); |
| 203 |
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds (); |
203 |
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds (); |
| 204 |
} |
204 |
} |
| 205 |
} |
205 |
} |