|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef ACOUSTIC_MODEM_ENERGY_MODEL_H
22 #define ACOUSTIC_MODEM_ENERGY_MODEL_H
24 #include "ns3/device-energy-model.h"
25 #include "ns3/nstime.h"
26 #include "ns3/event-id.h"
27 #include "ns3/traced-value.h"
a unique identifier for an interface.
Time m_lastUpdateTime
Time stamp of previous energy update.
AcousticModemEnergyRechargeCallback m_energyRechargeCallback
Energy recharge callback.
void SetRxPowerW(double rxPowerW)
Set the receiving power of the modem.
static TypeId GetTypeId(void)
Register this type.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetEnergySource(Ptr< EnergySource > source)
virtual void HandleEnergyDepletion(void)
Handles energy depletion.
double GetSleepPowerW(void) const
Get the sleep state power of the modem.
Callback< void > AcousticModemEnergyRechargeCallback
Callback type for energy recharge handling.
int m_currentState
Current modem state.
void SetMicroModemState(const int state)
double GetTxPowerW(void) const
Get the transmission power of the modem.
TracedValue< double > m_totalEnergyConsumption
The total energy consumed by this model.
double m_rxPowerW
The receiver power, in watts.
virtual void HandleEnergyRecharged(void)
Handles energy recharged.
Callback< void > AcousticModemEnergyDepletionCallback
Callback type for energy depletion handling.
double m_idlePowerW
The idle power, in watts.
Ptr< EnergySource > m_source
The energy source.
int GetCurrentState(void) const
Get the current state of the modem.
virtual ~AcousticModemEnergyModel()
Dummy destructor, see DoDispose.
AcousticModemEnergyModel()
Constructor.
Simulation virtual time values and global simulation resolution.
void SetIdlePowerW(double idlePowerW)
Set the idle state power of the modem.
double GetIdlePowerW(void) const
Get the idle power of the modem.
virtual Ptr< Node > GetNode(void) const
Gets pointer to node.
double GetRxPowerW(void) const
Get the receiving power.
virtual double DoGetCurrentA(void) const
void SetEnergyRechargeCallback(AcousticModemEnergyRechargeCallback callback)
virtual void ChangeState(int newState)
Changes state of the AcousticModemEnergyModel.
Base class for device energy models.
virtual void HandleEnergyChanged(void)
Handles energy changed.
void DoDispose(void)
Destructor implementation.
bool IsStateTransitionValid(const int destState)
AcousticModemEnergyDepletionCallback m_energyDepletionCallback
Energy depletion callback.
WHOI micro-modem energy model.
double m_txPowerW
The transmitter power, in watts.
double m_sleepPowerW
The sleep power, in watts.
Ptr< Node > m_node
The node hosting this transducer.
void SetSleepPowerW(double sleepPowerW)
Set the sleep power of the modem.
void SetEnergyDepletionCallback(AcousticModemEnergyDepletionCallback callback)
void SetTxPowerW(double txPowerW)
Set the transmission power of the modem.
virtual void SetNode(Ptr< Node > node)
Sets pointer to node.
virtual double GetTotalEnergyConsumption(void) const