satellite-phy-rx-carrier-conf.h
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 
23 #ifndef SATELLITE_PHY_RX_CARRIER_CONF_H_
24 #define SATELLITE_PHY_RX_CARRIER_CONF_H_
25 
27 #include "satellite-channel.h"
28 #include "satellite-link-results.h"
29 #include "satellite-typedefs.h"
30 
31 #include <ns3/object.h>
32 
33 #include <stdint.h>
34 
35 namespace ns3
36 {
37 
45 class SatPhyRxCarrierConf : public Object
46 {
47  public:
52  typedef Callback<double> AdditionalInterferenceCallback;
53 
60  enum RxMode
61  {
63  NORMAL
64  };
65 
70  {
73  EM_AVI
74  };
75 
80  {
85  };
86 
91  {
95  };
96 
101  {
106  };
107 
122  typedef struct RxCarrierCreateParams_s
123  {
136  uint32_t m_carrierCount;
137  Ptr<SatChannelEstimationErrorContainer> m_cec;
141 
143  : m_rxTemperatureK(0.0),
144  m_extNoiseDensityWhz(0.0),
145  m_aciIfWrtNoiseFactor(0.0),
152  m_chType(SatEnums::RETURN_USER_CH),
154  m_bwConverter(),
155  m_carrierCount(0),
156  m_cec(NULL),
159  m_randomAccessModel(SatEnums::RA_MODEL_OFF)
160  {
161  // do nothing
162  }
164 
170 
175 
180  {
181  }
182 
187  static TypeId GetTypeId(void);
188 
192  virtual void DoDispose();
193 
197  void SetLinkResults(Ptr<SatLinkResults> linkResults);
198 
203  uint32_t GetCarrierCount() const;
204 
209  ErrorModel GetErrorModel() const;
210 
215  double GetConstantDaErrorRate() const;
216 
222  InterferenceModel GetInterferenceModel(bool isRandomAccessCarrier) const;
223 
229  InterferenceEliminationModel GetInterferenceEliminationModel(bool isRandomAccessCarrier) const;
230 
235  Ptr<SatLinkResults> GetLinkResults() const;
236 
243  double GetCarrierBandwidthHz(uint32_t carrierId,
244  SatEnums::CarrierBandwidthType_t bandwidthType) const;
245 
250  double GetRxTemperatureK() const;
251 
256  double GetExtPowerDensityWhz() const;
257 
262  double GetRxAciInterferenceWrtNoiseFactor() const;
263 
268  RxMode GetRxMode() const;
269 
275 
281 
286  bool IsIntfOutputTraceEnabled() const;
287 
293  {
295  }
296 
302  AdditionalInterferenceCallback additionalInterferenceCallback)
303  {
304  m_additionalInterferenceCallback = additionalInterferenceCallback;
305  }
306 
311  Ptr<SatChannelEstimationErrorContainer> GetChannelEstimatorErrorContainer() const;
312 
318 
324  double GetRandomAccessConstantErrorRate() const;
325 
331 
337 
339  {
340  return m_randomAccessModel;
341  }
342 
343  private:
344  /*
345  * Note, that different carriers may be different bandwidth (symbol rate).
346  * This might be one place to have the frame configuration as well, so that
347  * we can pass the bandwidth information for each carrier. The bandwidth may be needed
348  * for at least noise and C/No calculation.
349  */
358  uint32_t m_carrierCount;
362  Ptr<SatChannelEstimationErrorContainer> m_channelEstimationError;
364  Ptr<SatLinkResults> m_linkResults;
372 };
373 
374 } // namespace ns3
375 
376 #endif /* SATELLITE_PHY_RX_CARRIER_CONF_H_ */
ChannelType_t
Types of channel.
CarrierBandwidthType_t
Types of bandwidth.
RandomAccessModel_t
The defined random access models.
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.
void SetAdditionalInterferenceCb(AdditionalInterferenceCallback additionalInterferenceCallback)
Set additional interference callback.
InterferenceEliminationModel
Interference cancelation model enum.
virtual ~SatPhyRxCarrierConf()
Destructor for SatPhyRxCarrierConf.
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
Callback< double > AdditionalInterferenceCallback
Callback to get additional interference from PHY layer.
SatEnums::RegenerationMode_t GetLinkRegenerationMode() const
Get link regeneration mode.
SatEnums::RandomAccessModel_t m_randomAccessModel
RandomAccessCollisionModel m_raCollisionModel
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.
SatEnums::RandomAccessModel_t GetRandomAccessModel() const
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.
AdditionalInterferenceCallback GetAdditionalInterferenceCb()
Get additional interference callback.
InterferenceEliminationModel GetInterferenceEliminationModel(bool isRandomAccessCarrier) const
Get configured interference cancelation model.
virtual void DoDispose()
Dispose function.
Ptr< SatChannelEstimationErrorContainer > m_channelEstimationError
Callback< double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t > CarrierBandwidthConverter_t
Callback for carrier bandwidths.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Struct for storing the information for SatPhyRxCarrierConf.
Ptr< SatChannelEstimationErrorContainer > m_cec
SatEnums::RandomAccessModel_t m_randomAccessModel
SatTypedefs::CarrierBandwidthConverter_t m_bwConverter
RandomAccessCollisionModel m_raCollisionModel
SatEnums::RegenerationMode_t m_linkRegenerationMode
InterferenceEliminationModel m_raIfEliminateModel