1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 /* 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 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: Nicola Baldo <nbaldo@cttc.es> 19 * Marco Miozzo <marco.miozzo@cttc.es> 20 */ 21 22 #ifndef FF_MAC_SCHEDULER_H 23 #define FF_MAC_SCHEDULER_H 24 25 #include <ns3/object.h> 26 27 28 namespace ns3 { 29 30 31 32 class FfMacCschedSapUser; 33 class FfMacSchedSapUser; 34 class FfMacCschedSapProvider; 35 class FfMacSchedSapProvider; 36 class LteFfrSapProvider; 37 class LteFfrSapUser; 38 39 /** 40 * \ingroup lte 41 * \defgroup ff-api FF MAC Schedulers 42 */ 43 44 /** 45 * \ingroup ff-api 46 * 47 * This abstract base class identifies the interface by means of which 48 * the helper object can plug on the MAC a scheduler implementation based on the 49 * FF MAC Sched API. 50 * 51 * 52 */ 53 class FfMacScheduler : public Object 54 { 55 public: 56 /** 57 * The type of UL CQI to be filtered (ALL means accept all the CQI, 58 * where a new CQI of any type overwrite the old one, even of another type) 59 * 60 */ 61 enum UlCqiFilter_t 62 { 63 SRS_UL_CQI, 64 PUSCH_UL_CQI 65 }; 66 /** 67 * constructor 68 * 69 */ 70 FfMacScheduler (); 71 /** 72 * destructor 73 * 74 */ 75 virtual ~FfMacScheduler (); 76 77 // inherited from Object 78 virtual void DoDispose (void); 79 /** 80 * \brief Get the type ID. 81 * \return the object TypeId 82 */ 83 static TypeId GetTypeId (void); 84 85 /** 86 * set the user part of the FfMacCschedSap that this Scheduler will 87 * interact with. Normally this part of the SAP is exported by the MAC. 88 * 89 * \param s 90 */ 91 virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s) = 0; 92 93 /** 94 * 95 * set the user part of the FfMacSchedSap that this Scheduler will 96 * interact with. Normally this part of the SAP is exported by the MAC. 97 * 98 * \param s 99 */ 100 virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s) = 0; 101 102 /** 103 * 104 * \return the Provider part of the FfMacCschedSap provided by the Scheduler 105 */ 106 virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider () = 0; 107 108 /** 109 * 110 * \return the Provider part of the FfMacSchedSap provided by the Scheduler 111 */ 112 virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider () = 0; 113 114 //FFR SAPs 115 /** 116 * 117 * Set the Provider part of the LteFfrSap that this Scheduler will 118 * interact with 119 * 120 * \param s 121 */ 122 virtual void SetLteFfrSapProvider (LteFfrSapProvider* s) = 0; 123 124 /** 125 * 126 * \return the User part of the LteFfrSap provided by the FfrAlgorithm 127 */ 128 virtual LteFfrSapUser* GetLteFfrSapUser () = 0; 129 130 protected: 131 132 UlCqiFilter_t m_ulCqiFilter; ///< UL CQI filter 133 134 }; 135 136 } // namespace ns3 137 138 #endif /* FF_MAC_SCHEDULER_H */ 139