A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
acoustic-modem-energy-model-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 Andrea Sacco
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Author: Andrea Sacco <andrea.sacco85@gmail.com>
7
*/
8
9
#ifndef ACOUSTIC_MODEM_ENERGY_MODEL_HELPER_H
10
#define ACOUSTIC_MODEM_ENERGY_MODEL_HELPER_H
11
12
#include "ns3/acoustic-modem-energy-model.h"
13
#include "ns3/energy-model-helper.h"
14
15
namespace
ns3
16
{
17
18
/**
19
* \ingroup uan
20
*
21
* Assign AcousticModemEnergyModel to uan devices.
22
*
23
* This installer installs AcousticModemEnergyModel for only
24
* UanNetDevice objects.
25
*/
26
class
AcousticModemEnergyModelHelper
:
public
DeviceEnergyModelHelper
27
{
28
public
:
29
/**
30
* Construct a helper which is used to add a radio energy model to a node.
31
*/
32
AcousticModemEnergyModelHelper
();
33
34
/**
35
* Destroy an AcousticModemEnergy Helper.
36
*/
37
~AcousticModemEnergyModelHelper
()
override
;
38
39
/**
40
* Sets an attribute of the underlying energy model object.
41
*
42
* \param name The name of the attribute to set.
43
* \param v The value of the attribute.
44
*/
45
void
Set
(std::string name,
const
AttributeValue
& v)
override
;
46
47
/**
48
* Sets the callback to be invoked when energy is depleted.
49
*
50
* \param callback Callback function for energy depletion handling.
51
*/
52
void
SetDepletionCallback
(
53
AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback
callback);
54
55
private
:
56
/**
57
* Implements DeviceEnergyModel::Install.
58
*
59
* \param device Pointer to the NetDevice to install DeviceEnergyModel.
60
* \param source Pointer to EnergySource installed on node.
61
* \return The energy model.
62
*/
63
Ptr<energy::DeviceEnergyModel>
DoInstall
(
Ptr<NetDevice>
device,
64
Ptr<energy::EnergySource>
source)
const override
;
65
66
private
:
67
/** Energy model factory. */
68
ObjectFactory
m_modemEnergy
;
69
70
/** Callback for energy depletion. */
71
AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback
m_depletionCallback
;
72
};
73
74
}
// namespace ns3
75
76
#endif
/* ACOUSTIC_MODEM_ENERGY_MODEL_HELPER_H */
ns3::AcousticModemEnergyModelHelper
Assign AcousticModemEnergyModel to uan devices.
Definition
acoustic-modem-energy-model-helper.h:27
ns3::AcousticModemEnergyModelHelper::m_modemEnergy
ObjectFactory m_modemEnergy
Energy model factory.
Definition
acoustic-modem-energy-model-helper.h:68
ns3::AcousticModemEnergyModelHelper::m_depletionCallback
AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback m_depletionCallback
Callback for energy depletion.
Definition
acoustic-modem-energy-model-helper.h:71
ns3::AcousticModemEnergyModelHelper::SetDepletionCallback
void SetDepletionCallback(AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback callback)
Sets the callback to be invoked when energy is depleted.
Definition
acoustic-modem-energy-model-helper.cc:37
ns3::AcousticModemEnergyModelHelper::DoInstall
Ptr< energy::DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< energy::EnergySource > source) const override
Implements DeviceEnergyModel::Install.
Definition
acoustic-modem-energy-model-helper.cc:48
ns3::AcousticModemEnergyModelHelper::~AcousticModemEnergyModelHelper
~AcousticModemEnergyModelHelper() override
Destroy an AcousticModemEnergy Helper.
Definition
acoustic-modem-energy-model-helper.cc:26
ns3::AcousticModemEnergyModelHelper::AcousticModemEnergyModelHelper
AcousticModemEnergyModelHelper()
Construct a helper which is used to add a radio energy model to a node.
Definition
acoustic-modem-energy-model-helper.cc:20
ns3::AcousticModemEnergyModelHelper::Set
void Set(std::string name, const AttributeValue &v) override
Sets an attribute of the underlying energy model object.
Definition
acoustic-modem-energy-model-helper.cc:31
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::Callback< void >
ns3::DeviceEnergyModelHelper
Creates DeviceEnergyModel objects.
Definition
energy-model-helper.h:104
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition
object-factory.h:37
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
uan
helper
acoustic-modem-energy-model-helper.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0