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
lora-radio-energy-model-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 University of Padova
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Romagnolo Stefano <romagnolostefano93@gmail.com>
7
*/
8
9
#ifndef LORA_RADIO_ENERGY_MODEL_HELPER_H
10
#define LORA_RADIO_ENERGY_MODEL_HELPER_H
11
12
#include "ns3/energy-model-helper.h"
13
#include "ns3/lora-radio-energy-model.h"
14
15
namespace
ns3
16
{
17
namespace
lorawan
18
{
19
20
/**
21
* \ingroup lorawan
22
*
23
* Installs LoraRadioEnergyModel on devices.
24
*
25
* This installer installs LoraRadioEnergyModel for only LoraNetDevice objects.
26
*/
27
class
LoraRadioEnergyModelHelper
:
public
DeviceEnergyModelHelper
28
{
29
public
:
30
LoraRadioEnergyModelHelper
();
//!< Default constructor
31
~LoraRadioEnergyModelHelper
()
override
;
//!< Destructor
32
33
/**
34
* \param name The name of the attribute to set.
35
* \param v The value of the attribute.
36
*
37
* Sets an attribute of the underlying PHY object.
38
*/
39
void
Set
(std::string name,
const
AttributeValue
& v)
override
;
40
41
/**
42
* \param name The name of the model to set.
43
* \param n0 The name of the attribute to set.
44
* \param v0 The value of the attribute to set.
45
* \param n1 The name of the attribute to set.
46
* \param v1 The value of the attribute to set.
47
* \param n2 The name of the attribute to set.
48
* \param v2 The value of the attribute to set.
49
* \param n3 The name of the attribute to set.
50
* \param v3 The value of the attribute to set.
51
* \param n4 The name of the attribute to set.
52
* \param v4 The value of the attribute to set.
53
* \param n5 The name of the attribute to set.
54
* \param v5 The value of the attribute to set.
55
* \param n6 The name of the attribute to set.
56
* \param v6 The value of the attribute to set.
57
* \param n7 The name of the attribute to set.
58
* \param v7 The value of the attribute to set.
59
*
60
* Configure a Transmission Current model for this EnergySource.
61
*/
62
void
SetTxCurrentModel
(std::string name,
63
std::string n0 =
""
,
64
const
AttributeValue
& v0 =
EmptyAttributeValue
(),
65
std::string n1 =
""
,
66
const
AttributeValue
& v1 =
EmptyAttributeValue
(),
67
std::string n2 =
""
,
68
const
AttributeValue
& v2 =
EmptyAttributeValue
(),
69
std::string n3 =
""
,
70
const
AttributeValue
& v3 =
EmptyAttributeValue
(),
71
std::string n4 =
""
,
72
const
AttributeValue
& v4 =
EmptyAttributeValue
(),
73
std::string n5 =
""
,
74
const
AttributeValue
& v5 =
EmptyAttributeValue
(),
75
std::string n6 =
""
,
76
const
AttributeValue
& v6 =
EmptyAttributeValue
(),
77
std::string n7 =
""
,
78
const
AttributeValue
& v7 =
EmptyAttributeValue
());
79
80
private
:
81
/**
82
* \param device Pointer to the NetDevice to install DeviceEnergyModel.
83
* \param source Pointer to EnergySource to install.
84
* \return Ptr<DeviceEnergyModel>.
85
*
86
* Implements DeviceEnergyModel::Install.
87
*/
88
Ptr<DeviceEnergyModel>
DoInstall
(
Ptr<NetDevice>
device,
89
Ptr<EnergySource>
source)
const override
;
90
91
private
:
92
ObjectFactory
m_radioEnergy
;
///< radio energy
93
ObjectFactory
m_txCurrentModel
;
///< transmit current model
94
};
95
96
}
// namespace lorawan
97
98
}
// namespace ns3
99
#endif
/* LORA_RADIO_ENERGY_MODEL_HELPER_H */
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::DeviceEnergyModelHelper
Creates DeviceEnergyModel objects.
Definition
energy-model-helper.h:104
ns3::EmptyAttributeValue
A class for an empty attribute value.
Definition
attribute.h:231
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::lorawan::LoraRadioEnergyModelHelper
Installs LoraRadioEnergyModel on devices.
Definition
lora-radio-energy-model-helper.h:28
ns3::lorawan::LoraRadioEnergyModelHelper::m_radioEnergy
ObjectFactory m_radioEnergy
radio energy
Definition
lora-radio-energy-model-helper.h:92
ns3::lorawan::LoraRadioEnergyModelHelper::DoInstall
Ptr< DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< EnergySource > source) const override
Definition
lora-radio-energy-model-helper.cc:72
ns3::lorawan::LoraRadioEnergyModelHelper::Set
void Set(std::string name, const AttributeValue &v) override
Definition
lora-radio-energy-model-helper.cc:30
ns3::lorawan::LoraRadioEnergyModelHelper::m_txCurrentModel
ObjectFactory m_txCurrentModel
transmit current model
Definition
lora-radio-energy-model-helper.h:93
ns3::lorawan::LoraRadioEnergyModelHelper::~LoraRadioEnergyModelHelper
~LoraRadioEnergyModelHelper() override
Destructor.
Definition
lora-radio-energy-model-helper.cc:25
ns3::lorawan::LoraRadioEnergyModelHelper::SetTxCurrentModel
void SetTxCurrentModel(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition
lora-radio-energy-model-helper.cc:36
ns3::lorawan::LoraRadioEnergyModelHelper::LoraRadioEnergyModelHelper
LoraRadioEnergyModelHelper()
Default constructor.
Definition
lora-radio-energy-model-helper.cc:20
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lorawan
helper
lora-radio-energy-model-helper.h
Generated on Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0