src/lte/model/packet-scheduler.h
changeset 8749 4462ac63d4cf
parent 8748 87a141a38088
parent 8747 2aec19a85c73
child 8750 b3db7d51f260
child 8765 b89660102b63
equal deleted inserted replaced
8748:87a141a38088 8749:4462ac63d4cf
     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 PACKET_SCHEDULER_H
       
    22 #define PACKET_SCHEDULER_H
       
    23 
       
    24 
       
    25 #include <ns3/nstime.h>
       
    26 #include <ns3/object.h>
       
    27 #include <list>
       
    28 #include <ns3/ptr.h>
       
    29 
       
    30 
       
    31 namespace ns3 {
       
    32 
       
    33 class EnbNetDevice;
       
    34 class UeNetDevice;
       
    35 class MacEntity;
       
    36 
       
    37 /**
       
    38  * \ingroup lte
       
    39  *
       
    40  * This class represents the basic implementation of the LTE packet scheduler
       
    41  */
       
    42 class PacketScheduler : public Object
       
    43 {
       
    44 
       
    45 public:
       
    46   PacketScheduler ();
       
    47 
       
    48   /**
       
    49    * Create a packet scheduler
       
    50    * \param enb the device where the packet scheduler works
       
    51    */
       
    52   PacketScheduler (Ptr<EnbNetDevice> enb);
       
    53   virtual ~PacketScheduler ();
       
    54   virtual void DoDispose (void);
       
    55 
       
    56   static TypeId GetTypeId (void);
       
    57 
       
    58   /**
       
    59    * \brief Set the device where the scheduler works
       
    60    * \param enb the device where the scheduler works
       
    61    */
       
    62   void SetDevice (Ptr<EnbNetDevice> enb);
       
    63   /**
       
    64    * \brief Get the device where the scheduler works
       
    65    * \return the pointer to the device where the scheduler works
       
    66    */
       
    67   Ptr<EnbNetDevice> GetDevice ();
       
    68 
       
    69   /**
       
    70    * \brief Set the MAC entity of the device where the scheduler works
       
    71    * \param mac the mac entity 
       
    72    */
       
    73   void SetMacEntity (Ptr<MacEntity> mac);
       
    74   /**
       
    75    * \brief Get the MAC entity of the device where the scheduler works
       
    76    * \return the pointer to the mac the mac entity 
       
    77    */
       
    78   Ptr<MacEntity> GetMacEntity (void);
       
    79 
       
    80   /**
       
    81    * \brief run the scheduling algorithm
       
    82    */
       
    83   void RunPacketScheduler (void);
       
    84 
       
    85   /**
       
    86    * \brief run a particular scheduling strategy for both uplink and downlink
       
    87    */
       
    88   virtual void DoRunPacketScheduler (void) = 0;
       
    89 
       
    90 
       
    91 private:
       
    92   Ptr<EnbNetDevice> m_enb;
       
    93   Ptr<MacEntity> m_macEntity;
       
    94 };
       
    95 
       
    96 
       
    97 }
       
    98 
       
    99 #endif /* PACKET_SCHEDULER_H */