23 #include "ns3/wifi-phy.h"
24 #include "ns3/wifi-net-device.h"
25 #include "ns3/config.h"
26 #include "ns3/names.h"
27 #include "ns3/wifi-tx-current-model.h"
98 std::string deviceName = device->GetInstanceTypeId ().GetName ();
99 if (deviceName.compare (
"ns3::WifiNetDevice") != 0)
107 model->SetEnergySource (source);
131 source->AppendDeviceEnergyModel (model);
133 wifiPhy->RegisterListener (model->GetPhyListener ());
138 model->SetTxCurrentModel (txcurrent);
TypeId GetTypeId(void) const
smart pointer class similar to boost::intrusive_ptr
void SetDepletionCallback(WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback)
Hold a value for an Attribute.
bool IsNull(void) const
Check for null implementation.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void SetTypeId(TypeId tid)
#define NS_FATAL_ERROR(msg)
fatal error handling
WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback m_rechargedCallback
virtual void ResumeFromSleep(void)=0
Resume from sleep mode.
WifiRadioEnergyModelHelper()
Construct a helper which is used to add a radio energy model to a node.
~WifiRadioEnergyModelHelper()
Destroy a RadioEnergy Helper.
Ptr< Object > Create(void) const
ObjectFactory m_radioEnergy
WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback m_depletionCallback
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void Set(std::string name, const AttributeValue &v)
virtual Ptr< DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< EnergySource > source) const
void Set(std::string name, const AttributeValue &value)
uint16_t GetUid(void) const
A WiFi radio energy model.
instantiate subclasses of ns3::Object.
virtual void SetSleepMode(void)=0
Put in sleep mode.
void Nullify(void)
Discard the implementation, set it to null.
Modelize the transmit current as a function of the transmit power and mode.
Ptr< T > GetObject(void) const
void SetTxCurrentModel(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
void SetRechargedCallback(WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback callback)
ObjectFactory m_txCurrentModel