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