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"
double GetRxPowerW(void) const
Get the recieving power.
virtual void ChangeState(int newState)
Changes state of the AcousticModemEnergyModel.
AcousticModemEnergyModel()
Constructor.
keep track of time values and allow control of global simulation resolution
virtual ~AcousticModemEnergyModel()
Dummy destructor, see DoDispose.
virtual void HandleEnergyDepletion(void)
Handles energy depletion.
virtual double DoGetCurrentA(void) const
double m_idlePowerW
The idle power, in watts.
Base class for device energy models.
virtual double GetTotalEnergyConsumption(void) const
double m_rxPowerW
The receiver power, in watts.
AcousticModemEnergyDepletionCallback m_energyDepletionCallback
Energy depletion callback.
void SetIdlePowerW(double idlePowerW)
Set the idle state power of the modem.
bool IsStateTransitionValid(const int destState)
Ptr< Node > m_node
The node hosting this transducer.
void SetEnergyDepletionCallback(AcousticModemEnergyDepletionCallback callback)
WHOI micro-modem energy model.
double m_sleepPowerW
The sleep power, in watts.
Callback< void > AcousticModemEnergyDepletionCallback
Callback type for energy depletion handling.
void SetTxPowerW(double txPowerW)
Set the transmission power of the modem.
void SetRxPowerW(double rxPowerW)
Set the receiving power of the modem.
virtual void SetEnergySource(Ptr< EnergySource > source)
static TypeId GetTypeId(void)
Register this type.
int m_currentState
Current modem state.
Ptr< EnergySource > m_source
The energy source.
void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
double GetSleepPowerW(void) const
Get the sleep state power of the modem.
double GetTxPowerW(void) const
Get the transmission power of the modem.
virtual Ptr< Node > GetNode(void) const
Gets pointer to node.
Time m_lastUpdateTime
Time stamp of previous energy update.
virtual void SetNode(Ptr< Node > node)
Sets pointer to node.
void SetSleepPowerW(double sleepPowerW)
Set the sleep power of the modem.
int GetCurrentState(void) const
Get the current state of the modem.
double m_txPowerW
The transmitter power, in watts.
double GetIdlePowerW(void) const
Get the idle power of the modem.
a unique identifier for an interface.
void SetMicroModemState(const int state)
TracedValue< double > m_totalEnergyConsumption
The total energy consumed by this model.