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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 * DeviceEnergyModel of a state change. | 46 * DeviceEnergyModel of a state change. |
47 */ | 47 */ |
48 typedef Callback<void, int> ChangeStateCallback; | 48 typedef Callback<void, int> ChangeStateCallback; |
49 | 49 |
50 public: | 50 public: |
51 static TypeId GetTypeId (void); | 51 static TypeId GetTypeId (void); |
52 DeviceEnergyModel (); | 52 DeviceEnergyModel (); |
53 virtual ~DeviceEnergyModel (); | 53 virtual ~DeviceEnergyModel (); |
54 | 54 |
55 /** | 55 /** |
56 * \brief Sets pointer to node containing this EnergySource. | |
57 * | |
58 * \param node Pointer to node containing this EnergySource. | |
59 */ | |
60 virtual void SetNode (Ptr<Node> node) = 0; | |
61 | |
62 /** | |
63 * \brief Gets pointer to node containing this EnergySource. | |
64 * | |
65 * \returns Pointer to node containing this EnergySource. | |
66 */ | |
67 virtual Ptr<Node> GetNode (void) const = 0; | |
68 | |
69 /** | |
70 * \param source Pointer to energy source installed on node. | 56 * \param source Pointer to energy source installed on node. |
71 * | 57 * |
72 * This function sets the pointer to energy source installed on node. Should | 58 * This function sets the pointer to energy source installed on node. Should |
73 * be called only by DeviceEnergyModel helper classes. | 59 * be called only by DeviceEnergyModel helper classes. |
74 */ | 60 */ |
75 virtual void SetEnergySource (Ptr<EnergySource> source) = 0; | 61 virtual void SetEnergySource (Ptr<EnergySource> source) = 0; |
76 | 62 |
77 /** | 63 /** |
78 * \returns Total energy consumption of the device. | 64 * \returns Total energy consumption of the device. |
79 * | 65 * |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 * devices who does know the current draw of its states, this method must be | 101 * devices who does know the current draw of its states, this method must be |
116 * overwritten. | 102 * overwritten. |
117 */ | 103 */ |
118 virtual double DoGetCurrentA (void) const; | 104 virtual double DoGetCurrentA (void) const; |
119 | 105 |
120 }; | 106 }; |
121 | 107 |
122 } | 108 } |
123 | 109 |
124 #endif /* DEVICE_ENERGY_MODEL_H */ | 110 #endif /* DEVICE_ENERGY_MODEL_H */ |
OLD | NEW |