OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
| 4 * |
| 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 2 as |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Author: Giuseppe Piro <g.piro@poliba.it> |
| 19 */ |
| 20 |
| 21 #ifndef AMCMODULE_H |
| 22 #define AMCMODULE_H |
| 23 |
| 24 #include "ns3/object.h" |
| 25 #include <vector> |
| 26 |
| 27 namespace ns3 { |
| 28 |
| 29 |
| 30 /** |
| 31 * \brief The AMC module attached to the LTE networ device |
| 32 * |
| 33 * AmcModule class implements the Adaptive Modulation And Coding Scheme |
| 34 * as proposed in 3GPP TSG-RAN WG1 - R1-081483 |
| 35 * http://www.3gpp.org/ftp/tsg_ran/WG1_RL1/TSGR1_52b/Docs/R1-081483.zip |
| 36 */ |
| 37 |
| 38 class AmcModule : public Object |
| 39 { |
| 40 |
| 41 public: |
| 42 static TypeId GetTypeId (void); |
| 43 |
| 44 AmcModule (); |
| 45 virtual ~AmcModule (); |
| 46 |
| 47 /** |
| 48 * \brief Initialize CQI, MCS, SpectralEfficiency e TBs values |
| 49 */ |
| 50 void Initialize (); |
| 51 |
| 52 /** |
| 53 * \brief Get a proper CQI for the spectrale efficiency value. |
| 54 * In order to assure a fewer block error rate, the AMC chooses the lower CQI
value |
| 55 * for a given spectral efficiency |
| 56 * \param s the spectral efficiency |
| 57 * \return the CQI value |
| 58 */ |
| 59 int GetCqiFromFromSpectralEfficiency (double s); |
| 60 |
| 61 /** |
| 62 * \brief Get the Modulation anc Coding Scheme for |
| 63 * a CQI value |
| 64 * \param cqi the cqi value |
| 65 * \return the MCS value |
| 66 */ |
| 67 int GetMCSFromCQI (int cqi); |
| 68 |
| 69 /** |
| 70 * \brief Get the Transport Block Size for a selected MCS |
| 71 * \param mcs the mcs index |
| 72 * \return the TBs value |
| 73 */ |
| 74 int GetTBSizeFromMCS (int mcs); |
| 75 |
| 76 /** |
| 77 * \brief Get the spectral efficiency value associated |
| 78 * to the received CQI |
| 79 * \param cqi the cqi value |
| 80 * \return the spectral efficiency value |
| 81 */ |
| 82 double GetSpectralEfficiencyFromCQI (int cqi); |
| 83 |
| 84 |
| 85 std::vector<int> CreateCqiFeedbacks (std::vector<double> sinr); |
| 86 |
| 87 private: |
| 88 }; |
| 89 |
| 90 |
| 91 } |
| 92 |
| 93 #endif /* AMCMODULE_H */ |
OLD | NEW |