LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2010 Network Security Lab, University of Washington, Seattle. | 3 * Copyright (c) 2010 Network Security Lab, University of Washington, Seattle. |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 */ | 211 */ |
212 double CalculateTotalCurrent (void); | 212 double CalculateTotalCurrent (void); |
213 | 213 |
214 /** | 214 /** |
215 * This function notifies all DeviceEnergyModel of energy depletion event. It | 215 * This function notifies all DeviceEnergyModel of energy depletion event. It |
216 * is called by the child EnergySource class when energy depletion happens. | 216 * is called by the child EnergySource class when energy depletion happens. |
217 */ | 217 */ |
218 void NotifyEnergyDrained (void); | 218 void NotifyEnergyDrained (void); |
219 | 219 |
220 /** | 220 /** |
| 221 * This function notifies all DeviceEnergyModel of energy recharged event. It |
| 222 * is called by the child EnergySource class when energy source is recharged. |
| 223 */ |
| 224 void NotifyEnergyRecharged (void); |
| 225 |
| 226 /** |
221 * This function is called to break reference cycle between EnergySource and | 227 * This function is called to break reference cycle between EnergySource and |
222 * DeviceEnergyModel. Child of the EnergySource base class must call this | 228 * DeviceEnergyModel. Child of the EnergySource base class must call this |
223 * function in their implementation of DoDispose to make sure the reference | 229 * function in their implementation of DoDispose to make sure the reference |
224 * cycle is broken. | 230 * cycle is broken. |
225 * | 231 * |
226 * Normally this work will be completed by the DoDispose function. However it | 232 * Normally this work will be completed by the DoDispose function. However it |
227 * will be overridden in the child class. Hence we introduced this function. | 233 * will be overridden in the child class. Hence we introduced this function. |
228 */ | 234 */ |
229 void BreakDeviceEnergyModelRefCycle (void); | 235 void BreakDeviceEnergyModelRefCycle (void); |
230 | 236 |
231 }; | 237 }; |
232 | 238 |
233 } // namespace ns3 | 239 } // namespace ns3 |
234 | 240 |
235 #endif /* ENERGY_SOURCE_H */ | 241 #endif /* ENERGY_SOURCE_H */ |
LEFT | RIGHT |