A Discrete-Event Network Simulator
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
13namespace ns3
14{
15
16class SpectrumValue;
17
18namespace lrwpan
19{
20
21/**
22 * \ingroup lr-wpan
23 *
24 * \brief This class defines all functions to create spectrum model for LrWpan
25 */
27{
28 public:
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 */
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 */
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 */
69};
70
71} // namespace lrwpan
72} // namespace ns3
73
74#endif /* LR_WPAN_SPECTRUM_VALUE_HELPER_H */
Smart pointer class similar to boost::intrusive_ptr.
This class defines all functions to create spectrum model for LrWpan.
Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t channel)
create spectrum value for noise
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
double m_noiseFactor
A scaling factor for the noise power.
Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint32_t channel)
create spectrum value
void SetNoiseFactor(double f)
Set the noise factor added to the thermal noise.
Every class exported by the ns3 library is enclosed in the ns3 namespace.