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) |
![]() | |
double | GetCurrentA (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 | Dispose (void) |
void | AggregateObject (Ptr< Object > other) |
AggregateIterator | GetAggregateIterator (void) const |
void | Start (void) |
![]() | |
SimpleRefCount (const SimpleRefCount &o) | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
uint32_t | GetReferenceCount (void) const |
![]() | |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
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) |
This method returns the TypeId associated to ns3::SimpleDeviceEnergyModel. |
Additional Inherited Members | |
![]() | |
typedef Callback< void, int > | ChangeStateCallback |
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.
|
inlinevirtual |
Gets pointer to node.
Implements DeviceEnergyModel::GetNode.
|
virtual |
Implements DeviceEnergyModel::GetTotalEnergyConsumption.
Implements ns3::DeviceEnergyModel.
|
static |
This method returns the TypeId associated to ns3::SimpleDeviceEnergyModel.
No Attributes defined for this type.
TraceSources defined for this type:
Reimplemented from ns3::DeviceEnergyModel.
References ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
|
inlinevirtual |
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().
|
virtual |
Sets pointer to EnergySouce installed on node.
source | Pointer to EnergySource installed on node. |
Implements DeviceEnergyModel::SetEnergySource.
Implements ns3::DeviceEnergyModel.
References NS_ASSERT.
Sets pointer to node.
node | Pointer to node. |
Implements DeviceEnergyModel::SetNode.
References NS_ASSERT.