ns-3
ns3::AcousticModemEnergyModel Class Reference

WHOI micro-modem energy model. More...

#include <acoustic-modem-energy-model.h>

Inheritance diagram for ns3::AcousticModemEnergyModel:
Collaboration diagram for ns3::AcousticModemEnergyModel:

List of all members.

Public Types

typedef Callback< void > AcousticModemEnergyDepletionCallback

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
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.

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::AcousticModemEnergyModel.

Detailed Description

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


Member Typedef Documentation


Member Function Documentation

Returns:
Current state.

References NS_LOG_FUNCTION.

Returns:
The idle power of the modem in Watts

References NS_LOG_FUNCTION.

Referenced by GetTypeId().

Ptr< Node > ns3::AcousticModemEnergyModel::GetNode ( void  ) const [virtual]

Gets pointer to node.

Returns:
Pointer to node.

Implements DeviceEnergyModel::GetNode.

Returns:
The receiving power of the modem in Watts

References NS_LOG_FUNCTION.

Referenced by GetTypeId().

Returns:
The sleep power of the modem in Watts

References NS_LOG_FUNCTION.

Referenced by GetTypeId().

Returns:
Total energy consumption of the modem

Implements DeviceEnergyModel::GetTotalEnergyConsumption.

Implements ns3::DeviceEnergyModel.

References NS_LOG_FUNCTION.

Returns:
The transmission power of the modem in Watts

References NS_LOG_FUNCTION.

Referenced by GetTypeId().

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

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::AcousticModemEnergyModel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::DeviceEnergyModel/$ns3::AcousticModemEnergyModel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::AcousticModemEnergyModel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::DeviceEnergyModel/$ns3::AcousticModemEnergyModel

Attributes defined for this type:

  • TxPowerW: The modem Tx power in Watts
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 50
    • Flags: construct write read
  • RxPowerW: The modem Rx power in Watts
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0.158
    • Flags: construct write read
  • IdlePowerW: The modem Idle power in Watts
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0.158
    • Flags: construct write read
  • SleepPowerW: The modem Sleep power in Watts
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0.0058
    • Flags: construct write read

TraceSources defined for this type:

  • TotalEnergyConsumption: Total energy consumption of the modem device.

Reimplemented from ns3::DeviceEnergyModel.

References GetIdlePowerW(), GetRxPowerW(), GetSleepPowerW(), GetTxPowerW(), ns3::MakeTraceSourceAccessor(), SetIdlePowerW(), ns3::TypeId::SetParent(), SetRxPowerW(), SetSleepPowerW(), and SetTxPowerW().

Parameters:
callbackCallback function.

Sets callback for energy depletion handling.

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Sets pointer to EnergySouce installed on node.

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

Parameters:
idlePowerWIdle power of the modem in watts

References NS_LOG_FUNCTION.

Referenced by GetTypeId().

void ns3::AcousticModemEnergyModel::SetNode ( Ptr< Node node) [virtual]

Sets pointer to node.

Parameters:
nodePointer 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

Parameters:
rxPowerWReceiving 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

Parameters:
sleepPowerWSleep 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

Parameters:
txPowerWTransmission power of the modem in watts

References NS_LOG_FUNCTION.

Referenced by GetTypeId().


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