A Discrete-Event Network Simulator
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
15namespace 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 */
27{
28 public:
29 /**
30 * Construct a helper which is used to add a radio energy model to a node.
31 */
33
34 /**
35 * Destroy an AcousticModemEnergy Helper.
36 */
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 */
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 */
64 Ptr<energy::EnergySource> source) const override;
65
66 private:
67 /** Energy model factory. */
69
70 /** Callback for energy depletion. */
72};
73
74} // namespace ns3
75
76#endif /* ACOUSTIC_MODEM_ENERGY_MODEL_HELPER_H */
Assign AcousticModemEnergyModel to uan devices.
AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback m_depletionCallback
Callback for energy depletion.
void SetDepletionCallback(AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback callback)
Sets the callback to be invoked when energy is depleted.
Ptr< energy::DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< energy::EnergySource > source) const override
Implements DeviceEnergyModel::Install.
~AcousticModemEnergyModelHelper() override
Destroy an AcousticModemEnergy Helper.
AcousticModemEnergyModelHelper()
Construct a helper which is used to add a radio energy model to a node.
void Set(std::string name, const AttributeValue &v) override
Sets an attribute of the underlying energy model object.
Hold a value for an Attribute.
Definition attribute.h:59
Creates DeviceEnergyModel objects.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.