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
adhoc-aloha-noack-ideal-phy-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 CTTC
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Nicola Baldo <nbaldo@cttc.es>
7
*/
8
9
#ifndef ADHOC_ALOHA_NOACK_IDEAL_PHY_HELPER_H
10
#define ADHOC_ALOHA_NOACK_IDEAL_PHY_HELPER_H
11
12
#include <ns3/attribute.h>
13
#include <ns3/net-device-container.h>
14
#include <ns3/node-container.h>
15
#include <ns3/object-factory.h>
16
#include <ns3/queue.h>
17
18
#include <string>
19
20
namespace
ns3
21
{
22
23
class
SpectrumValue;
24
class
SpectrumChannel;
25
26
/**
27
* \ingroup spectrum
28
* \brief create the AlohaNoackNetDevice
29
*/
30
class
AdhocAlohaNoackIdealPhyHelper
31
{
32
public
:
33
AdhocAlohaNoackIdealPhyHelper
();
34
~AdhocAlohaNoackIdealPhyHelper
();
35
36
/**
37
* set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper
38
*
39
* @param channel
40
*/
41
void
SetChannel
(
Ptr<SpectrumChannel>
channel);
42
43
/**
44
* set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper
45
*
46
* @param channelName
47
*/
48
void
SetChannel
(std::string channelName);
49
50
/**
51
*
52
* @param txPsd the Power Spectral Density to be used for transmission by all created PHY
53
* instances
54
*/
55
void
SetTxPowerSpectralDensity
(
Ptr<SpectrumValue>
txPsd);
56
57
/**
58
*
59
* @param noisePsd the Power Spectral Density to be used for transmission by all created PHY
60
* instances
61
*/
62
void
SetNoisePowerSpectralDensity
(
Ptr<SpectrumValue>
noisePsd);
63
64
/**
65
* @param name the name of the attribute to set
66
* @param v the value of the attribute
67
*
68
* Set these attributes on each HdOfdmSpectrumPhy instance to be created
69
*/
70
void
SetPhyAttribute
(std::string name,
const
AttributeValue
& v);
71
72
/**
73
* @param n1 the name of the attribute to set
74
* @param v1 the value of the attribute to set
75
*
76
* Set these attributes on each AlohaNoackNetDevice created
77
*/
78
void
SetDeviceAttribute
(std::string n1,
const
AttributeValue
& v1);
79
80
/**
81
* \tparam Ts \deduced Argument types
82
* \param type the type of the model to set
83
* \param [in] args Name and AttributeValue pairs to set.
84
*
85
* Configure the AntennaModel instance for each new device to be created
86
*/
87
template
<
typename
... Ts>
88
void
SetAntenna
(std::string type, Ts&&... args);
89
90
/**
91
* @param c the set of nodes on which a device must be created
92
* @return a device container which contains all the devices created by this method.
93
*/
94
NetDeviceContainer
Install
(
NodeContainer
c)
const
;
95
/**
96
* @param node the node on which a device must be created
97
* \returns a device container which contains all the devices created by this method.
98
*/
99
NetDeviceContainer
Install
(
Ptr<Node>
node)
const
;
100
/**
101
* @param nodeName the name of node on which a device must be created
102
* @return a device container which contains all the devices created by this method.
103
*/
104
NetDeviceContainer
Install
(std::string nodeName)
const
;
105
106
protected
:
107
ObjectFactory
m_phy
;
//!< Object factory for the phy objects
108
ObjectFactory
m_device
;
//!< Object factory for the NetDevice objects
109
ObjectFactory
m_queue
;
//!< Object factory for the Queue objects
110
ObjectFactory
m_antenna
;
//!< Object factory for the Antenna objects
111
Ptr<SpectrumChannel>
m_channel
;
//!< Channel
112
Ptr<SpectrumValue>
m_txPsd
;
//!< Tx power spectral density
113
Ptr<SpectrumValue>
m_noisePsd
;
//!< Noise power spectral density
114
};
115
116
/***************************************************************
117
* Implementation of the templates declared above.
118
***************************************************************/
119
120
template
<
typename
... Ts>
121
void
122
AdhocAlohaNoackIdealPhyHelper::SetAntenna
(std::string type, Ts&&... args)
123
{
124
m_antenna
=
ObjectFactory
(std::forward<Ts>(args)...);
125
}
126
127
}
// namespace ns3
128
129
#endif
/* ADHOC_ALOHA_NOACK_IDEAL_PHY_HELPER_H */
ns3::AdhocAlohaNoackIdealPhyHelper
create the AlohaNoackNetDevice
Definition
adhoc-aloha-noack-ideal-phy-helper.h:31
ns3::AdhocAlohaNoackIdealPhyHelper::SetPhyAttribute
void SetPhyAttribute(std::string name, const AttributeValue &v)
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:68
ns3::AdhocAlohaNoackIdealPhyHelper::m_queue
ObjectFactory m_queue
Object factory for the Queue objects.
Definition
adhoc-aloha-noack-ideal-phy-helper.h:109
ns3::AdhocAlohaNoackIdealPhyHelper::SetTxPowerSpectralDensity
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:54
ns3::AdhocAlohaNoackIdealPhyHelper::m_channel
Ptr< SpectrumChannel > m_channel
Channel.
Definition
adhoc-aloha-noack-ideal-phy-helper.h:111
ns3::AdhocAlohaNoackIdealPhyHelper::AdhocAlohaNoackIdealPhyHelper
AdhocAlohaNoackIdealPhyHelper()
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:28
ns3::AdhocAlohaNoackIdealPhyHelper::SetDeviceAttribute
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:74
ns3::AdhocAlohaNoackIdealPhyHelper::m_noisePsd
Ptr< SpectrumValue > m_noisePsd
Noise power spectral density.
Definition
adhoc-aloha-noack-ideal-phy-helper.h:113
ns3::AdhocAlohaNoackIdealPhyHelper::SetAntenna
void SetAntenna(std::string type, Ts &&... args)
Definition
adhoc-aloha-noack-ideal-phy-helper.h:122
ns3::AdhocAlohaNoackIdealPhyHelper::m_txPsd
Ptr< SpectrumValue > m_txPsd
Tx power spectral density.
Definition
adhoc-aloha-noack-ideal-phy-helper.h:112
ns3::AdhocAlohaNoackIdealPhyHelper::SetNoisePowerSpectralDensity
void SetNoisePowerSpectralDensity(Ptr< SpectrumValue > noisePsd)
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:61
ns3::AdhocAlohaNoackIdealPhyHelper::m_phy
ObjectFactory m_phy
Object factory for the phy objects.
Definition
adhoc-aloha-noack-ideal-phy-helper.h:107
ns3::AdhocAlohaNoackIdealPhyHelper::m_antenna
ObjectFactory m_antenna
Object factory for the Antenna objects.
Definition
adhoc-aloha-noack-ideal-phy-helper.h:110
ns3::AdhocAlohaNoackIdealPhyHelper::m_device
ObjectFactory m_device
Object factory for the NetDevice objects.
Definition
adhoc-aloha-noack-ideal-phy-helper.h:108
ns3::AdhocAlohaNoackIdealPhyHelper::SetChannel
void SetChannel(Ptr< SpectrumChannel > channel)
set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:41
ns3::AdhocAlohaNoackIdealPhyHelper::~AdhocAlohaNoackIdealPhyHelper
~AdhocAlohaNoackIdealPhyHelper()
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:36
ns3::AdhocAlohaNoackIdealPhyHelper::Install
NetDeviceContainer Install(NodeContainer c) const
Definition
adhoc-aloha-noack-ideal-phy-helper.cc:80
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition
net-device-container.h:32
ns3::NodeContainer
keep track of a set of node pointers.
Definition
node-container.h:29
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
spectrum
helper
adhoc-aloha-noack-ideal-phy-helper.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0