src/lte/model/tdmt-ff-mac-scheduler.h
author Nicola Baldo <nbaldo@cttc.es>
Mon, 04 Feb 2013 18:47:25 +0100
changeset 9653 382d27da8905
parent 9149 2580b67c83b3
child 9654 cd7eb841e50e
permissions -rw-r--r--
merged lena-dev with ns-3-dev
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     2
/*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     3
 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     4
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     8
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    12
 * GNU General Public License for more details.
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    13
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    17
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    18
 * Author:       Marco Miozzo <marco.miozzo@cttc.es>  // original version
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    19
 * Modification: Dizhi Zhou <dizhi.zhou@gmail.com>    // modify codes related to downlink scheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    20
 */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    21
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    22
#ifndef TDMT_FF_MAC_SCHEDULER_H
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    23
#define TDMT_FF_MAC_SCHEDULER_H
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    24
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    25
#include <ns3/lte-common.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    26
#include <ns3/ff-mac-csched-sap.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    27
#include <ns3/ff-mac-sched-sap.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    28
#include <ns3/ff-mac-scheduler.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    29
#include <vector>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    30
#include <map>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    31
#include <set>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    32
#include <ns3/nstime.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    33
#include <ns3/lte-amc.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    34
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    35
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    36
namespace ns3 {
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    37
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    38
/**
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    39
 * \ingroup lte
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    40
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    41
 * \brief Implements the SCHED SAP and CSCHED SAP for a Time Domain Maximum Throughput scheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    42
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    43
 * This class implements the interface defined by the FfMacScheduler abstract class
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    44
 */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    45
class TdMtFfMacScheduler : public FfMacScheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    46
{
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    47
public:
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    48
  /**
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    49
   * \brief Constructor
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    50
   *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    51
   * Creates the MAC Scheduler interface implementation
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    52
   */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    53
  TdMtFfMacScheduler ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    54
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    55
  /**
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    56
   * Destructor
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    57
   */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    58
  virtual ~TdMtFfMacScheduler ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    59
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    60
  // inherited from Object
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    61
  virtual void DoDispose (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    62
  static TypeId GetTypeId (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    63
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    64
  // inherited from FfMacScheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    65
  virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    66
  virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    67
  virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    68
  virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    69
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    70
  friend class TdMtSchedulerMemberCschedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    71
  friend class TdMtSchedulerMemberSchedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    72
  
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    73
  void TransmissionModeConfigurationUpdate (uint16_t rnti, uint8_t txMode);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    74
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    75
private:
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    76
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    77
  // Implementation of the CSCHED API primitives
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    78
  // (See 4.1 for description of the primitives)
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    79
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    80
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    81
  void DoCschedCellConfigReq (const struct FfMacCschedSapProvider::CschedCellConfigReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    82
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    83
  void DoCschedUeConfigReq (const struct FfMacCschedSapProvider::CschedUeConfigReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    84
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    85
  void DoCschedLcConfigReq (const struct FfMacCschedSapProvider::CschedLcConfigReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    86
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    87
  void DoCschedLcReleaseReq (const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    88
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    89
  void DoCschedUeReleaseReq (const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    90
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    91
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    92
  // Implementation of the SCHED API primitives
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    93
  // (See 4.2 for description of the primitives)
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    94
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    95
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    96
  void DoSchedDlRlcBufferReq (const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    97
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    98
  void DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    99
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   100
  void DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   101
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   102
  void DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   103
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   104
  void DoSchedDlRachInfoReq (const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   105
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   106
  void DoSchedDlCqiInfoReq (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   107
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   108
  void DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   109
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   110
  void DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   111
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   112
  void DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   113
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   114
  void DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   115
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   116
  void DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   117
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   118
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   119
  int GetRbgSize (int dlbandwidth);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   120
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   121
  int LcActivePerFlow (uint16_t rnti);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   122
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   123
  double EstimateUlSinr (uint16_t rnti, uint16_t rb);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   124
  
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   125
  void RefreshDlCqiMaps (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   126
  void RefreshUlCqiMaps (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   127
  
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   128
  void UpdateDlRlcBufferInfo (uint16_t rnti, uint8_t lcid, uint16_t size);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   129
  void UpdateUlRlcBufferInfo (uint16_t rnti, uint16_t size);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   130
  Ptr<LteAmc> m_amc;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   131
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   132
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   133
   * Vectors of UE's LC info
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   134
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   135
  std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> m_rlcBufferReq;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   136
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   137
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   138
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   139
  * Set of UE's RNTI in downlink
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   140
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   141
  std::set <uint16_t> m_flowStatsDl;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   142
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   143
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   144
  * Set of UE's RNTI in uplink
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   145
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   146
  std::set <uint16_t> m_flowStatsUl;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   147
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   148
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   149
  * Map of UE's DL CQI P01 received
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   150
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   151
  std::map <uint16_t,uint8_t> m_p10CqiRxed;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   152
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   153
  * Map of UE's timers on DL CQI P01 received
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   154
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   155
  std::map <uint16_t,uint32_t> m_p10CqiTimers;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   156
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   157
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   158
  * Map of UE's DL CQI A30 received
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   159
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   160
  std::map <uint16_t,SbMeasResult_s> m_a30CqiRxed;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   161
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   162
  * Map of UE's timers on DL CQI A30 received
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   163
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   164
  std::map <uint16_t,uint32_t> m_a30CqiTimers;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   165
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   166
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   167
  * Map of previous allocated UE per RBG
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   168
  * (used to retrieve info from UL-CQI)
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   169
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   170
  std::map <uint16_t, std::vector <uint16_t> > m_allocationMaps;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   171
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   172
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   173
  * Map of UEs' UL-CQI per RBG
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   174
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   175
  std::map <uint16_t, std::vector <double> > m_ueCqi;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   176
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   177
  * Map of UEs' timers on UL-CQI per RBG
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   178
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   179
  std::map <uint16_t, uint32_t> m_ueCqiTimers;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   180
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   181
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   182
  * Map of UE's buffer status reports received
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   183
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   184
  std::map <uint16_t,uint32_t> m_ceBsrRxed;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   185
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   186
  // MAC SAPs
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   187
  FfMacCschedSapUser* m_cschedSapUser;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   188
  FfMacSchedSapUser* m_schedSapUser;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   189
  FfMacCschedSapProvider* m_cschedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   190
  FfMacSchedSapProvider* m_schedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   191
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   192
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   193
  // Internal parameters
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   194
  FfMacCschedSapProvider::CschedCellConfigReqParameters m_cschedCellConfig;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   195
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   196
  uint16_t m_nextRntiUl; // RNTI of the next user to be served next scheduling in UL
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   197
  
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   198
  uint32_t m_cqiTimersThreshold; // # of TTIs for which a CQI canbe considered valid
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   199
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   200
  std::map <uint16_t,uint8_t> m_uesTxMode; // txMode of the UEs
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   201
};
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   202
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   203
} // namespace ns3
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   204
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   205
#endif /* TDMT_FF_MAC_SCHEDULER_H */