22 #include "ns3/wifi-net-device.h"
23 #include "ns3/wifi-tx-current-model.h"
24 #include "ns3/wifi-phy.h"
95 std::string deviceName = device->GetInstanceTypeId ().GetName ();
96 if (deviceName.compare (
"ns3::WifiNetDevice") != 0)
128 source->AppendDeviceEnergyModel (model);
130 model->SetEnergySource (source);
137 model->SetTxCurrentModel (txcurrent);
Hold a value for an Attribute.
bool IsNull(void) const
Check for null implementation.
void Nullify(void)
Discard the implementation, set it to null.
Instantiate subclasses of ns3::Object.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
TypeId GetTypeId(void) const
Get the TypeId which will be created by this ObjectFactory.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Smart pointer class similar to boost::intrusive_ptr.
uint16_t GetUid(void) const
Get the internal id of this TypeId.
Ptr< WifiPhy > GetPhy(void) const
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
void SetOffMode(void)
Put in off mode.
void RegisterListener(WifiPhyListener *listener)
void ResumeFromOff(void)
Resume from off mode.
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
virtual Ptr< DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< EnergySource > source) const override
ObjectFactory m_txCurrentModel
transmit current model
~WifiRadioEnergyModelHelper()
Destroy a RadioEnergy Helper.
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())
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, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...