|
ns-3
|
#include <simple-device-energy-model.h>


Public Member Functions | |
| virtual void | SetNode (Ptr< Node > node) |
| Sets pointer to node. | |
| virtual Ptr< Node > | GetNode (void) const |
| Gets pointer to node. | |
| virtual void | SetEnergySource (Ptr< EnergySource > source) |
| Sets pointer to EnergySouce installed on node. | |
| virtual double | GetTotalEnergyConsumption (void) const |
| virtual void | ChangeState (int newState) |
| virtual void | HandleEnergyDepletion (void) |
| Handles energy depletion. | |
| void | SetCurrentA (double current) |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| This method returns the TypeId associated to ns3::SimpleDeviceEnergyModel. | |
A simple device energy model where current drain can be set by the user.
It is supposed to be used as a testing model for energy sources.
| virtual void ns3::SimpleDeviceEnergyModel::ChangeState | ( | int | newState | ) | [inline, virtual] |
| Ptr< Node > ns3::SimpleDeviceEnergyModel::GetNode | ( | void | ) | const [virtual] |
Gets pointer to node.
Implements DeviceEnergyModel::GetNode.
| double ns3::SimpleDeviceEnergyModel::GetTotalEnergyConsumption | ( | void | ) | const [virtual] |
Implements DeviceEnergyModel::GetTotalEnergyConsumption.
Implements ns3::DeviceEnergyModel.
| TypeId ns3::SimpleDeviceEnergyModel::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::SimpleDeviceEnergyModel.
This object is accessible through the following paths with Config::Set and Config::Connect:
No Attributes defined for this type.
TraceSources defined for this type:
Reimplemented from ns3::DeviceEnergyModel.
References ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
| virtual void ns3::SimpleDeviceEnergyModel::HandleEnergyDepletion | ( | void | ) | [inline, virtual] |
| void ns3::SimpleDeviceEnergyModel::SetCurrentA | ( | double | current | ) |
| current | the current draw of device. |
Set the actual current draw of the device.
References ns3::Time::GetSeconds(), ns3::EnergySource::GetSupplyVoltage(), ns3::Now(), and ns3::EnergySource::UpdateEnergySource().
| void ns3::SimpleDeviceEnergyModel::SetEnergySource | ( | Ptr< EnergySource > | source | ) | [virtual] |
Sets pointer to EnergySouce installed on node.
| source | Pointer to EnergySource installed on node. |
Implements DeviceEnergyModel::SetEnergySource.
Implements ns3::DeviceEnergyModel.
References NS_ASSERT.
| void ns3::SimpleDeviceEnergyModel::SetNode | ( | Ptr< Node > | node | ) | [virtual] |
Sets pointer to node.
| node | Pointer to node. |
Implements DeviceEnergyModel::SetNode.
References NS_ASSERT.