LEFT | RIGHT |
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 Andrea Sacco | 3 * Copyright (c) 2010 Andrea Sacco |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 */ | 76 */ |
77 virtual double GetTotalEnergyConsumption (void) const; | 77 virtual double GetTotalEnergyConsumption (void) const; |
78 | 78 |
79 /** | 79 /** |
80 * \param newState New state the device is in. | 80 * \param newState New state the device is in. |
81 * | 81 * |
82 * Not implemented | 82 * Not implemented |
83 */ | 83 */ |
84 virtual void ChangeState (int newState) | 84 virtual void ChangeState (int newState) |
85 { | 85 { |
86 NS_UNUSED(newState); | 86 NS_UNUSED (newState); |
87 } | 87 } |
88 | 88 |
89 /** | 89 /** |
90 * \brief Handles energy depletion. | 90 * \brief Handles energy depletion. |
91 * | 91 * |
92 * Not implemented | 92 * Not implemented |
93 */ | 93 */ |
94 virtual void HandleEnergyDepletion (void) | 94 virtual void HandleEnergyDepletion (void) |
95 { | 95 { |
96 } | 96 } |
97 | 97 |
98 /** | 98 /** |
99 * \brief Handles energy recharged. | 99 * \brief Handles energy recharged. |
100 * | 100 * |
101 * Not implemented | 101 * Not implemented |
102 */ | 102 */ |
103 virtual void HandleEnergyRecharged (void) | 103 virtual void HandleEnergyRecharged (void) |
| 104 { |
| 105 } |
| 106 |
| 107 /** |
| 108 * \brief Handles energy changed. |
| 109 * |
| 110 * Not implemented |
| 111 */ |
| 112 virtual void HandleEnergyChanged (void) |
104 { | 113 { |
105 } | 114 } |
106 | 115 |
107 /** | 116 /** |
108 * \param current the current draw of device. | 117 * \param current the current draw of device. |
109 * | 118 * |
110 * Set the actual current draw of the device. | 119 * Set the actual current draw of the device. |
111 */ | 120 */ |
112 void SetCurrentA (double current); | 121 void SetCurrentA (double current); |
113 private: | 122 private: |
114 void DoDispose (void); | 123 void DoDispose (void); |
115 | 124 |
116 /** | 125 /** |
117 * \returns Current draw of device, at current state. | 126 * \returns Current draw of device, at current state. |
118 * | 127 * |
119 * Implements DeviceEnergyModel::GetCurrentA. | 128 * Implements DeviceEnergyModel::GetCurrentA. |
120 */ | 129 */ |
121 virtual double DoGetCurrentA (void) const; | 130 virtual double DoGetCurrentA (void) const; |
122 | 131 |
123 Time m_lastUpdateTime; | 132 Time m_lastUpdateTime; |
124 double m_actualCurrentA; | 133 double m_actualCurrentA; |
125 Ptr<EnergySource> m_source; | 134 Ptr<EnergySource> m_source; |
126 Ptr<Node> m_node; | 135 Ptr<Node> m_node; |
127 TracedValue<double> m_totalEnergyConsumption; | 136 TracedValue<double> m_totalEnergyConsumption; |
128 }; | 137 }; |
129 | 138 |
130 } // namespace ns3 | 139 } // namespace ns3 |
131 | 140 |
132 #endif /* SIMPLE_DEVICE_ENERGY_MODEL_H */ | 141 #endif /* SIMPLE_DEVICE_ENERGY_MODEL_H */ |
LEFT | RIGHT |