equal
deleted
inserted
replaced
88 /// Trace function for remaining energy at node. |
88 /// Trace function for remaining energy at node. |
89 void |
89 void |
90 RemainingEnergy (double oldValue, double remainingEnergy) |
90 RemainingEnergy (double oldValue, double remainingEnergy) |
91 { |
91 { |
92 NS_LOG_UNCOND (Simulator::Now ().GetSeconds () |
92 NS_LOG_UNCOND (Simulator::Now ().GetSeconds () |
93 << "s Current remaining energy = " << remainingEnergy << "J"); |
93 << "s Current remaining energy = " << remainingEnergy << "J"); |
94 } |
94 } |
95 |
95 |
96 /// Trace function for total energy consumption at node. |
96 /// Trace function for total energy consumption at node. |
97 void |
97 void |
98 TotalEnergy (double oldValue, double totalEnergy) |
98 TotalEnergy (double oldValue, double totalEnergy) |
99 { |
99 { |
100 NS_LOG_UNCOND (Simulator::Now ().GetSeconds () |
100 NS_LOG_UNCOND (Simulator::Now ().GetSeconds () |
101 << "s Total energy consumed by radio = " << totalEnergy << "J"); |
101 << "s Total energy consumed by radio = " << totalEnergy << "J"); |
102 } |
102 } |
103 |
103 |
104 int |
104 int |
105 main (int argc, char *argv[]) |
105 main (int argc, char *argv[]) |
106 { |
106 { |