#include <simple-device-energy-model.h>
Inheritance diagram for ns3::SimpleDeviceEnergyModel:
Collaboration diagram for ns3::SimpleDeviceEnergyModel:Public Member Functions | |
| SimpleDeviceEnergyModel () | |
| virtual | ~SimpleDeviceEnergyModel () |
| virtual void | ChangeState (int newState) |
| virtual Ptr< Node > | GetNode (void) const |
| Gets pointer to node. | |
| virtual double | GetTotalEnergyConsumption (void) const |
| virtual void | HandleEnergyDepletion (void) |
| Handles energy depletion. | |
| void | SetCurrentA (double current) |
| virtual void | SetEnergySource (Ptr< EnergySource > source) |
| Sets pointer to EnergySouce installed on node. | |
| virtual void | SetNode (Ptr< Node > node) |
| Sets pointer to node. | |
Public Member Functions inherited from ns3::DeviceEnergyModel | |
| DeviceEnergyModel () | |
| virtual | ~DeviceEnergyModel () |
| double | GetCurrentA (void) const |
Public Member Functions inherited from ns3::Object | |
| Object () | |
| virtual | ~Object () |
| void | AggregateObject (Ptr< Object > other) |
| void | Dispose (void) |
| AggregateIterator | GetAggregateIterator (void) const |
| virtual TypeId | GetInstanceTypeId (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const |
| void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| SimpleRefCount (const SimpleRefCount &o) | |
| uint32_t | GetReferenceCount (void) const |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| void | Ref (void) const |
| void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| void | GetAttribute (std::string name, AttributeValue &value) const |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
Private Member Functions | |
| void | DoDispose (void) |
| virtual double | DoGetCurrentA (void) const |
Private Attributes | |
| double | m_actualCurrentA |
| Time | m_lastUpdateTime |
| Ptr< Node > | m_node |
| Ptr< EnergySource > | m_source |
| TracedValue< double > | m_totalEnergyConsumption |
Additional Inherited Members | |
Public Types inherited from ns3::DeviceEnergyModel | |
| typedef Callback< void, int > | ChangeStateCallback |
Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| virtual void | DoDispose (void) |
| virtual void | DoInitialize (void) |
| virtual void | NotifyNewAggregate (void) |
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.
Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
Definition at line 38 of file simple-device-energy-model.h.
| ns3::SimpleDeviceEnergyModel::SimpleDeviceEnergyModel | ( | ) |
Definition at line 46 of file simple-device-energy-model.cc.
References m_actualCurrentA, m_lastUpdateTime, m_source, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 54 of file simple-device-energy-model.cc.
References NS_LOG_FUNCTION.
|
inlinevirtual |
| newState | New state the device is in. |
Not implemented
Implements ns3::DeviceEnergyModel.
Definition at line 84 of file simple-device-energy-model.h.
|
private |
Definition at line 110 of file simple-device-energy-model.cc.
References m_source, and NS_LOG_FUNCTION.
|
privatevirtual |
Implements DeviceEnergyModel::GetCurrentA.
Definition at line 117 of file simple-device-energy-model.cc.
References m_actualCurrentA, and NS_LOG_FUNCTION.
Gets pointer to node.
Implements DeviceEnergyModel::GetNode.
Definition at line 76 of file simple-device-energy-model.cc.
References m_node, and NS_LOG_FUNCTION.
|
virtual |
Implements DeviceEnergyModel::GetTotalEnergyConsumption.
Implements ns3::DeviceEnergyModel.
Definition at line 83 of file simple-device-energy-model.cc.
References m_totalEnergyConsumption, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Reimplemented from ns3::DeviceEnergyModel.
Definition at line 34 of file simple-device-energy-model.cc.
References m_totalEnergyConsumption, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
Here is the call graph for this function:
|
inlinevirtual |
Handles energy depletion.
Not implemented
Implements ns3::DeviceEnergyModel.
Definition at line 93 of file simple-device-energy-model.h.
| void ns3::SimpleDeviceEnergyModel::SetCurrentA | ( | double | current | ) |
| current | the current draw of device. |
Set the actual current draw of the device.
Definition at line 90 of file simple-device-energy-model.cc.
References current, ns3::Time::GetSeconds(), ns3::EnergySource::GetSupplyVoltage(), m_actualCurrentA, m_lastUpdateTime, m_source, m_totalEnergyConsumption, ns3::Now(), NS_LOG_FUNCTION, and ns3::EnergySource::UpdateEnergySource().
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Sets pointer to EnergySouce installed on node.
| source | Pointer to EnergySource installed on node. |
Implements DeviceEnergyModel::SetEnergySource.
Implements ns3::DeviceEnergyModel.
Definition at line 60 of file simple-device-energy-model.cc.
References m_source, NS_ASSERT, and NS_LOG_FUNCTION.
Sets pointer to node.
| node | Pointer to node. |
Implements DeviceEnergyModel::SetNode.
Definition at line 68 of file simple-device-energy-model.cc.
References m_node, NS_ASSERT, and NS_LOG_FUNCTION.
|
private |
Definition at line 114 of file simple-device-energy-model.h.
Referenced by DoGetCurrentA(), SetCurrentA(), and SimpleDeviceEnergyModel().
|
private |
Definition at line 113 of file simple-device-energy-model.h.
Referenced by SetCurrentA(), and SimpleDeviceEnergyModel().
Definition at line 116 of file simple-device-energy-model.h.
|
private |
Definition at line 115 of file simple-device-energy-model.h.
Referenced by DoDispose(), SetCurrentA(), SetEnergySource(), and SimpleDeviceEnergyModel().
|
private |
Definition at line 117 of file simple-device-energy-model.h.
Referenced by GetTotalEnergyConsumption(), GetTypeId(), and SetCurrentA().