|
ns-3
|
WHOI micro-modem energy model. More...
#include <acoustic-modem-energy-model.h>


Public Types | |
| typedef Callback< void > | AcousticModemEnergyDepletionCallback |
Public Types inherited from ns3::DeviceEnergyModel | |
| typedef Callback< void, int > | ChangeStateCallback |
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 |
| double | GetTxPowerW (void) const |
| void | SetTxPowerW (double txPowerW) |
| double | GetRxPowerW (void) const |
| void | SetRxPowerW (double rxPowerW) |
| double | GetIdlePowerW (void) const |
| void | SetIdlePowerW (double idlePowerW) |
| double | GetSleepPowerW (void) const |
| void | SetSleepPowerW (double sleepPowerW) |
| int | GetCurrentState (void) const |
| void | SetEnergyDepletionCallback (AcousticModemEnergyDepletionCallback callback) |
| virtual void | ChangeState (int newState) |
| Changes state of the AcousticModemEnergyModel. | |
| virtual void | HandleEnergyDepletion (void) |
| Handles energy depletion. | |
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) | |
| SimpleRefCount & | operator= (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::AcousticModemEnergyModel. | |
WHOI micro-modem energy model.
Basing on the Device Energy Model interface, has been implemented a specific energy model for the WHOI micro modem. The class follows pretty closely the RadioEnergyModel class as the transducer behaviour is pretty close to the one of a wifi radio, with identical states (rx, tx, idle, sleep).
The power consumption values implemented into the model are as follows [1]:
Modem State Power Consumption TX 50 W RX 158 mW Idle 158 mW Sleep 5.8 mW
References: [1] Freitag et al., The whoi micro-modem: an acoustic communications and navigation system for multiple platforms, in In Proc. IEEE OCEANS05 Conf, 2005. URL: http://ieeexplore.ieee.org/iel5/10918/34367/01639901.pdf
Callback type for energy depletion handling.
|
virtual |
Changes state of the AcousticModemEnergyModel.
| newState | New state the modem is in. |
Implements DeviceEnergyModel::ChangeState.
Implements ns3::DeviceEnergyModel.
References ns3::Node::GetId(), ns3::Time::GetNanoSeconds(), ns3::Time::GetSeconds(), ns3::EnergySource::GetSupplyVoltage(), ns3::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::EnergySource::UpdateEnergySource().
| int ns3::AcousticModemEnergyModel::GetCurrentState | ( | void | ) | const |
References NS_LOG_FUNCTION.
| double ns3::AcousticModemEnergyModel::GetIdlePowerW | ( | void | ) | const |
Gets pointer to node.
Implements DeviceEnergyModel::GetNode.
| double ns3::AcousticModemEnergyModel::GetRxPowerW | ( | void | ) | const |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
| double ns3::AcousticModemEnergyModel::GetSleepPowerW | ( | void | ) | const |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
virtual |
Implements DeviceEnergyModel::GetTotalEnergyConsumption.
Implements ns3::DeviceEnergyModel.
References NS_LOG_FUNCTION.
| double ns3::AcousticModemEnergyModel::GetTxPowerW | ( | void | ) | const |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
static |
This method returns the TypeId associated to ns3::AcousticModemEnergyModel.
Attributes defined for this type:
TraceSources defined for this type:
Reimplemented from ns3::DeviceEnergyModel.
References GetIdlePowerW(), GetRxPowerW(), GetSleepPowerW(), GetTxPowerW(), ns3::MakeTraceSourceAccessor(), SetIdlePowerW(), ns3::TypeId::SetParent(), SetRxPowerW(), SetSleepPowerW(), and SetTxPowerW().
|
virtual |
Handles energy depletion.
Implements DeviceEnergyModel::HandleEnergyDepletion
Implements ns3::DeviceEnergyModel.
References ns3::UanPhy::EnergyDepletionHandler(), ns3::Node::GetDevice(), ns3::Node::GetId(), ns3::Object::GetObject(), ns3::UanNetDevice::GetPhy(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
| void ns3::AcousticModemEnergyModel::SetEnergyDepletionCallback | ( | AcousticModemEnergyDepletionCallback | callback | ) |
| callback | Callback function. |
Sets callback for energy depletion handling.
References NS_LOG_DEBUG, and NS_LOG_FUNCTION.
|
virtual |
Sets pointer to EnergySouce installed on node.
| source | Pointer to EnergySource installed on node. |
Implements DeviceEnergyModel::SetEnergySource.
Implements ns3::DeviceEnergyModel.
References NS_ASSERT, and NS_LOG_FUNCTION.
| void ns3::AcousticModemEnergyModel::SetIdlePowerW | ( | double | idlePowerW | ) |
Set the idle power of the modem
| idlePowerW | Idle power of the modem in watts |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
Sets pointer to node.
| node | Pointer to node. |
Implements DeviceEnergyModel::SetNode.
References NS_ASSERT, and NS_LOG_FUNCTION.
| void ns3::AcousticModemEnergyModel::SetRxPowerW | ( | double | rxPowerW | ) |
Set the receiving power of the modem
| rxPowerW | Receiving power of the modem in watts |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
| void ns3::AcousticModemEnergyModel::SetSleepPowerW | ( | double | sleepPowerW | ) |
Set the sleep power of the modem
| sleepPowerW | Sleep power of the modem in watts |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
| void ns3::AcousticModemEnergyModel::SetTxPowerW | ( | double | txPowerW | ) |
Set the transmission power of the modem
| txPowerW | Transmission power of the modem in watts |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().