Loading...
Searching...
No Matches
satellite-phy-rx-carrier-conf.cc
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2013 Magister Solutions Ltd.
4 * Copyright (c) 2018 CNES
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Author: Jani Puttonen <jani.puttonen@magister.fi>
20 * Author: Mathias Ettinger <mettinger@toulouse.viveris.fr>
21 */
22
24
26#include "satellite-utils.h"
27
28#include "ns3/boolean.h"
29#include "ns3/double.h"
30#include "ns3/enum.h"
31#include "ns3/log.h"
32#include "ns3/uinteger.h"
33
34NS_LOG_COMPONENT_DEFINE("SatPhyRxCarrierConf");
35
36namespace ns3
37{
38
39NS_OBJECT_ENSURE_REGISTERED(SatPhyRxCarrierConf);
40
67
69 : m_daIfModel(createParams.m_daIfModel),
70 m_raIfModel(createParams.m_raIfModel),
72 m_errorModel(createParams.m_errorModel),
75 m_rxAciIfWrtNoiseFactor(createParams.m_aciIfWrtNoiseFactor),
76 m_rxMode(createParams.m_rxMode),
77 m_carrierCount(createParams.m_carrierCount),
78 m_carrierBandwidthConverter(createParams.m_bwConverter),
79 m_channelType(createParams.m_chType),
81 m_channelEstimationError(createParams.m_cec),
84 m_rxExtNoiseDensityWhz(createParams.m_extNoiseDensityWhz),
91{
92 NS_LOG_FUNCTION(this);
93}
94
95TypeId
97{
98 static TypeId tid =
99 TypeId("ns3::SatPhyRxCarrierConf")
100 .SetParent<Object>()
101 .AddAttribute("EnableIntfOutputTrace",
102 "Enable interference output trace.",
103 BooleanValue(false),
105 MakeBooleanChecker())
106 .AddAttribute("RandomAccessAverageNormalizedOfferedLoadMeasurementWindowSize",
107 "Random access average normalized offered load measurement window size",
108 UintegerValue(10),
109 MakeUintegerAccessor(
112 MakeUintegerChecker<uint32_t>())
113 .AddAttribute(
114 "EnableRandomAccessDynamicLoadControl",
115 "Enable random access dynamic load control.",
116 BooleanValue(true),
118 MakeBooleanChecker())
119 .AddConstructor<SatPhyRxCarrierConf>();
120 return tid;
121}
122
123void
125{
126 NS_LOG_FUNCTION(this);
127
128 m_linkResults = nullptr;
131
132 Object::DoDispose();
133}
134
135void
136SatPhyRxCarrierConf::SetLinkResults(Ptr<SatLinkResults> linkResults)
137{
138 m_linkResults = linkResults;
139}
140
141uint32_t
146
152
153double
158
160SatPhyRxCarrierConf::GetInterferenceModel(bool isRandomAccessCarrier) const
161{
162 if (isRandomAccessCarrier)
163 {
164 return m_raIfModel;
165 }
166 else
167 {
168 return m_daIfModel;
169 }
170}
171
174{
175 if (isRandomAccessCarrier)
176 {
178 }
179 else
180 {
182 }
183}
184
185Ptr<SatLinkResults>
190
191double
193 SatEnums::CarrierBandwidthType_t bandwidthType) const
194{
195 return m_carrierBandwidthConverter(m_channelType, carrierId, bandwidthType);
196}
197
198double
203
204double
209
210double
215
218{
219 return m_rxMode;
220}
221
227
233
234bool
239
240Ptr<SatChannelEstimationErrorContainer>
245
258
259double
264
265uint32_t
270
271bool
276
277} // namespace ns3
ChannelType_t
Types of channel.
CarrierBandwidthType_t
Types of bandwidth.
RegenerationMode_t
The regeneration mode used in satellites.
Information of beam users liken UTs and their users.
SatEnums::ChannelType_t GetChannelType() const
Get channel type.
static TypeId GetTypeId(void)
Get the type ID.
double GetRandomAccessConstantErrorRate() const
Get random access constant error rate.
ErrorModel GetErrorModel() const
Get configured error model.
AdditionalInterferenceCallback m_additionalInterferenceCallback
SatPhyRxCarrierConf()
Constructor for SatPhyRxCarrierConf.
bool IsRandomAccessDynamicLoadControlEnabled() const
Function for checking if random access dynamic load control is enabled.
InterferenceEliminationModel
Interference cancelation model enum.
double GetCarrierBandwidthHz(uint32_t carrierId, SatEnums::CarrierBandwidthType_t bandwidthType) const
Get configured bandwidth.
uint32_t GetCarrierCount() const
Get the number of configured carriers.
uint32_t m_randomAccessAverageNormalizedOfferedLoadMeasurementWindowSize
SatEnums::RegenerationMode_t GetLinkRegenerationMode() const
Get link regeneration mode.
SatEnums::RandomAccessModel_t m_randomAccessModel
RandomAccessCollisionModel m_raCollisionModel
SatPhyRxCarrierConf(RxCarrierCreateParams_s params)
Default constructor for SatPhyRxCarrierConf.
double GetConstantDaErrorRate() const
Get constant error rate for dedicated access.
RandomAccessCollisionModel
Random access collision model enum.
void SetLinkResults(Ptr< SatLinkResults > linkResults)
Set link results for the carrier configuration, either DVB-RCS2 or DVB-S2.
uint32_t GetRandomAccessAverageNormalizedOfferedLoadMeasurementWindowSize() const
Get random access average normalized offered load measurement window size.
SatEnums::RegenerationMode_t m_linkRegenerationMode
double GetRxAciInterferenceWrtNoiseFactor() const
Get adjacent channel interference wrt noise (factor).
InterferenceEliminationModel m_raIfEliminateModel
RandomAccessCollisionModel GetRandomAccessCollisionModel() const
Get random access collision model.
RxMode GetRxMode() const
Get configured RX mode.
double GetRxTemperatureK() const
Get configured RX noise temperature.
Ptr< SatLinkResults > GetLinkResults() const
Get configured link results.
SatTypedefs::CarrierBandwidthConverter_t m_carrierBandwidthConverter
Ptr< SatChannelEstimationErrorContainer > GetChannelEstimatorErrorContainer() const
Get channel estimator container.
InterferenceModel
Interference model enum.
double GetExtPowerDensityWhz() const
Get other system RX noise.
bool IsIntfOutputTraceEnabled() const
Is interference output trace enabled.
InterferenceModel GetInterferenceModel(bool isRandomAccessCarrier) const
Get configured interference model.
InterferenceEliminationModel GetInterferenceEliminationModel(bool isRandomAccessCarrier) const
Get configured interference cancelation model.
virtual void DoDispose()
Dispose function.
Ptr< SatChannelEstimationErrorContainer > m_channelEstimationError
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Struct for storing the information for SatPhyRxCarrierConf.