A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simple-device-energy-model.h
Go to the documentation of this file.
1 /*
2  * simple-device-energy-model.h
3  *
4  * Created on: 09/ago/2010
5  * Author: socket
6  */
7 
8 #ifndef SIMPLE_DEVICE_ENERGY_MODEL_H
9 #define SIMPLE_DEVICE_ENERGY_MODEL_H
10 
11 #include "ns3/device-energy-model.h"
12 #include "ns3/nstime.h"
13 #include "ns3/traced-value.h"
14 
15 namespace ns3 {
16 
26 {
27 public:
28  static TypeId GetTypeId (void);
30  virtual ~SimpleDeviceEnergyModel ();
31 
39  virtual void SetNode (Ptr<Node> node);
40 
48  virtual Ptr<Node> GetNode (void) const;
49 
57  virtual void SetEnergySource (Ptr<EnergySource> source);
58 
64  virtual double GetTotalEnergyConsumption (void) const;
65 
71  virtual void ChangeState (int newState)
72  {
73  }
74 
80  virtual void HandleEnergyDepletion (void)
81  {
82  }
83 
89  void SetCurrentA (double current);
90 private:
91  void DoDispose (void);
92 
98  virtual double DoGetCurrentA (void) const;
99 
105 };
106 
107 } // namespace ns3
108 
109 #endif /* SIMPLE_DEVICE_ENERGY_MODEL_H */