A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::BleRadioEnergyModelHelper Class Reference

Assign BleRadioEnergyModel to ble devices. More...

#include "ble-radio-energy-model-helper.h"

+ Inheritance diagram for ns3::BleRadioEnergyModelHelper:
+ Collaboration diagram for ns3::BleRadioEnergyModelHelper:

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< DeviceEnergyModelDoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const
 

Private Attributes

BleRadioEnergyModel::BleRadioEnergyDepletionCallback m_depletionCallback
 
ObjectFactory m_radioEnergy
 
BleRadioEnergyModel::BleRadioEnergyRechargedCallback m_rechargedCallback
 

Detailed Description

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.

Constructor & Destructor Documentation

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().

+ Here is the call graph for this function:

ns3::BleRadioEnergyModelHelper::~BleRadioEnergyModelHelper ( )

Destroy a RadioEnergy Helper.

Definition at line 37 of file ble-radio-energy-model-helper.cc.

Member Function Documentation

Ptr< DeviceEnergyModel > ns3::BleRadioEnergyModelHelper::DoInstall ( Ptr< NetDevice device,
Ptr< EnergySource source 
) const
privatevirtual
Parameters
devicePointer to the NetDevice to install DeviceEnergyModel.
sourcePointer 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.

+ Here is the call graph for this function:

void ns3::BleRadioEnergyModelHelper::Set ( std::string  name,
const AttributeValue v 
)
virtual
Parameters
namethe name of the attribute to set
vthe 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().

+ Here is the call graph for this function:

void ns3::BleRadioEnergyModelHelper::SetDepletionCallback ( BleRadioEnergyModel::BleRadioEnergyDepletionCallback  callback)
Parameters
callbackCallback 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)
Parameters
callbackCallback 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.

Member Data Documentation

BleRadioEnergyModel::BleRadioEnergyDepletionCallback ns3::BleRadioEnergyModelHelper::m_depletionCallback
private
ObjectFactory ns3::BleRadioEnergyModelHelper::m_radioEnergy
private

Definition at line 85 of file ble-radio-energy-model-helper.h.

Referenced by BleRadioEnergyModelHelper(), DoInstall(), and Set().

BleRadioEnergyModel::BleRadioEnergyRechargedCallback ns3::BleRadioEnergyModelHelper::m_rechargedCallback
private

The documentation for this class was generated from the following files: