src/lte/model/fdbet-ff-mac-scheduler.h
author Peter D. Barnes, Jr. <barnes26@llnl.gov>
Fri, 26 Sep 2014 15:51:00 -0700
changeset 10968 2d29fee2b7b8
parent 10892 3e86fac77082
permissions -rw-r--r--
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
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
 *
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    18
 * Author: Marco Miozzo <marco.miozzo@cttc.es>
9149
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>
10892
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
    33
#include <ns3/lte-ffr-sap.h>
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    34
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    35
// value for SINR outside the range defined by FF-API, used to indicate that there
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    36
// is no CQI for this element
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    37
#define NO_SINR -5000
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    38
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    39
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    40
#define HARQ_PROC_NUM 8
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    41
#define HARQ_DL_TIMEOUT 11
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    42
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    43
namespace ns3 {
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
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    46
typedef std::vector < uint8_t > DlHarqProcessesStatus_t;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    47
typedef std::vector < uint8_t > DlHarqProcessesTimer_t;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    48
typedef std::vector < DlDciListElement_s > DlHarqProcessesDciBuffer_t;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    49
typedef std::vector < std::vector <struct RlcPduListElement_s> > RlcPduList_t; // vector of the LCs and layers per UE
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    50
typedef std::vector < RlcPduList_t > DlHarqRlcPduListBuffer_t; // vector of the 8 HARQ processes per UE
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    51
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    52
typedef std::vector < UlDciListElement_s > UlHarqProcessesDciBuffer_t;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    53
typedef std::vector < uint8_t > UlHarqProcessesStatus_t;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    54
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    55
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    56
struct fdbetsFlowPerf_t
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
  Time flowStart;
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    59
  unsigned long totalBytesTransmitted;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    60
  unsigned int lastTtiBytesTrasmitted;
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    61
  double lastAveragedThroughput;
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
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    64
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    65
/**
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    66
 * \ingroup ff-api
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    67
 * \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
    68
 *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    69
 * 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
    70
 */
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
    71
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    72
class FdBetFfMacScheduler : public FfMacScheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    73
{
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    74
public:
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    75
  /**
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    76
   * \brief Constructor
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    77
   *
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    78
   * Creates the MAC Scheduler interface implementation
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
  FdBetFfMacScheduler ();
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
  /**
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    83
   * Destructor
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
  virtual ~FdBetFfMacScheduler ();
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
  // inherited from Object
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    88
  virtual void DoDispose (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    89
  static TypeId GetTypeId (void);
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
  // inherited from FfMacScheduler
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    92
  virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    93
  virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    94
  virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    95
  virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider ();
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
    96
10892
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
    97
  // FFR SAPs
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
    98
  virtual void SetLteFfrSapProvider (LteFfrSapProvider* s);
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
    99
  virtual LteFfrSapUser* GetLteFfrSapUser ();
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
   100
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   101
  friend class FdBetSchedulerMemberCschedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   102
  friend class FdBetSchedulerMemberSchedSapProvider;
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   103
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   104
  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
   105
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   106
private:
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
  // Implementation of the CSCHED API primitives
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   109
  // (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
   110
  //
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 DoCschedCellConfigReq (const struct FfMacCschedSapProvider::CschedCellConfigReqParameters& 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 DoCschedUeConfigReq (const struct FfMacCschedSapProvider::CschedUeConfigReqParameters& 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 DoCschedLcConfigReq (const struct FfMacCschedSapProvider::CschedLcConfigReqParameters& 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
  void DoCschedLcReleaseReq (const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   119
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   120
  void DoCschedUeReleaseReq (const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   121
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
  // Implementation of the SCHED API primitives
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   124
  // (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
   125
  //
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   126
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   127
  void DoSchedDlRlcBufferReq (const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   128
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   129
  void DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   130
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   131
  void DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters& params);
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
  void DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params);
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 DoSchedDlRachInfoReq (const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters& params);
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
  void DoSchedDlCqiInfoReq (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params);
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
  void DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params);
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
  void DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params);
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
  void DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params);
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
  void DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters& params);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   146
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   147
  void DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params);
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
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   150
  int GetRbgSize (int dlbandwidth);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   151
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   152
  int LcActivePerFlow (uint16_t rnti);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   153
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   154
  double EstimateUlSinr (uint16_t rnti, uint16_t rb);
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   155
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   156
  void RefreshDlCqiMaps (void);
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   157
  void RefreshUlCqiMaps (void);
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   158
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   159
  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
   160
  void UpdateUlRlcBufferInfo (uint16_t rnti, uint16_t size);
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   161
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   162
  /**
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   163
  * \brief Update and return a new process Id for the RNTI specified
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   164
  *
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   165
  * \param rnti the RNTI of the UE to be updated
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   166
  * \return the process id  value
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   167
  */
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   168
  uint8_t UpdateHarqProcessId (uint16_t rnti);
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   169
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   170
  /**
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   171
  * \brief Return the availability of free process for the RNTI specified
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   172
  *
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   173
  * \param rnti the RNTI of the UE to be updated
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   174
  * \return the process id  value
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   175
  */
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   176
  uint8_t HarqProcessAvailability (uint16_t rnti);
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   177
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   178
  /**
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   179
  * \brief Refresh HARQ processes according to the timers
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   180
  *
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   181
  */
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   182
  void RefreshHarqProcesses ();
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   183
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   184
  Ptr<LteAmc> m_amc;
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
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   187
   * Vectors of UE's LC info
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
  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
   190
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
  * 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
   194
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   195
  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
   196
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
  * Map of UE statistics (per RNTI basis)
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, fdbetsFlowPerf_t> m_flowStatsUl;
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
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   204
  * 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
   205
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   206
  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
   207
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   208
  * 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
   209
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   210
  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
   211
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
  * 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
   214
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   215
  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
   216
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   217
  * 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
   218
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   219
  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
   220
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   221
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   222
  * Map of previous allocated UE per RBG
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   223
  * (used to retrieve info from UL-CQI)
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   224
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   225
  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
   226
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   227
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   228
  * Map of UEs' UL-CQI per RBG
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   229
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   230
  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
   231
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   232
  * 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
   233
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   234
  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
   235
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   236
  /*
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   237
  * 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
   238
  */
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   239
  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
   240
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   241
  // MAC SAPs
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   242
  FfMacCschedSapUser* m_cschedSapUser;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   243
  FfMacSchedSapUser* m_schedSapUser;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   244
  FfMacCschedSapProvider* m_cschedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   245
  FfMacSchedSapProvider* m_schedSapProvider;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   246
10892
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
   247
  // FFR SAPs
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
   248
  LteFfrSapUser* m_ffrSapUser;
3e86fac77082 GSoC 2014 FFR algorithms
Piotr Gawlowicz <gawlowicz.p@gmail.com>
parents: 10192
diff changeset
   249
  LteFfrSapProvider* m_ffrSapProvider;
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   250
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   251
  // Internal parameters
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   252
  FfMacCschedSapProvider::CschedCellConfigReqParameters m_cschedCellConfig;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   253
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   254
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   255
  double m_timeWindow;
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   256
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   257
  uint16_t m_nextRntiUl; // RNTI of the next user to be served next scheduling in UL
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   258
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   259
  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
   260
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   261
  std::map <uint16_t,uint8_t> m_uesTxMode; // txMode of the UEs
9654
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   262
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   263
  // HARQ attributes
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   264
  /**
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   265
  * m_harqOn when false inhibit te HARQ mechanisms (by default active)
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   266
  */
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   267
  bool m_harqOn;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   268
  std::map <uint16_t, uint8_t> m_dlHarqCurrentProcessId;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   269
  //HARQ status
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   270
  // 0: process Id available
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   271
  // x>0: process Id equal to `x` trasmission count
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   272
  std::map <uint16_t, DlHarqProcessesStatus_t> m_dlHarqProcessesStatus;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   273
  std::map <uint16_t, DlHarqProcessesTimer_t> m_dlHarqProcessesTimer;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   274
  std::map <uint16_t, DlHarqProcessesDciBuffer_t> m_dlHarqProcessesDciBuffer;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   275
  std::map <uint16_t, DlHarqRlcPduListBuffer_t> m_dlHarqProcessesRlcPduListBuffer;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   276
  std::vector <DlInfoListElement_s> m_dlInfoListBuffered; // HARQ retx buffered
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   277
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   278
  std::map <uint16_t, uint8_t> m_ulHarqCurrentProcessId;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   279
  //HARQ status
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   280
  // 0: process Id available
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   281
  // x>0: process Id equal to `x` trasmission count
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   282
  std::map <uint16_t, UlHarqProcessesStatus_t> m_ulHarqProcessesStatus;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   283
  std::map <uint16_t, UlHarqProcessesDciBuffer_t> m_ulHarqProcessesDciBuffer;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   284
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   285
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   286
  // RACH attributes
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   287
  std::vector <struct RachListElement_s> m_rachList;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   288
  std::vector <uint16_t> m_rachAllocationMap;
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   289
  uint8_t m_ulGrantMcs; // MCS for UL grant (default 0)
cd7eb841e50e updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents: 9149
diff changeset
   290
9149
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   291
};
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   292
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   293
} // namespace ns3
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   294
2580b67c83b3 GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff changeset
   295
#endif /* FDBET_FF_MAC_SCHEDULER_H */