22 #include "ns3/wifi-net-device.h"
23 #include "ns3/wifi-phy.h"
24 #include "ns3/wifi-tx-current-model.h"
70 std::string deviceName = device->GetInstanceTypeId().GetName();
71 if (deviceName !=
"ns3::WifiNetDevice")
103 source->AppendDeviceEnergyModel(model);
105 model->SetEnergySource(source);
112 model->SetTxCurrentModel(txcurrent);
Hold a value for an Attribute.
void Nullify()
Discard the implementation, set it to null.
bool IsNull() const
Check for null implementation.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
TypeId GetTypeId() const
Get the TypeId which will be created by this ObjectFactory.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Smart pointer class similar to boost::intrusive_ptr.
uint16_t GetUid() const
Get the internal id of this TypeId.
Ptr< WifiPhy > GetPhy() const
void RegisterListener(const std::shared_ptr< WifiPhyListener > &listener)
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
void SetOffMode()
Put in off mode.
void ResumeFromOff()
Resume from off mode.
~WifiRadioEnergyModelHelper() override
Destroy a RadioEnergy Helper.
void SetRechargedCallback(WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback callback)
void SetDepletionCallback(WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback)
WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback m_rechargedCallback
radio energy recharged callback
WifiRadioEnergyModelHelper()
Construct a helper which is used to add a radio energy model to a node.
WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback m_depletionCallback
radio energy depletion callback
void Set(std::string name, const AttributeValue &v) override
ObjectFactory m_radioEnergy
radio energy
Ptr< DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< EnergySource > source) const override
ObjectFactory m_txCurrentModel
transmit current model
A WiFi radio energy model.
Model the transmit current as a function of the transmit power and mode.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...