OLD | NEW |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 * the energy source is depleted. Should be implemented by child classes. | 92 * the energy source is depleted. Should be implemented by child classes. |
93 */ | 93 */ |
94 virtual void HandleEnergyDepletion (void) = 0; | 94 virtual void HandleEnergyDepletion (void) = 0; |
95 | 95 |
96 /** | 96 /** |
97 * This function is called by the EnergySource object when energy stored in | 97 * This function is called by the EnergySource object when energy stored in |
98 * the energy source is recharged. Should be implemented by child classes. | 98 * the energy source is recharged. Should be implemented by child classes. |
99 */ | 99 */ |
100 virtual void HandleEnergyRecharged (void) = 0; | 100 virtual void HandleEnergyRecharged (void) = 0; |
101 | 101 |
| 102 /** |
| 103 * This function is called by the EnergySource object when energy stored in |
| 104 * the energy source is changed. Should be implemented by child classes. |
| 105 */ |
| 106 virtual void HandleEnergyChanged (void) = 0; |
| 107 |
102 | 108 |
103 private: | 109 private: |
104 /** | 110 /** |
105 * \returns 0.0 as the current value, in Ampere. | 111 * \returns 0.0 as the current value, in Ampere. |
106 * | 112 * |
107 * Child class does not have to implement this method if current draw for its | 113 * Child class does not have to implement this method if current draw for its |
108 * states are not know. This default method will always return 0.0A. For the | 114 * states are not know. This default method will always return 0.0A. For the |
109 * devices who does know the current draw of its states, this method must be | 115 * devices who does know the current draw of its states, this method must be |
110 * overwritten. | 116 * overwritten. |
111 */ | 117 */ |
112 virtual double DoGetCurrentA (void) const; | 118 virtual double DoGetCurrentA (void) const; |
113 | 119 |
114 }; | 120 }; |
115 | 121 |
116 } | 122 } |
117 | 123 |
118 #endif /* DEVICE_ENERGY_MODEL_H */ | 124 #endif /* DEVICE_ENERGY_MODEL_H */ |
OLD | NEW |