src/lte/model/fdbet-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 FDBET_FF_MAC_SCHEDULER_H
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    23
#define FDBET_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 <ns3/nstime.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    32
#include <ns3/lte-amc.h>
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    33
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    34
namespace ns3 {
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
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    37
struct fdbetsFlowPerf_t
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
  Time flowStart;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    40
  unsigned long totalBytesTransmitted; 
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    41
  unsigned int lastTtiBytesTransmitted;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    42
  double lastAveragedThroughput;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    43
};
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
/**
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    46
 * \ingroup lte
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    47
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    48
 * \brief Implements the SCHED SAP and CSCHED SAP for a Frequency Domain Blind Equal Throughput scheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    49
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    50
 * 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
    51
 */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    52
class FdBetFfMacScheduler : public FfMacScheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    53
{
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    54
public:
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
   * \brief Constructor
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
   * Creates the MAC Scheduler interface implementation
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
  FdBetFfMacScheduler ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    61
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    62
  /**
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    63
   * Destructor
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    64
   */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    65
  virtual ~FdBetFfMacScheduler ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    66
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    67
  // inherited from Object
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    68
  virtual void DoDispose (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    69
  static TypeId GetTypeId (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    70
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    71
  // inherited from FfMacScheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    72
  virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    73
  virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    74
  virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    75
  virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider ();
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
  friend class FdBetSchedulerMemberCschedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    78
  friend class FdBetSchedulerMemberSchedSapProvider;
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
  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
    81
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    82
private:
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    83
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    84
  // Implementation of the CSCHED API primitives
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    85
  // (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
    86
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    87
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    88
  void DoCschedCellConfigReq (const struct FfMacCschedSapProvider::CschedCellConfigReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    89
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    90
  void DoCschedUeConfigReq (const struct FfMacCschedSapProvider::CschedUeConfigReqParameters& params);
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
  void DoCschedLcConfigReq (const struct FfMacCschedSapProvider::CschedLcConfigReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    93
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    94
  void DoCschedLcReleaseReq (const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters& params);
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 DoCschedUeReleaseReq (const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters& 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
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    99
  // Implementation of the SCHED API primitives
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   100
  // (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
   101
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   102
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   103
  void DoSchedDlRlcBufferReq (const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   104
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   105
  void DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   106
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   107
  void DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   108
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   109
  void DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   110
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   111
  void DoSchedDlRachInfoReq (const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   112
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   113
  void DoSchedDlCqiInfoReq (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   114
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   115
  void DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   116
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   117
  void DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params);
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
  void DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params);
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
  void DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters& params);
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
  void DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params);
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
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   126
  int GetRbgSize (int dlbandwidth);
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
  int LcActivePerFlow (uint16_t rnti);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   129
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   130
  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
   131
  
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   132
  void RefreshDlCqiMaps (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   133
  void RefreshUlCqiMaps (void);
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
  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
   136
  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
   137
  Ptr<LteAmc> m_amc;
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
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   140
   * Vectors of UE's LC info
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   141
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   142
  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
   143
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   144
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
  * Map of UE statistics (per RNTI basis) in downlink
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
  std::map <uint16_t, fdbetsFlowPerf_t> m_flowStatsDl;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   149
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
  * Map of UE statistics (per RNTI basis)
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
  std::map <uint16_t, fdbetsFlowPerf_t> m_flowStatsUl;
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
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
  * 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
   158
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   159
  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
   160
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   161
  * 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
   162
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   163
  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
   164
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
  * 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
   167
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   168
  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
   169
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   170
  * 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
   171
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   172
  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
   173
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
  * Map of previous allocated UE per RBG
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   176
  * (used to retrieve info from UL-CQI)
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   177
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   178
  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
   179
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
  * Map of UEs' UL-CQI per RBG
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   182
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   183
  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
   184
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   185
  * 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
   186
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   187
  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
   188
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   189
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   190
  * 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
   191
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   192
  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
   193
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   194
  // MAC SAPs
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   195
  FfMacCschedSapUser* m_cschedSapUser;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   196
  FfMacSchedSapUser* m_schedSapUser;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   197
  FfMacCschedSapProvider* m_cschedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   198
  FfMacSchedSapProvider* m_schedSapProvider;
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
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   201
  // Internal parameters
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   202
  FfMacCschedSapProvider::CschedCellConfigReqParameters m_cschedCellConfig;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   203
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
  double m_timeWindow;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   206
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   207
  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
   208
  
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   209
  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
   210
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   211
  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
   212
};
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   213
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   214
} // namespace ns3
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   215
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   216
#endif /* FDBET_FF_MAC_SCHEDULER_H */