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 namespace ns3
34 {
35 
43 class SatPhyRxCarrierConf : public Object
44 {
45  public:
50  typedef Callback<double> AdditionalInterferenceCallback;
51 
58  enum RxMode
59  {
61  NORMAL
62  };
63 
68  {
71  EM_AVI
72  };
73 
78  {
83  };
84 
89  {
93  };
94 
99  {
104  };
105 
120  typedef struct RxCarrierCreateParams_s
121  {
134  uint32_t m_carrierCount;
135  Ptr<SatChannelEstimationErrorContainer> m_cec;
139 
141  : m_rxTemperatureK(0.0),
142  m_extNoiseDensityWhz(0.0),
143  m_aciIfWrtNoiseFactor(0.0),
150  m_chType(SatEnums::RETURN_USER_CH),
152  m_bwConverter(),
153  m_carrierCount(0),
154  m_cec(NULL),
157  m_randomAccessModel(SatEnums::RA_MODEL_OFF)
158  {
159  // do nothing
160  }
162 
168 
173 
178  {
179  }
180 
185  static TypeId GetTypeId(void);
186 
190  virtual void DoDispose();
191 
195  void SetLinkResults(Ptr<SatLinkResults> linkResults);
196 
201  uint32_t GetCarrierCount() const;
202 
207  ErrorModel GetErrorModel() const;
208 
213  double GetConstantDaErrorRate() const;
214 
220  InterferenceModel GetInterferenceModel(bool isRandomAccessCarrier) const;
221 
227  InterferenceEliminationModel GetInterferenceEliminationModel(bool isRandomAccessCarrier) const;
228 
233  Ptr<SatLinkResults> GetLinkResults() const;
234 
241  double GetCarrierBandwidthHz(uint32_t carrierId,
242  SatEnums::CarrierBandwidthType_t bandwidthType) const;
243 
248  double GetRxTemperatureK() const;
249 
254  double GetExtPowerDensityWhz() const;
255 
260  double GetRxAciInterferenceWrtNoiseFactor() const;
261 
266  RxMode GetRxMode() const;
267 
273 
279 
284  bool IsIntfOutputTraceEnabled() const;
285 
291  {
293  }
294 
300  AdditionalInterferenceCallback additionalInterferenceCallback)
301  {
302  m_additionalInterferenceCallback = additionalInterferenceCallback;
303  }
304 
309  Ptr<SatChannelEstimationErrorContainer> GetChannelEstimatorErrorContainer() const;
310 
316 
322  double GetRandomAccessConstantErrorRate() const;
323 
329 
335 
337  {
338  return m_randomAccessModel;
339  }
340 
341  private:
342  /*
343  * Note, that different carriers may be different bandwidth (symbol rate).
344  * This might be one place to have the frame configuration as well, so that
345  * we can pass the bandwidth information for each carrier. The bandwidth may be needed
346  * for at least noise and C/No calculation.
347  */
356  uint32_t m_carrierCount;
360  Ptr<SatChannelEstimationErrorContainer> m_channelEstimationError;
362  Ptr<SatLinkResults> m_linkResults;
370 };
371 
372 } // namespace ns3
373 
374 #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