ns-3
ns3::SimpleDeviceEnergyModel Class Reference

#include <simple-device-energy-model.h>

Inheritance diagram for ns3::SimpleDeviceEnergyModel:
Collaboration diagram for ns3::SimpleDeviceEnergyModel:

List of all members.

Public Member Functions

virtual void SetNode (Ptr< Node > node)
 Sets pointer to node.
virtual Ptr< NodeGetNode (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)
- Public Member Functions inherited from ns3::DeviceEnergyModel
double GetCurrentA (void) const
- Public Member Functions inherited from ns3::Object
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)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
uint32_t GetReferenceCount (void) const
- Public Member Functions inherited from ns3::ObjectBase
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

- Public Types inherited from ns3::DeviceEnergyModel
typedef Callback< void, int > ChangeStateCallback

Detailed Description

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.


Member Function Documentation

virtual void ns3::SimpleDeviceEnergyModel::ChangeState ( int  newState)
inlinevirtual
Parameters:
newStateNew state the device is in.

Not implemented

Implements ns3::DeviceEnergyModel.

Ptr< Node > ns3::SimpleDeviceEnergyModel::GetNode ( void  ) const
virtual

Gets pointer to node.

Returns:
Pointer to node.

Implements DeviceEnergyModel::GetNode.

double ns3::SimpleDeviceEnergyModel::GetTotalEnergyConsumption ( void  ) const
virtual
Returns:
Total energy consumption of the vehicle.

Implements DeviceEnergyModel::GetTotalEnergyConsumption.

Implements ns3::DeviceEnergyModel.

TypeId ns3::SimpleDeviceEnergyModel::GetTypeId ( void  )
static

This method returns the TypeId associated to ns3::SimpleDeviceEnergyModel.

No Attributes defined for this type.
TraceSources defined for this type:

  • TotalEnergyConsumption: Total energy consumption of the radio device.

Reimplemented from ns3::DeviceEnergyModel.

References ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

virtual void ns3::SimpleDeviceEnergyModel::HandleEnergyDepletion ( void  )
inlinevirtual

Handles energy depletion.

Not implemented

Implements ns3::DeviceEnergyModel.

void ns3::SimpleDeviceEnergyModel::SetCurrentA ( double  current)
Parameters:
currentthe 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.

Parameters:
sourcePointer 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.

Parameters:
nodePointer to node.

Implements DeviceEnergyModel::SetNode.

References NS_ASSERT.


The documentation for this class was generated from the following files: