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
lr-wpan-spectrum-value-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 The Boeing Company
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Gary Pei <guangyu.pei@boeing.com>
7
*/
8
#ifndef LR_WPAN_SPECTRUM_VALUE_HELPER_H
9
#define LR_WPAN_SPECTRUM_VALUE_HELPER_H
10
11
#include <ns3/ptr.h>
12
13
namespace
ns3
14
{
15
16
class
SpectrumValue;
17
18
namespace
lrwpan
19
{
20
21
/**
22
* \ingroup lr-wpan
23
*
24
* \brief This class defines all functions to create spectrum model for LrWpan
25
*/
26
class
LrWpanSpectrumValueHelper
27
{
28
public
:
29
LrWpanSpectrumValueHelper
();
30
virtual
~LrWpanSpectrumValueHelper
();
31
32
/**
33
* \brief create spectrum value
34
* \param txPower the power transmission in dBm
35
* \param channel the channel number per IEEE802.15.4
36
* \return a Ptr to a newly created SpectrumValue instance
37
*/
38
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
(
double
txPower,
uint32_t
channel);
39
40
/**
41
* \brief create spectrum value for noise
42
* \param channel the channel number per IEEE802.15.4
43
* \return a Ptr to a newly created SpectrumValue instance
44
*/
45
Ptr<SpectrumValue>
CreateNoisePowerSpectralDensity
(
uint32_t
channel);
46
47
/**
48
* Set the noise factor added to the thermal noise.
49
* \param f A dimensionless ratio (i.e. Not in dB)
50
*/
51
void
SetNoiseFactor
(
double
f);
52
53
/**
54
* \brief total average power of the signal is the integral of the PSD using
55
* the limits of the given channel
56
* \param psd spectral density
57
* \param channel the channel number per IEEE802.15.4
58
* \return total power (using composite trap. rule to numerally integrate)
59
*/
60
static
double
TotalAvgPower
(
Ptr<const SpectrumValue>
psd,
uint32_t
channel);
61
62
private
:
63
/**
64
* A scaling factor for the noise power.
65
* It specifies how much additional noise the device
66
* contribute to the thermal noise (floor noise).
67
*/
68
double
m_noiseFactor
;
69
};
70
71
}
// namespace lrwpan
72
}
// namespace ns3
73
74
#endif
/* LR_WPAN_SPECTRUM_VALUE_HELPER_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::lrwpan::LrWpanSpectrumValueHelper
This class defines all functions to create spectrum model for LrWpan.
Definition
lr-wpan-spectrum-value-helper.h:27
ns3::lrwpan::LrWpanSpectrumValueHelper::CreateNoisePowerSpectralDensity
Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t channel)
create spectrum value for noise
Definition
lr-wpan-spectrum-value-helper.cc:98
ns3::lrwpan::LrWpanSpectrumValueHelper::~LrWpanSpectrumValueHelper
virtual ~LrWpanSpectrumValueHelper()
Definition
lr-wpan-spectrum-value-helper.cc:59
ns3::lrwpan::LrWpanSpectrumValueHelper::TotalAvgPower
static double TotalAvgPower(Ptr< const SpectrumValue > psd, uint32_t channel)
total average power of the signal is the integral of the PSD using the limits of the given channel
Definition
lr-wpan-spectrum-value-helper.cc:127
ns3::lrwpan::LrWpanSpectrumValueHelper::LrWpanSpectrumValueHelper
LrWpanSpectrumValueHelper()
Definition
lr-wpan-spectrum-value-helper.cc:53
ns3::lrwpan::LrWpanSpectrumValueHelper::m_noiseFactor
double m_noiseFactor
A scaling factor for the noise power.
Definition
lr-wpan-spectrum-value-helper.h:68
ns3::lrwpan::LrWpanSpectrumValueHelper::CreateTxPowerSpectralDensity
Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint32_t channel)
create spectrum value
Definition
lr-wpan-spectrum-value-helper.cc:65
ns3::lrwpan::LrWpanSpectrumValueHelper::SetNoiseFactor
void SetNoiseFactor(double f)
Set the noise factor added to the thermal noise.
Definition
lr-wpan-spectrum-value-helper.cc:121
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lr-wpan
model
lr-wpan-spectrum-value-helper.h
Generated on Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0