26 #include <ns3/fatal-error.h> 
   34 operator << (ostream& os, const vector<int>& v)
 
   36   vector<int>::const_iterator it = v.begin ();
 
   37   while (it != v.end ())
 
   69   { 1, 2110, 0, 0, 599, 1920, 18000, 18000, 18599},
 
   70   { 2, 1930, 600, 600, 1199, 1850, 18600, 18600, 19199},
 
   71   { 3, 1805, 1200, 1200, 1949, 1710, 19200, 19200, 19949},
 
   72   { 4, 2110, 1950, 1950, 2399, 1710, 19950, 19950, 20399},
 
   73   { 5, 869, 2400, 2400, 2649, 824, 20400, 20400, 20649},
 
   74   { 6, 875, 2650, 2650, 2749, 830, 20650, 20650, 20749},
 
   75   { 7, 2620, 2750, 2750, 3449, 2500, 20750, 20750, 21449},
 
   76   { 8, 925, 3450, 3450, 3799, 880, 21450, 21450, 21799},
 
   77   { 9, 1844.9, 3800, 3800, 4149, 1749.9, 21800, 21800, 22149},
 
   78   { 10, 2110, 4150, 4150, 4749, 1710, 22150, 22150, 22749},
 
   79   { 11, 1475.9, 4750, 4750, 4949, 1427.9, 22750, 22750, 22949},
 
   80   { 12, 728, 5000, 5000, 5179, 698, 23000, 23000, 23179},
 
   81   { 13, 746, 5180, 5180, 5279, 777, 23180, 23180, 23279},
 
   82   { 14, 758, 5280, 5280, 5379, 788, 23280, 23280, 23379},
 
   83   { 17, 734, 5730, 5730, 5849, 704, 23730, 23730, 23849},
 
   84   { 18, 860, 5850, 5850, 5999, 815, 23850, 23850, 23999},
 
   85   { 19, 875, 6000, 6000, 6149, 830, 24000, 24000, 24149},
 
   86   { 20, 791, 6150, 6150, 6449, 832, 24150, 24150, 24449},
 
   87   { 21, 1495.9, 6450, 6450, 6599, 1447.9, 24450, 24450, 24599},
 
   88   { 33, 1900, 36000, 36000, 36199, 1900, 36000, 36000, 36199},
 
   89   { 34, 2010, 36200, 36200, 36349, 2010, 36200, 36200, 36349},
 
   90   { 35, 1850, 36350, 36350, 36949, 1850, 36350, 36350, 36949},
 
   91   { 36, 1930, 36950, 36950, 37549, 1930, 36950, 36950, 37549},
 
   92   { 37, 1910, 37550, 37550, 37749, 1910, 37550, 37550, 37749},
 
   93   { 38, 2570, 37750, 37750, 38249, 2570, 37750, 37750, 38249},
 
   94   { 39, 1880, 38250, 38250, 38649, 1880, 38250, 38250, 38649},
 
   95   { 40, 2300, 38650, 38650, 39649, 2300, 38650, 38650, 39649}
 
   98 #define NUM_EUTRA_BANDS (sizeof (g_eutraChannelNumbers) / sizeof (EutraChannelNumbers)) 
  154   switch (transmissionBandwidth)
 
  169       NS_FATAL_ERROR (
"invalid bandwidth value " << (uint16_t) transmissionBandwidth);
 
  205   std::map<LteSpectrumModelId, Ptr<SpectrumModel> >::iterator it = g_lteSpectrumModelMap.find (key);
 
  206   if (it != g_lteSpectrumModelMap.end ())
 
  215       double f = fc - (txBandwidthConfiguration * 180e3 / 2.0);
 
  217       for (uint8_t numrb = 0; numrb < txBandwidthConfiguration; ++numrb)
 
  227       ret = Create<SpectrumModel> (rbs);
 
  237   NS_LOG_FUNCTION (earfcn << (uint16_t) txBandwidthConfiguration << powerTx << activeRbs);
 
  243   double powerTxW = std::pow (10., (powerTx - 30) / 10);
 
  245   double txPowerDensity = (powerTxW / (txBandwidthConfiguration * 180000));
 
  247   for (std::vector <int>::iterator it = activeRbs.begin (); it != activeRbs.end (); it++)
 
  250       (*txPsd)[rbId] = txPowerDensity;
 
  261   NS_LOG_FUNCTION (earfcn << (uint16_t) txBandwidthConfiguration << activeRbs);
 
  267   double powerTxW = std::pow (10., (powerTx - 30) / 10);
 
  268   double basicPowerTxW = std::pow (10., (powerTx - 30) / 10);
 
  270   double txPowerDensity = (powerTxW / (txBandwidthConfiguration * 180000));
 
  272   for (std::vector <int>::iterator it = activeRbs.begin (); it != activeRbs.end (); it++)
 
  276       std::map<int, double>::iterator powerIt = powerTxMap.find (rbId);
 
  278       if (powerIt != powerTxMap.end ())
 
  280           powerTxW = std::pow (10., (powerIt->second - 30) / 10);
 
  281           txPowerDensity = (powerTxW / (txBandwidthConfiguration * 180000));
 
  285           txPowerDensity = (basicPowerTxW / (txBandwidthConfiguration * 180000));
 
  288       (*txPsd)[rbId] = txPowerDensity;
 
  301   NS_LOG_FUNCTION (earfcn << (uint16_t) txBandwidthConfiguration << noiseFigure);
 
  314   const double kT_dBm_Hz = -174.0;  
 
  315   double kT_W_Hz = std::pow (10.0, (kT_dBm_Hz - 30) / 10.0);
 
  316   double noiseFigureLinear = std::pow (10.0, noiseFigureDb / 10.0);
 
  317   double noisePowerSpectralDensity =  kT_W_Hz * noiseFigureLinear;
 
  320   (*noisePsd) = noisePowerSpectralDensity;
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
LteSpectrumModelId(uint16_t f, uint8_t b)
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate. 
 
static Ptr< SpectrumModel > GetSpectrumModel(uint16_t earfcn, uint8_t bandwidth)
 
static const struct ns3::EutraChannelNumbers g_eutraChannelNumbers[]
 
std::vector< BandInfo > Bands
 
static std::map< LteSpectrumModelId, Ptr< SpectrumModel > > g_lteSpectrumModelMap
 
static double GetCarrierFrequency(uint16_t earfcn)
Calculates the carrier frequency from the E-UTRA Absolute Radio Frequency Channel Number (EARFCN) acc...
 
static double GetDownlinkCarrierFrequency(uint16_t earfcn)
Calculates the dowlink carrier frequency from the E-UTRA Absolute Radio Frequency Channel Number (EAR...
 
SpectrumModelUid_t GetUid() const 
 
static double GetUplinkCarrierFrequency(uint16_t earfcn)
Calculates the uplink carrier frequency from the E-UTRA Absolute Radio Frequency Channel Number (EARF...
 
double fc
center frequency 
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
 
bool operator<(const int64x64_t &lhs, const int64x64_t &rhs)
Less than operator. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
double fl
lower limit of subband 
 
static double GetChannelBandwidth(uint8_t txBandwidthConf)
 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
 
static Ptr< SpectrumValue > CreateTxPowerSpectralDensity(uint16_t earfcn, uint8_t bandwidth, double powerTx, std::vector< int > activeRbs)
create a spectrum value representing the power spectral density of a signal to be transmitted...
 
Table 5.7.3-1 "E-UTRA channel numbers" from 3GPP TS 36.101 The table was converted to C syntax doing ...
 
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR. 
 
double fh
upper limit of subband 
 
The building block of a SpectrumModel. 
 
static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint16_t earfcn, uint8_t bandwidth, double noiseFigure)
create a SpectrumValue that models the power spectral density of AWGN