|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/basic-energy-source-helper.h"
23 #include "ns3/uan-phy.h"
24 #include "ns3/uan-net-device.h"
25 #include "ns3/config.h"
26 #include "ns3/names.h"
65 if (deviceName.compare (
"ns3::UanNetDevice") != 0)
73 model->SetNode (node);
75 model->SetEnergySource (source);
82 source->AppendDeviceEnergyModel (model);
84 source->SetNode (node);
88 uanPhy->SetEnergyModelCallback (cb);
ObjectFactory m_modemEnergy
Energy model factory.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void ChangeState(int newState)=0
Hold a value for an Attribute.
virtual Ptr< DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< EnergySource > source) const
Implements DeviceEnergyModel::Install.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
~AcousticModemEnergyModelHelper()
Destroy an AcousticModemEnergy Helper.
void SetDepletionCallback(AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback callback)
Sets the callback to be invoked when energy is depleted.
virtual Ptr< Node > GetNode(void) const =0
void Set(std::string name, const AttributeValue &v)
Sets an attribute of the underlying energy model object.
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...
AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback m_depletionCallback
Callback for energy depletion.
std::string GetName(void) const
Get the name.
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.
AcousticModemEnergyModelHelper()
Construct a helper which is used to add a radio energy model to a node.
WHOI micro-modem 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.
void Nullify(void)
Discard the implementation, set it to null.