Assign BleRadioEnergyModel to ble devices. More...
#include "ble-radio-energy-model-helper.h"
Public Member Functions | |
BleRadioEnergyModelHelper () | |
Construct a helper which is used to add a radio energy model to a node. More... | |
~BleRadioEnergyModelHelper () | |
Destroy a RadioEnergy Helper. More... | |
void | Set (std::string name, const AttributeValue &v) |
void | SetDepletionCallback (BleRadioEnergyModel::BleRadioEnergyDepletionCallback callback) |
void | SetRechargedCallback (BleRadioEnergyModel::BleRadioEnergyRechargedCallback callback) |
Public Member Functions inherited from ns3::DeviceEnergyModelHelper | |
virtual | ~DeviceEnergyModelHelper () |
DeviceEnergyModelContainer | Install (Ptr< NetDevice > device, Ptr< EnergySource > source) const |
DeviceEnergyModelContainer | Install (NetDeviceContainer deviceContainer, EnergySourceContainer sourceContainer) const |
Private Member Functions | |
virtual Ptr< DeviceEnergyModel > | DoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const |
Private Attributes | |
BleRadioEnergyModel::BleRadioEnergyDepletionCallback | m_depletionCallback |
ObjectFactory | m_radioEnergy |
BleRadioEnergyModel::BleRadioEnergyRechargedCallback | m_rechargedCallback |
Assign BleRadioEnergyModel to ble devices.
This installer installs BleRadioEnergyModel for only BleNetDevice objects.
Definition at line 37 of file ble-radio-energy-model-helper.h.
ns3::BleRadioEnergyModelHelper::BleRadioEnergyModelHelper | ( | ) |
Construct a helper which is used to add a radio energy model to a node.
Definition at line 30 of file ble-radio-energy-model-helper.cc.
References m_depletionCallback, m_radioEnergy, m_rechargedCallback, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Nullify(), and ns3::ObjectFactory::SetTypeId().
ns3::BleRadioEnergyModelHelper::~BleRadioEnergyModelHelper | ( | ) |
Destroy a RadioEnergy Helper.
Definition at line 37 of file ble-radio-energy-model-helper.cc.
|
privatevirtual |
device | Pointer to the NetDevice to install DeviceEnergyModel. |
source | Pointer to EnergySource to install. |
Implements DeviceEnergyModel::Install.
Implements ns3::DeviceEnergyModelHelper.
Definition at line 62 of file ble-radio-energy-model-helper.cc.
References ns3::BleRadioEnergyModel::ChangeState(), ns3::ObjectFactory::Create(), ns3::Object::GetObject(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_depletionCallback, m_radioEnergy, m_rechargedCallback, ns3::MakeCallback(), NS_ASSERT, and NS_FATAL_ERROR.
|
virtual |
name | the name of the attribute to set |
v | the value of the attribute |
Sets an attribute of the underlying PHY object.
Implements ns3::DeviceEnergyModelHelper.
Definition at line 42 of file ble-radio-energy-model-helper.cc.
References m_radioEnergy, and ns3::ObjectFactory::Set().
void ns3::BleRadioEnergyModelHelper::SetDepletionCallback | ( | BleRadioEnergyModel::BleRadioEnergyDepletionCallback | callback | ) |
callback | Callback function for energy depletion handling. |
Sets the callback to be invoked when energy is depleted.
Definition at line 48 of file ble-radio-energy-model-helper.cc.
References m_depletionCallback.
void ns3::BleRadioEnergyModelHelper::SetRechargedCallback | ( | BleRadioEnergyModel::BleRadioEnergyRechargedCallback | callback | ) |
callback | Callback function for energy recharged handling. |
Sets the callback to be invoked when energy is recharged.
Definition at line 55 of file ble-radio-energy-model-helper.cc.
References m_rechargedCallback.
|
private |
Definition at line 86 of file ble-radio-energy-model-helper.h.
Referenced by BleRadioEnergyModelHelper(), DoInstall(), and SetDepletionCallback().
|
private |
Definition at line 85 of file ble-radio-energy-model-helper.h.
Referenced by BleRadioEnergyModelHelper(), DoInstall(), and Set().
|
private |
Definition at line 87 of file ble-radio-energy-model-helper.h.
Referenced by BleRadioEnergyModelHelper(), DoInstall(), and SetRechargedCallback().