|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/wifi-net-device.h"
23 #include "ns3/wifi-tx-current-model.h"
24 #include "ns3/wifi-phy.h"
96 if (deviceName.compare (
"ns3::WifiNetDevice") != 0)
128 source->AppendDeviceEnergyModel (model);
130 model->SetEnergySource (source);
137 model->SetTxCurrentModel (txcurrent);
void SetRechargedCallback(WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback callback)
WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback m_depletionCallback
radio energy depletion callback
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< WifiPhy > GetPhy(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsNull(void) const
Check for null implementation.
void SetDepletionCallback(WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback)
ObjectFactory m_txCurrentModel
transmit current model
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())
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Hold a value for an Attribute.
uint16_t GetUid(void) const
Get the internal id of this TypeId.
void RegisterListener(WifiPhyListener *listener)
Smart pointer class similar to boost::intrusive_ptr.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
TypeId GetTypeId(void) const
Get the TypeId which will be created by this ObjectFactory.
virtual Ptr< DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< EnergySource > source) const override
virtual Ptr< Node > GetNode(void) const =0
void ResumeFromOff(void)
Resume from off mode.
Instantiate subclasses of ns3::Object.
WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback m_rechargedCallback
radio energy recharged callback
Model the transmit current as a function of the transmit power and mode.
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...
ObjectFactory m_radioEnergy
radio energy
void SetOffMode(void)
Put in off mode.
std::string GetName(void) const
Get the name.
WifiRadioEnergyModelHelper()
Construct a helper which is used to add a radio energy model to a node.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
A WiFi radio energy model.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
~WifiRadioEnergyModelHelper()
Destroy a RadioEnergy Helper.
void SetWifiRadioEnergyModel(const Ptr< WifiRadioEnergyModel > wifiRadioEnergyModel)
Sets the wifi radio energy model.
void Nullify(void)
Discard the implementation, set it to null.
void Set(std::string name, const AttributeValue &v) override