author | Peter D. Barnes, Jr. <barnes26@llnl.gov> |
Thu, 23 May 2013 17:10:09 -0700 | |
changeset 9809 | 290a3bb2f7c9 |
parent 9808 | b8ae2a7f3b0e |
child 9870 | 6543f3876ff5 |
child 10075 | 8ae11c94f4ba |
permissions | -rw-r--r-- |
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:
9152
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 |
#include <ns3/log.h> |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
23 |
#include <ns3/pointer.h> |
9658
2b77600c9031
use #include <ns3/math.h> in updated GSoC 2012 LTE schedulers
Nicola Baldo <nbaldo@cttc.es>
parents:
9657
diff
changeset
|
24 |
#include <ns3/math.h> |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
25 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
26 |
#include <ns3/simulator.h> |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
27 |
#include <ns3/lte-amc.h> |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
28 |
#include <ns3/fdmt-ff-mac-scheduler.h> |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
29 |
#include <ns3/lte-vendor-specific-parameters.h> |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
30 |
#include <ns3/boolean.h> |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
31 |
#include <set> |
9788
a1c1c87153b5
[Coverity] Division or modulo by zero (DIVIDE_BY_ZERO)
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9658
diff
changeset
|
32 |
#include <cfloat> |
9149
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 |
NS_LOG_COMPONENT_DEFINE ("FdMtFfMacScheduler"); |
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 |
int FdMtType0AllocationRbg[4] = { |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
39 |
10, // RGB size 1 |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
40 |
26, // RGB size 2 |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
41 |
63, // RGB size 3 |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
42 |
110 // RGB size 4 |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
43 |
}; // see table 7.1.6.1-1 of 36.213 |
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 |
NS_OBJECT_ENSURE_REGISTERED (FdMtFfMacScheduler); |
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 |
|
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 |
class FdMtSchedulerMemberCschedSapProvider : public FfMacCschedSapProvider |
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 |
public: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
53 |
FdMtSchedulerMemberCschedSapProvider (FdMtFfMacScheduler* scheduler); |
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 |
// inherited from FfMacCschedSapProvider |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
56 |
virtual void CschedCellConfigReq (const struct CschedCellConfigReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
57 |
virtual void CschedUeConfigReq (const struct CschedUeConfigReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
58 |
virtual void CschedLcConfigReq (const struct CschedLcConfigReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
59 |
virtual void CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
60 |
virtual void CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params); |
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 |
private: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
63 |
FdMtSchedulerMemberCschedSapProvider (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
64 |
FdMtFfMacScheduler* m_scheduler; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
65 |
}; |
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 |
FdMtSchedulerMemberCschedSapProvider::FdMtSchedulerMemberCschedSapProvider () |
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 |
} |
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 |
FdMtSchedulerMemberCschedSapProvider::FdMtSchedulerMemberCschedSapProvider (FdMtFfMacScheduler* scheduler) : m_scheduler (scheduler) |
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 |
} |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
76 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
77 |
FdMtSchedulerMemberCschedSapProvider::CschedCellConfigReq (const struct CschedCellConfigReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
78 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
79 |
m_scheduler->DoCschedCellConfigReq (params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
82 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
83 |
FdMtSchedulerMemberCschedSapProvider::CschedUeConfigReq (const struct 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 |
m_scheduler->DoCschedUeConfigReq (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 |
|
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 |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
90 |
FdMtSchedulerMemberCschedSapProvider::CschedLcConfigReq (const struct CschedLcConfigReqParameters& 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 |
m_scheduler->DoCschedLcConfigReq (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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
95 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
96 |
FdMtSchedulerMemberCschedSapProvider::CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& 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 |
m_scheduler->DoCschedLcReleaseReq (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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
101 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
102 |
FdMtSchedulerMemberCschedSapProvider::CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& 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 |
m_scheduler->DoCschedUeReleaseReq (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 |
|
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 |
|
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 |
class FdMtSchedulerMemberSchedSapProvider : public FfMacSchedSapProvider |
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 |
public: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
113 |
FdMtSchedulerMemberSchedSapProvider (FdMtFfMacScheduler* scheduler); |
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 |
// inherited from FfMacSchedSapProvider |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
116 |
virtual void SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
117 |
virtual void SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
118 |
virtual void SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
119 |
virtual void SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
120 |
virtual void SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
121 |
virtual void SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
122 |
virtual void SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
123 |
virtual void SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
124 |
virtual void SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
125 |
virtual void SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
126 |
virtual void SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
129 |
private: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
130 |
FdMtSchedulerMemberSchedSapProvider (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
131 |
FdMtFfMacScheduler* m_scheduler; |
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 |
|
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
136 |
FdMtSchedulerMemberSchedSapProvider::FdMtSchedulerMemberSchedSapProvider () |
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 |
|
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 |
FdMtSchedulerMemberSchedSapProvider::FdMtSchedulerMemberSchedSapProvider (FdMtFfMacScheduler* scheduler) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
142 |
: m_scheduler (scheduler) |
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 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
147 |
FdMtSchedulerMemberSchedSapProvider::SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& 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 |
m_scheduler->DoSchedDlRlcBufferReq (params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
152 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
153 |
FdMtSchedulerMemberSchedSapProvider::SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params) |
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 |
m_scheduler->DoSchedDlPagingBufferReq (params); |
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 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
159 |
FdMtSchedulerMemberSchedSapProvider::SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params) |
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 |
m_scheduler->DoSchedDlMacBufferReq (params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
164 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
165 |
FdMtSchedulerMemberSchedSapProvider::SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params) |
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 |
m_scheduler->DoSchedDlTriggerReq (params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
168 |
} |
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 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
171 |
FdMtSchedulerMemberSchedSapProvider::SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params) |
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 |
m_scheduler->DoSchedDlRachInfoReq (params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
176 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
177 |
FdMtSchedulerMemberSchedSapProvider::SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params) |
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 |
m_scheduler->DoSchedDlCqiInfoReq (params); |
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 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
183 |
FdMtSchedulerMemberSchedSapProvider::SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params) |
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 |
m_scheduler->DoSchedUlTriggerReq (params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
188 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
189 |
FdMtSchedulerMemberSchedSapProvider::SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params) |
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 |
m_scheduler->DoSchedUlNoiseInterferenceReq (params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
194 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
195 |
FdMtSchedulerMemberSchedSapProvider::SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params) |
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 |
m_scheduler->DoSchedUlSrInfoReq (params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
198 |
} |
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 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
201 |
FdMtSchedulerMemberSchedSapProvider::SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params) |
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 |
m_scheduler->DoSchedUlMacCtrlInfoReq (params); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
206 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
207 |
FdMtSchedulerMemberSchedSapProvider::SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params) |
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 |
m_scheduler->DoSchedUlCqiInfoReq (params); |
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 |
|
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 |
|
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 |
FdMtFfMacScheduler::FdMtFfMacScheduler () |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
217 |
: m_cschedSapUser (0), |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
218 |
m_schedSapUser (0), |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
219 |
m_nextRntiUl (0) |
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 |
m_amc = CreateObject <LteAmc> (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
222 |
m_cschedSapProvider = new FdMtSchedulerMemberCschedSapProvider (this); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
223 |
m_schedSapProvider = new FdMtSchedulerMemberSchedSapProvider (this); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
226 |
FdMtFfMacScheduler::~FdMtFfMacScheduler () |
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 |
NS_LOG_FUNCTION (this); |
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 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
231 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
232 |
FdMtFfMacScheduler::DoDispose () |
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 |
NS_LOG_FUNCTION (this); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
235 |
m_dlHarqProcessesDciBuffer.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
236 |
m_dlHarqProcessesTimer.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
237 |
m_dlHarqProcessesRlcPduListBuffer.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
238 |
m_dlInfoListBuffered.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
239 |
m_ulHarqCurrentProcessId.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
240 |
m_ulHarqProcessesStatus.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
241 |
m_ulHarqProcessesDciBuffer.clear (); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
242 |
delete m_cschedSapProvider; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
243 |
delete m_schedSapProvider; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
244 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
245 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
246 |
TypeId |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
247 |
FdMtFfMacScheduler::GetTypeId (void) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
248 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
249 |
static TypeId tid = TypeId ("ns3::FdMtFfMacScheduler") |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
250 |
.SetParent<FfMacScheduler> () |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
251 |
.AddConstructor<FdMtFfMacScheduler> () |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
252 |
.AddAttribute ("CqiTimerThreshold", |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
253 |
"The number of TTIs a CQI is valid (default 1000 - 1 sec.)", |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
254 |
UintegerValue (1000), |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
255 |
MakeUintegerAccessor (&FdMtFfMacScheduler::m_cqiTimersThreshold), |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
256 |
MakeUintegerChecker<uint32_t> ()) |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
257 |
.AddAttribute ("HarqEnabled", |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
258 |
"Activate/Deactivate the HARQ [by default is active].", |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
259 |
BooleanValue (true), |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
260 |
MakeBooleanAccessor (&FdMtFfMacScheduler::m_harqOn), |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
261 |
MakeBooleanChecker ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
262 |
.AddAttribute ("UlGrantMcs", |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
263 |
"The MCS of the UL grant, must be [0..15] (default 0)", |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
264 |
UintegerValue (0), |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
265 |
MakeUintegerAccessor (&FdMtFfMacScheduler::m_ulGrantMcs), |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
266 |
MakeUintegerChecker<uint8_t> ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
267 |
; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
268 |
return tid; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
269 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
270 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
271 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
272 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
273 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
274 |
FdMtFfMacScheduler::SetFfMacCschedSapUser (FfMacCschedSapUser* s) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
275 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
276 |
m_cschedSapUser = s; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
277 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
278 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
279 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
280 |
FdMtFfMacScheduler::SetFfMacSchedSapUser (FfMacSchedSapUser* s) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
281 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
282 |
m_schedSapUser = s; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
283 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
284 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
285 |
FfMacCschedSapProvider* |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
286 |
FdMtFfMacScheduler::GetFfMacCschedSapProvider () |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
287 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
288 |
return m_cschedSapProvider; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
289 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
290 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
291 |
FfMacSchedSapProvider* |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
292 |
FdMtFfMacScheduler::GetFfMacSchedSapProvider () |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
293 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
294 |
return m_schedSapProvider; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
295 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
296 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
297 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
298 |
FdMtFfMacScheduler::DoCschedCellConfigReq (const struct FfMacCschedSapProvider::CschedCellConfigReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
299 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
300 |
NS_LOG_FUNCTION (this); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
301 |
// Read the subset of parameters used |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
302 |
m_cschedCellConfig = params; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
303 |
m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
304 |
FfMacCschedSapUser::CschedUeConfigCnfParameters cnf; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
305 |
cnf.m_result = SUCCESS; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
306 |
m_cschedSapUser->CschedUeConfigCnf (cnf); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
307 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
308 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
309 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
310 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
311 |
FdMtFfMacScheduler::DoCschedUeConfigReq (const struct FfMacCschedSapProvider::CschedUeConfigReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
312 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
313 |
NS_LOG_FUNCTION (this << " RNTI " << params.m_rnti << " txMode " << (uint16_t)params.m_transmissionMode); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
314 |
std::map <uint16_t,uint8_t>::iterator it = m_uesTxMode.find (params.m_rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
315 |
if (it == m_uesTxMode.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
316 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
317 |
m_uesTxMode.insert (std::pair <uint16_t, double> (params.m_rnti, params.m_transmissionMode)); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
318 |
// generate HARQ buffers |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
319 |
m_dlHarqCurrentProcessId.insert (std::pair <uint16_t,uint8_t > (params.m_rnti, 0)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
320 |
DlHarqProcessesStatus_t dlHarqPrcStatus; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
321 |
dlHarqPrcStatus.resize (8,0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
322 |
m_dlHarqProcessesStatus.insert (std::pair <uint16_t, DlHarqProcessesStatus_t> (params.m_rnti, dlHarqPrcStatus)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
323 |
DlHarqProcessesTimer_t dlHarqProcessesTimer; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
324 |
dlHarqProcessesTimer.resize (8,0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
325 |
m_dlHarqProcessesTimer.insert (std::pair <uint16_t, DlHarqProcessesTimer_t> (params.m_rnti, dlHarqProcessesTimer)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
326 |
DlHarqProcessesDciBuffer_t dlHarqdci; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
327 |
dlHarqdci.resize (8); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
328 |
m_dlHarqProcessesDciBuffer.insert (std::pair <uint16_t, DlHarqProcessesDciBuffer_t> (params.m_rnti, dlHarqdci)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
329 |
DlHarqRlcPduListBuffer_t dlHarqRlcPdu; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
330 |
dlHarqRlcPdu.resize (2); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
331 |
dlHarqRlcPdu.at (0).resize (8); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
332 |
dlHarqRlcPdu.at (1).resize (8); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
333 |
m_dlHarqProcessesRlcPduListBuffer.insert (std::pair <uint16_t, DlHarqRlcPduListBuffer_t> (params.m_rnti, dlHarqRlcPdu)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
334 |
m_ulHarqCurrentProcessId.insert (std::pair <uint16_t,uint8_t > (params.m_rnti, 0)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
335 |
UlHarqProcessesStatus_t ulHarqPrcStatus; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
336 |
ulHarqPrcStatus.resize (8,0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
337 |
m_ulHarqProcessesStatus.insert (std::pair <uint16_t, UlHarqProcessesStatus_t> (params.m_rnti, ulHarqPrcStatus)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
338 |
UlHarqProcessesDciBuffer_t ulHarqdci; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
339 |
ulHarqdci.resize (8); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
340 |
m_ulHarqProcessesDciBuffer.insert (std::pair <uint16_t, UlHarqProcessesDciBuffer_t> (params.m_rnti, ulHarqdci)); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
341 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
342 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
343 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
344 |
(*it).second = params.m_transmissionMode; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
345 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
346 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
347 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
348 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
349 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
350 |
FdMtFfMacScheduler::DoCschedLcConfigReq (const struct FfMacCschedSapProvider::CschedLcConfigReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
351 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
352 |
NS_LOG_FUNCTION (this << " New LC, rnti: " << params.m_rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
353 |
|
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
354 |
std::set <uint16_t>::iterator it; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
355 |
for (uint16_t i = 0; i < params.m_logicalChannelConfigList.size (); i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
356 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
357 |
it = m_flowStatsDl.find (params.m_rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
358 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
359 |
if (it == m_flowStatsDl.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
360 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
361 |
m_flowStatsDl.insert (params.m_rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
362 |
m_flowStatsUl.insert (params.m_rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
363 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
364 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
365 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
366 |
NS_LOG_ERROR ("RNTI already exists"); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
367 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
368 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
369 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
370 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
371 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
372 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
373 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
374 |
FdMtFfMacScheduler::DoCschedLcReleaseReq (const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
375 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
376 |
NS_LOG_FUNCTION (this); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
377 |
for (uint16_t i = 0; i < params.m_logicalChannelIdentity.size (); i++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
378 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
379 |
std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it = m_rlcBufferReq.begin (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
380 |
std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
381 |
while (it!=m_rlcBufferReq.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
382 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
383 |
if (((*it).first.m_rnti == params.m_rnti) && ((*it).first.m_lcId == params.m_logicalChannelIdentity.at (i))) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
384 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
385 |
temp = it; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
386 |
it++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
387 |
m_rlcBufferReq.erase (temp); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
388 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
389 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
390 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
391 |
it++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
392 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
393 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
394 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
395 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
396 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
397 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
398 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
399 |
FdMtFfMacScheduler::DoCschedUeReleaseReq (const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
400 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
401 |
NS_LOG_FUNCTION (this); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
402 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
403 |
m_uesTxMode.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
404 |
m_dlHarqCurrentProcessId.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
405 |
m_dlHarqProcessesStatus.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
406 |
m_dlHarqProcessesTimer.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
407 |
m_dlHarqProcessesDciBuffer.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
408 |
m_dlHarqProcessesRlcPduListBuffer.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
409 |
m_ulHarqCurrentProcessId.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
410 |
m_ulHarqProcessesStatus.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
411 |
m_ulHarqProcessesDciBuffer.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
412 |
m_flowStatsDl.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
413 |
m_flowStatsUl.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
414 |
m_ceBsrRxed.erase (params.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
415 |
std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it = m_rlcBufferReq.begin (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
416 |
std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
417 |
while (it!=m_rlcBufferReq.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
418 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
419 |
if ((*it).first.m_rnti == params.m_rnti) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
420 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
421 |
temp = it; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
422 |
it++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
423 |
m_rlcBufferReq.erase (temp); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
424 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
425 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
426 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
427 |
it++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
428 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
429 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
430 |
if (m_nextRntiUl == params.m_rnti) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
431 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
432 |
m_nextRntiUl = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
433 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
434 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
435 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
436 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
437 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
438 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
439 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
440 |
FdMtFfMacScheduler::DoSchedDlRlcBufferReq (const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
441 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
442 |
NS_LOG_FUNCTION (this << params.m_rnti << (uint32_t) params.m_logicalChannelIdentity); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
443 |
// API generated by RLC for updating RLC parameters on a LC (tx and retx queues) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
444 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
445 |
std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
446 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
447 |
LteFlowId_t flow (params.m_rnti, params.m_logicalChannelIdentity); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
448 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
449 |
it = m_rlcBufferReq.find (flow); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
450 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
451 |
if (it == m_rlcBufferReq.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
452 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
453 |
m_rlcBufferReq.insert (std::pair <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> (flow, params)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
454 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
455 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
456 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
457 |
(*it).second = params; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
458 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
459 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
460 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
461 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
462 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
463 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
464 |
FdMtFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
465 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
466 |
NS_LOG_FUNCTION (this); |
9657
4ba3220bce18
re-applied fix for bug 1532 - unimplemented LTE Scheduler methods
Nicola Baldo <nbaldo@cttc.es>
parents:
9654
diff
changeset
|
467 |
NS_FATAL_ERROR ("method not implemented"); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
468 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
469 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
470 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
471 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
472 |
FdMtFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
473 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
474 |
NS_LOG_FUNCTION (this); |
9657
4ba3220bce18
re-applied fix for bug 1532 - unimplemented LTE Scheduler methods
Nicola Baldo <nbaldo@cttc.es>
parents:
9654
diff
changeset
|
475 |
NS_FATAL_ERROR ("method not implemented"); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
476 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
477 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
478 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
479 |
int |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
480 |
FdMtFfMacScheduler::GetRbgSize (int dlbandwidth) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
481 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
482 |
for (int i = 0; i < 4; i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
483 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
484 |
if (dlbandwidth < FdMtType0AllocationRbg[i]) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
485 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
486 |
return (i + 1); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
487 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
488 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
489 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
490 |
return (-1); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
491 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
492 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
493 |
|
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
494 |
int |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
495 |
FdMtFfMacScheduler::LcActivePerFlow (uint16_t rnti) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
496 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
497 |
std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
498 |
int lcActive = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
499 |
for (it = m_rlcBufferReq.begin (); it != m_rlcBufferReq.end (); it++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
500 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
501 |
if (((*it).first.m_rnti == rnti) && (((*it).second.m_rlcTransmissionQueueSize > 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
502 |
|| ((*it).second.m_rlcRetransmissionQueueSize > 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
503 |
|| ((*it).second.m_rlcStatusPduSize > 0) )) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
504 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
505 |
lcActive++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
506 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
507 |
if ((*it).first.m_rnti > rnti) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
508 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
509 |
break; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
510 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
511 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
512 |
return (lcActive); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
513 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
514 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
515 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
516 |
|
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
517 |
uint8_t |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
518 |
FdMtFfMacScheduler::HarqProcessAvailability (uint16_t rnti) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
519 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
520 |
NS_LOG_FUNCTION (this << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
521 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
522 |
std::map <uint16_t, uint8_t>::iterator it = m_dlHarqCurrentProcessId.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
523 |
if (it == m_dlHarqCurrentProcessId.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
524 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
525 |
NS_FATAL_ERROR ("No Process Id found for this RNTI " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
526 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
527 |
std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat = m_dlHarqProcessesStatus.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
528 |
if (itStat == m_dlHarqProcessesStatus.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
529 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
530 |
NS_FATAL_ERROR ("No Process Id Statusfound for this RNTI " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
531 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
532 |
uint8_t i = (*it).second; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
533 |
do |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
534 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
535 |
i = (i + 1) % HARQ_PROC_NUM; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
536 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
537 |
while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
538 |
if ((*itStat).second.at (i) == 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
539 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
540 |
return (true); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
541 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
542 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
543 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
544 |
return (false); // return a not valid harq proc id |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
545 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
546 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
547 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
548 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
549 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
550 |
uint8_t |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
551 |
FdMtFfMacScheduler::UpdateHarqProcessId (uint16_t rnti) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
552 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
553 |
NS_LOG_FUNCTION (this << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
554 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
555 |
if (m_harqOn == false) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
556 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
557 |
return (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
558 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
559 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
560 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
561 |
std::map <uint16_t, uint8_t>::iterator it = m_dlHarqCurrentProcessId.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
562 |
if (it == m_dlHarqCurrentProcessId.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
563 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
564 |
NS_FATAL_ERROR ("No Process Id found for this RNTI " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
565 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
566 |
std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat = m_dlHarqProcessesStatus.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
567 |
if (itStat == m_dlHarqProcessesStatus.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
568 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
569 |
NS_FATAL_ERROR ("No Process Id Statusfound for this RNTI " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
570 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
571 |
uint8_t i = (*it).second; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
572 |
do |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
573 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
574 |
i = (i + 1) % HARQ_PROC_NUM; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
575 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
576 |
while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
577 |
if ((*itStat).second.at (i) == 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
578 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
579 |
(*it).second = i; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
580 |
(*itStat).second.at (i) = 1; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
581 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
582 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
583 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
584 |
NS_FATAL_ERROR ("No HARQ process available for RNTI " << rnti << " check before update with HarqProcessAvailability"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
585 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
586 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
587 |
return ((*it).second); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
588 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
589 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
590 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
591 |
void |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
592 |
FdMtFfMacScheduler::RefreshHarqProcesses () |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
593 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
594 |
NS_LOG_FUNCTION (this); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
595 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
596 |
std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itTimers; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
597 |
for (itTimers = m_dlHarqProcessesTimer.begin (); itTimers != m_dlHarqProcessesTimer.end (); itTimers ++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
598 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
599 |
for (uint16_t i = 0; i < HARQ_PROC_NUM; i++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
600 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
601 |
if ((*itTimers).second.at (i) == HARQ_DL_TIMEOUT) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
602 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
603 |
// reset HARQ process |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
604 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
605 |
NS_LOG_DEBUG (this << " Reset HARQ proc " << i << " for RNTI " << (*itTimers).first); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
606 |
std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat = m_dlHarqProcessesStatus.find ((*itTimers).first); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
607 |
if (itStat == m_dlHarqProcessesStatus.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
608 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
609 |
NS_FATAL_ERROR ("No Process Id Status found for this RNTI " << (*itTimers).first); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
610 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
611 |
(*itStat).second.at (i) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
612 |
(*itTimers).second.at (i) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
613 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
614 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
615 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
616 |
(*itTimers).second.at (i)++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
617 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
618 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
619 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
620 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
621 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
622 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
623 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
624 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
625 |
FdMtFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
626 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
627 |
NS_LOG_FUNCTION (this << " Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
628 |
// API generated by RLC for triggering the scheduling of a DL subframe |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
629 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
630 |
|
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
631 |
// evaluate the relative channel quality indicator for each UE per each RBG |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
632 |
// (since we are using allocation type 0 the small unit of allocation is RBG) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
633 |
// Resource allocation type 0 (see sec 7.1.6.1 of 36.213) |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
634 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
635 |
RefreshDlCqiMaps (); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
636 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
637 |
int rbgSize = GetRbgSize (m_cschedCellConfig.m_dlBandwidth); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
638 |
int rbgNum = m_cschedCellConfig.m_dlBandwidth / rbgSize; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
639 |
std::map <uint16_t, std::vector <uint16_t> > allocationMap; // RBs map per RNTI |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
640 |
std::vector <bool> rbgMap; // global RBGs map |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
641 |
uint16_t rbgAllocatedNum = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
642 |
std::set <uint16_t> rntiAllocated; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
643 |
rbgMap.resize (m_cschedCellConfig.m_dlBandwidth / rbgSize, false); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
644 |
FfMacSchedSapUser::SchedDlConfigIndParameters ret; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
645 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
646 |
// RACH Allocation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
647 |
m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
648 |
uint16_t rbStart = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
649 |
std::vector <struct RachListElement_s>::iterator itRach; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
650 |
for (itRach = m_rachList.begin (); itRach != m_rachList.end (); itRach++) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
651 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
652 |
NS_ASSERT_MSG (m_amc->GetTbSizeFromMcs (m_ulGrantMcs, m_cschedCellConfig.m_ulBandwidth) > (*itRach).m_estimatedSize, " Default UL Grant MCS does not allow to send RACH messages"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
653 |
BuildRarListElement_s newRar; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
654 |
newRar.m_rnti = (*itRach).m_rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
655 |
// DL-RACH Allocation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
656 |
// Ideal: no needs of configuring m_dci |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
657 |
// UL-RACH Allocation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
658 |
newRar.m_grant.m_rnti = newRar.m_rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
659 |
newRar.m_grant.m_mcs = m_ulGrantMcs; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
660 |
uint16_t rbLen = 1; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
661 |
uint16_t tbSizeBits = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
662 |
// find lowest TB size that fits UL grant estimated size |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
663 |
while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < m_cschedCellConfig.m_ulBandwidth)) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
664 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
665 |
rbLen++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
666 |
tbSizeBits = m_amc->GetTbSizeFromMcs (m_ulGrantMcs, rbLen); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
667 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
668 |
if (tbSizeBits < (*itRach).m_estimatedSize) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
669 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
670 |
// no more allocation space: finish allocation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
671 |
break; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
672 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
673 |
newRar.m_grant.m_rbStart = rbStart; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
674 |
newRar.m_grant.m_rbLen = rbLen; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
675 |
newRar.m_grant.m_tbSize = tbSizeBits / 8; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
676 |
newRar.m_grant.m_hopping = false; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
677 |
newRar.m_grant.m_tpc = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
678 |
newRar.m_grant.m_cqiRequest = false; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
679 |
newRar.m_grant.m_ulDelay = false; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
680 |
NS_LOG_INFO (this << " UL grant allocated to RNTI " << (*itRach).m_rnti << " rbStart " << rbStart << " rbLen " << rbLen << " MCS " << m_ulGrantMcs << " tbSize " << newRar.m_grant.m_tbSize); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
681 |
for (uint16_t i = rbStart; i < rbStart + rbLen; i++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
682 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
683 |
m_rachAllocationMap.at (i) = (*itRach).m_rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
684 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
685 |
rbStart = rbStart + rbLen; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
686 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
687 |
ret.m_buildRarList.push_back (newRar); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
688 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
689 |
m_rachList.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
690 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
691 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
692 |
// Process DL HARQ feedback |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
693 |
RefreshHarqProcesses (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
694 |
// retrieve past HARQ retx buffered |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
695 |
if (m_dlInfoListBuffered.size () > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
696 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
697 |
if (params.m_dlInfoList.size () > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
698 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
699 |
NS_LOG_INFO (this << " Received DL-HARQ feedback"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
700 |
m_dlInfoListBuffered.insert (m_dlInfoListBuffered.end (), params.m_dlInfoList.begin (), params.m_dlInfoList.end ()); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
701 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
702 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
703 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
704 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
705 |
if (params.m_dlInfoList.size () > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
706 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
707 |
m_dlInfoListBuffered = params.m_dlInfoList; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
708 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
709 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
710 |
if (m_harqOn == false) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
711 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
712 |
// Ignore HARQ feedback |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
713 |
m_dlInfoListBuffered.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
714 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
715 |
std::vector <struct DlInfoListElement_s> dlInfoListUntxed; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
716 |
for (uint16_t i = 0; i < m_dlInfoListBuffered.size (); i++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
717 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
718 |
std::set <uint16_t>::iterator itRnti = rntiAllocated.find (m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
719 |
if (itRnti != rntiAllocated.end ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
720 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
721 |
// RNTI already allocated for retx |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
722 |
continue; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
723 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
724 |
uint8_t nLayers = m_dlInfoListBuffered.at (i).m_harqStatus.size (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
725 |
std::vector <bool> retx; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
726 |
NS_LOG_INFO (this << " Processing DLHARQ feedback"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
727 |
if (nLayers == 1) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
728 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
729 |
retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlInfoListElement_s::NACK); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
730 |
retx.push_back (false); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
731 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
732 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
733 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
734 |
retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlInfoListElement_s::NACK); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
735 |
retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (1) == DlInfoListElement_s::NACK); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
736 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
737 |
if (retx.at (0) || retx.at (1)) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
738 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
739 |
// retrieve HARQ process information |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
740 |
uint16_t rnti = m_dlInfoListBuffered.at (i).m_rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
741 |
uint8_t harqId = m_dlInfoListBuffered.at (i).m_harqProcessId; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
742 |
NS_LOG_INFO (this << " HARQ retx RNTI " << rnti << " harqId " << (uint16_t)harqId); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
743 |
std::map <uint16_t, DlHarqProcessesDciBuffer_t>::iterator itHarq = m_dlHarqProcessesDciBuffer.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
744 |
if (itHarq == m_dlHarqProcessesDciBuffer.end ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
745 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
746 |
NS_FATAL_ERROR ("No info find in HARQ buffer for UE " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
747 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
748 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
749 |
DlDciListElement_s dci = (*itHarq).second.at (harqId); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
750 |
int rv = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
751 |
if (dci.m_rv.size () == 1) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
752 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
753 |
rv = dci.m_rv.at (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
754 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
755 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
756 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
757 |
rv = (dci.m_rv.at (0) > dci.m_rv.at (1) ? dci.m_rv.at (0) : dci.m_rv.at (1)); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
758 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
759 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
760 |
if (rv == 3) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
761 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
762 |
// maximum number of retx reached -> drop process |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
763 |
NS_LOG_INFO ("Maximum number of retransmissions reached -> drop process"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
764 |
std::map <uint16_t, DlHarqProcessesStatus_t>::iterator it = m_dlHarqProcessesStatus.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
765 |
if (it == m_dlHarqProcessesStatus.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
766 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
767 |
NS_LOG_ERROR ("No info find in HARQ buffer for UE (might change eNB) " << m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
768 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
769 |
(*it).second.at (harqId) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
770 |
std::map <uint16_t, DlHarqRlcPduListBuffer_t>::iterator itRlcPdu = m_dlHarqProcessesRlcPduListBuffer.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
771 |
if (itRlcPdu == m_dlHarqProcessesRlcPduListBuffer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
772 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
773 |
NS_FATAL_ERROR ("Unable to find RlcPdcList in HARQ buffer for RNTI " << m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
774 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
775 |
for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
776 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
777 |
(*itRlcPdu).second.at (k).at (harqId).clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
778 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
779 |
continue; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
780 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
781 |
// check the feasibility of retransmitting on the same RBGs |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
782 |
// translate the DCI to Spectrum framework |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
783 |
std::vector <int> dciRbg; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
784 |
uint32_t mask = 0x1; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
785 |
NS_LOG_INFO ("Original RBGs " << dci.m_rbBitmap << " rnti " << dci.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
786 |
for (int j = 0; j < 32; j++) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
787 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
788 |
if (((dci.m_rbBitmap & mask) >> j) == 1) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
789 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
790 |
dciRbg.push_back (j); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
791 |
NS_LOG_INFO ("\t" << j); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
792 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
793 |
mask = (mask << 1); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
794 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
795 |
bool free = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
796 |
for (uint8_t j = 0; j < dciRbg.size (); j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
797 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
798 |
if (rbgMap.at (dciRbg.at (j)) == true) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
799 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
800 |
free = false; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
801 |
break; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
802 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
803 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
804 |
if (free) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
805 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
806 |
// use the same RBGs for the retx |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
807 |
// reserve RBGs |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
808 |
for (uint8_t j = 0; j < dciRbg.size (); j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
809 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
810 |
rbgMap.at (dciRbg.at (j)) = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
811 |
NS_LOG_INFO ("RBG " << dciRbg.at (j) << " assigned"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
812 |
rbgAllocatedNum++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
813 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
814 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
815 |
NS_LOG_INFO (this << " Send retx in the same RBGs"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
816 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
817 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
818 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
819 |
// find RBGs for sending HARQ retx |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
820 |
uint8_t j = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
821 |
uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
822 |
uint8_t startRbg = dciRbg.at (dciRbg.size () - 1); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
823 |
std::vector <bool> rbgMapCopy = rbgMap; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
824 |
while ((j < dciRbg.size ())&&(startRbg != rbgId)) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
825 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
826 |
if (rbgMapCopy.at (rbgId) == false) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
827 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
828 |
rbgMapCopy.at (rbgId) = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
829 |
dciRbg.at (j) = rbgId; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
830 |
j++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
831 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
832 |
rbgId++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
833 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
834 |
if (j == dciRbg.size ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
835 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
836 |
// find new RBGs -> update DCI map |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
837 |
uint32_t rbgMask = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
838 |
for (uint16_t k = 0; k < dciRbg.size (); k++) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
839 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
840 |
rbgMask = rbgMask + (0x1 << dciRbg.at (k)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
841 |
rbgAllocatedNum++; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
842 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
843 |
dci.m_rbBitmap = rbgMask; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
844 |
rbgMap = rbgMapCopy; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
845 |
NS_LOG_INFO (this << " Move retx in RBGs " << dciRbg.size ()); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
846 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
847 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
848 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
849 |
// HARQ retx cannot be performed on this TTI -> store it |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
850 |
dlInfoListUntxed.push_back (params.m_dlInfoList.at (i)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
851 |
NS_LOG_INFO (this << " No resource for this retx -> buffer it"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
852 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
853 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
854 |
// retrieve RLC PDU list for retx TBsize and update DCI |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
855 |
BuildDataListElement_s newEl; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
856 |
std::map <uint16_t, DlHarqRlcPduListBuffer_t>::iterator itRlcPdu = m_dlHarqProcessesRlcPduListBuffer.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
857 |
if (itRlcPdu == m_dlHarqProcessesRlcPduListBuffer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
858 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
859 |
NS_FATAL_ERROR ("Unable to find RlcPdcList in HARQ buffer for RNTI " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
860 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
861 |
for (uint8_t j = 0; j < nLayers; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
862 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
863 |
if (retx.at (j)) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
864 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
865 |
if (j >= dci.m_ndi.size ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
866 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
867 |
// for avoiding errors in MIMO transient phases |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
868 |
dci.m_ndi.push_back (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
869 |
dci.m_rv.push_back (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
870 |
dci.m_mcs.push_back (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
871 |
dci.m_tbsSize.push_back (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
872 |
NS_LOG_INFO (this << " layer " << (uint16_t)j << " no txed (MIMO transition)"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
873 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
874 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
875 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
876 |
dci.m_ndi.at (j) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
877 |
dci.m_rv.at (j)++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
878 |
(*itHarq).second.at (harqId).m_rv.at (j)++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
879 |
NS_LOG_INFO (this << " layer " << (uint16_t)j << " RV " << (uint16_t)dci.m_rv.at (j)); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
880 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
881 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
882 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
883 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
884 |
// empty TB of layer j |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
885 |
dci.m_ndi.at (j) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
886 |
dci.m_rv.at (j) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
887 |
dci.m_mcs.at (j) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
888 |
dci.m_tbsSize.at (j) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
889 |
NS_LOG_INFO (this << " layer " << (uint16_t)j << " no retx"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
890 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
891 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
892 |
for (uint16_t k = 0; k < (*itRlcPdu).second.at (0).at (dci.m_harqProcess).size (); k++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
893 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
894 |
std::vector <struct RlcPduListElement_s> rlcPduListPerLc; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
895 |
for (uint8_t j = 0; j < nLayers; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
896 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
897 |
if (retx.at (j)) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
898 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
899 |
if (j < dci.m_ndi.size ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
900 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
901 |
rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.m_harqProcess).at (k)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
902 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
903 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
904 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
905 |
|
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
906 |
if (rlcPduListPerLc.size () > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
907 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
908 |
newEl.m_rlcPduList.push_back (rlcPduListPerLc); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
909 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
910 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
911 |
newEl.m_rnti = rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
912 |
newEl.m_dci = dci; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
913 |
(*itHarq).second.at (harqId).m_rv = dci.m_rv; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
914 |
// refresh timer |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
915 |
std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itHarqTimer = m_dlHarqProcessesTimer.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
916 |
if (itHarqTimer== m_dlHarqProcessesTimer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
917 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
918 |
NS_FATAL_ERROR ("Unable to find HARQ timer for RNTI " << (uint16_t)rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
919 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
920 |
(*itHarqTimer).second.at (harqId) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
921 |
ret.m_buildDataList.push_back (newEl); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
922 |
rntiAllocated.insert (rnti); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
923 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
924 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
925 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
926 |
// update HARQ process status |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
927 |
NS_LOG_INFO (this << " HARQ received ACK for UE " << m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
928 |
std::map <uint16_t, DlHarqProcessesStatus_t>::iterator it = m_dlHarqProcessesStatus.find (m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
929 |
if (it == m_dlHarqProcessesStatus.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
930 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
931 |
NS_FATAL_ERROR ("No info find in HARQ buffer for UE " << m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
932 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
933 |
(*it).second.at (m_dlInfoListBuffered.at (i).m_harqProcessId) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
934 |
std::map <uint16_t, DlHarqRlcPduListBuffer_t>::iterator itRlcPdu = m_dlHarqProcessesRlcPduListBuffer.find (m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
935 |
if (itRlcPdu == m_dlHarqProcessesRlcPduListBuffer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
936 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
937 |
NS_FATAL_ERROR ("Unable to find RlcPdcList in HARQ buffer for RNTI " << m_dlInfoListBuffered.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
938 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
939 |
for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
940 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
941 |
(*itRlcPdu).second.at (k).at (m_dlInfoListBuffered.at (i).m_harqProcessId).clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
942 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
943 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
944 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
945 |
m_dlInfoListBuffered.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
946 |
m_dlInfoListBuffered = dlInfoListUntxed; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
947 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
948 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
949 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
950 |
for (int i = 0; i < rbgNum; i++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
951 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
952 |
NS_LOG_INFO (this << " ALLOCATION for RBG " << i << " of " << rbgNum); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
953 |
if (rbgMap.at (i) == false) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
954 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
955 |
std::set <uint16_t>::iterator it; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
956 |
std::set <uint16_t>::iterator itMax = m_flowStatsDl.end (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
957 |
double rcqiMax = 0.0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
958 |
for (it = m_flowStatsDl.begin (); it != m_flowStatsDl.end (); it++) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
959 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
960 |
std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
961 |
if ((itRnti != rntiAllocated.end ())||(!HarqProcessAvailability ((*it)))) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
962 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
963 |
// UE already allocated for HARQ or without HARQ process available -> drop it |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
964 |
if (itRnti != rntiAllocated.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
965 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
966 |
NS_LOG_DEBUG (this << " RNTI discared for HARQ tx" << (uint16_t)(*it)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
967 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
968 |
if (!HarqProcessAvailability ((*it))) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
969 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
970 |
NS_LOG_DEBUG (this << " RNTI discared for HARQ id" << (uint16_t)(*it)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
971 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
972 |
continue; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
973 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
974 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
975 |
std::map <uint16_t,SbMeasResult_s>::iterator itCqi; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
976 |
itCqi = m_a30CqiRxed.find ((*it)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
977 |
std::map <uint16_t,uint8_t>::iterator itTxMode; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
978 |
itTxMode = m_uesTxMode.find ((*it)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
979 |
if (itTxMode == m_uesTxMode.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
980 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
981 |
NS_FATAL_ERROR ("No Transmission Mode info on user " << (*it)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
982 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
983 |
int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).second); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
984 |
std::vector <uint8_t> sbCqi; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
985 |
if (itCqi == m_a30CqiRxed.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
986 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
987 |
for (uint8_t k = 0; k < nLayer; k++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
988 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
989 |
sbCqi.push_back (1); // start with lowest value |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
990 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
991 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
992 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
993 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
994 |
sbCqi = (*itCqi).second.m_higherLayerSelected.at (i).m_sbCqi; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
995 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
996 |
uint8_t cqi1 = sbCqi.at (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
997 |
uint8_t cqi2 = 1; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
998 |
if (sbCqi.size () > 1) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
999 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1000 |
cqi2 = sbCqi.at (1); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1001 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1002 |
if ((cqi1 > 0)||(cqi2 > 0)) // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1003 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1004 |
if (LcActivePerFlow ((*it)) > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1005 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1006 |
// this UE has data to transmit |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1007 |
double achievableRate = 0.0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1008 |
uint8_t mcs = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1009 |
for (uint8_t k = 0; k < nLayer; k++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1010 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1011 |
if (sbCqi.size () > k) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1012 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1013 |
mcs = m_amc->GetMcsFromCqi (sbCqi.at (k)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1014 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1015 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1016 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1017 |
// no info on this subband -> worst MCS |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1018 |
mcs = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1019 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1020 |
achievableRate += ((m_amc->GetTbSizeFromMcs (mcs, rbgSize) / 8) / 0.001); // = TB size / TTI |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1021 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1022 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1023 |
double rcqi = achievableRate; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1024 |
NS_LOG_INFO (this << " RNTI " << (*it) << " MCS " << (uint32_t)mcs << " achievableRate " << achievableRate << " RCQI " << rcqi); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1025 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1026 |
if (rcqi > rcqiMax) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1027 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1028 |
rcqiMax = rcqi; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1029 |
itMax = it; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1030 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1031 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1032 |
} // end if cqi |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1033 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1034 |
} // end for m_rlcBufferReq |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1035 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1036 |
if (itMax == m_flowStatsDl.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1037 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1038 |
// no UE available for this RB |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1039 |
NS_LOG_INFO (this << " any UE found"); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1040 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1041 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1042 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1043 |
rbgMap.at (i) = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1044 |
std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1045 |
itMap = allocationMap.find ((*itMax)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1046 |
if (itMap == allocationMap.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1047 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1048 |
// insert new element |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1049 |
std::vector <uint16_t> tempMap; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1050 |
tempMap.push_back (i); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1051 |
allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax), tempMap)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1052 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1053 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1054 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1055 |
(*itMap).second.push_back (i); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1056 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1057 |
NS_LOG_INFO (this << " UE assigned " << (*itMax)); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1058 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1059 |
} // end for RBG free |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1060 |
} // end for RBGs |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1061 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1062 |
// generate the transmission opportunities by grouping the RBGs of the same RNTI and |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1063 |
// creating the correspondent DCIs |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1064 |
std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1065 |
while (itMap != allocationMap.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1066 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1067 |
// create new BuildDataListElement_s for this LC |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1068 |
BuildDataListElement_s newEl; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1069 |
newEl.m_rnti = (*itMap).first; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1070 |
// create the DlDciListElement_s |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1071 |
DlDciListElement_s newDci; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1072 |
newDci.m_rnti = (*itMap).first; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1073 |
newDci.m_harqProcess = UpdateHarqProcessId ((*itMap).first); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1074 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1075 |
uint16_t lcActives = LcActivePerFlow ((*itMap).first); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1076 |
NS_LOG_INFO (this << "Allocate user " << newEl.m_rnti << " rbg " << lcActives); |
9788
a1c1c87153b5
[Coverity] Division or modulo by zero (DIVIDE_BY_ZERO)
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9658
diff
changeset
|
1077 |
if (lcActives == 0) |
a1c1c87153b5
[Coverity] Division or modulo by zero (DIVIDE_BY_ZERO)
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9658
diff
changeset
|
1078 |
{ |
a1c1c87153b5
[Coverity] Division or modulo by zero (DIVIDE_BY_ZERO)
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9658
diff
changeset
|
1079 |
// Set to max value, to avoid divide by 0 below |
9809
290a3bb2f7c9
Use the *right* explicit value, cast to the right size, instead of C++11 constant.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9808
diff
changeset
|
1080 |
lcActives = (uint16_t)65535; // UINT16_MAX; |
9788
a1c1c87153b5
[Coverity] Division or modulo by zero (DIVIDE_BY_ZERO)
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9658
diff
changeset
|
1081 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1082 |
uint16_t RgbPerRnti = (*itMap).second.size (); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1083 |
std::map <uint16_t,SbMeasResult_s>::iterator itCqi; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1084 |
itCqi = m_a30CqiRxed.find ((*itMap).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1085 |
std::map <uint16_t,uint8_t>::iterator itTxMode; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1086 |
itTxMode = m_uesTxMode.find ((*itMap).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1087 |
if (itTxMode == m_uesTxMode.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1088 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1089 |
NS_FATAL_ERROR ("No Transmission Mode info on user " << (*itMap).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1090 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1091 |
int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).second); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1092 |
std::vector <uint8_t> worstCqi (2, 15); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1093 |
if (itCqi != m_a30CqiRxed.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1094 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1095 |
for (uint16_t k = 0; k < (*itMap).second.size (); k++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1096 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1097 |
if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k)) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1098 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1099 |
NS_LOG_INFO (this << " RBG " << (*itMap).second.at (k) << " CQI " << (uint16_t)((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (0)) ); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1100 |
for (uint8_t j = 0; j < nLayer; j++) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1101 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1102 |
if ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.size () > j) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1103 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1104 |
if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)) < worstCqi.at (j)) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1105 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1106 |
worstCqi.at (j) = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1107 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1108 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1109 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1110 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1111 |
// no CQI for this layer of this suband -> worst one |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1112 |
worstCqi.at (j) = 1; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1113 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1114 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1115 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1116 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1117 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1118 |
for (uint8_t j = 0; j < nLayer; j++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1119 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1120 |
worstCqi.at (j) = 1; // try with lowest MCS in RBG with no info on channel |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1121 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1122 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1123 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1124 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1125 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1126 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1127 |
for (uint8_t j = 0; j < nLayer; j++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1128 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1129 |
worstCqi.at (j) = 1; // try with lowest MCS in RBG with no info on channel |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1130 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1131 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1132 |
for (uint8_t j = 0; j < nLayer; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1133 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1134 |
NS_LOG_INFO (this << " Layer " << (uint16_t)j << " CQI selected " << (uint16_t)worstCqi.at (j)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1135 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1136 |
uint32_t bytesTxed = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1137 |
for (uint8_t j = 0; j < nLayer; j++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1138 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1139 |
newDci.m_mcs.push_back (m_amc->GetMcsFromCqi (worstCqi.at (j))); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1140 |
int tbSize = (m_amc->GetTbSizeFromMcs (newDci.m_mcs.at (j), RgbPerRnti * rbgSize) / 8); // (size of TB in bytes according to table 7.1.7.2.1-1 of 36.213) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1141 |
newDci.m_tbsSize.push_back (tbSize); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1142 |
NS_LOG_INFO (this << " Layer " << (uint16_t)j << " MCS selected" << m_amc->GetMcsFromCqi (worstCqi.at (j))); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1143 |
bytesTxed += tbSize; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1144 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1145 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1146 |
newDci.m_resAlloc = 0; // only allocation type 0 at this stage |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1147 |
newDci.m_rbBitmap = 0; // TBD (32 bit bitmap see 7.1.6 of 36.213) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1148 |
uint32_t rbgMask = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1149 |
for (uint16_t k = 0; k < (*itMap).second.size (); k++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1150 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1151 |
rbgMask = rbgMask + (0x1 << (*itMap).second.at (k)); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1152 |
NS_LOG_INFO (this << " Allocated RBG " << (*itMap).second.at (k)); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1153 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1154 |
newDci.m_rbBitmap = rbgMask; // (32 bit bitmap see 7.1.6 of 36.213) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1155 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1156 |
// create the rlc PDUs -> equally divide resources among actives LCs |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1157 |
std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1158 |
for (itBufReq = m_rlcBufferReq.begin (); itBufReq != m_rlcBufferReq.end (); itBufReq++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1159 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1160 |
if (((*itBufReq).first.m_rnti == (*itMap).first) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1161 |
&& (((*itBufReq).second.m_rlcTransmissionQueueSize > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1162 |
|| ((*itBufReq).second.m_rlcRetransmissionQueueSize > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1163 |
|| ((*itBufReq).second.m_rlcStatusPduSize > 0) )) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1164 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1165 |
std::vector <struct RlcPduListElement_s> newRlcPduLe; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1166 |
for (uint8_t j = 0; j < nLayer; j++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1167 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1168 |
RlcPduListElement_s newRlcEl; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1169 |
newRlcEl.m_logicalChannelIdentity = (*itBufReq).first.m_lcId; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1170 |
newRlcEl.m_size = newDci.m_tbsSize.at (j) / lcActives; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1171 |
NS_LOG_INFO (this << " LCID " << (uint32_t) newRlcEl.m_logicalChannelIdentity << " size " << newRlcEl.m_size << " layer " << (uint16_t)j); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1172 |
newRlcPduLe.push_back (newRlcEl); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1173 |
UpdateDlRlcBufferInfo (newDci.m_rnti, newRlcEl.m_logicalChannelIdentity, newRlcEl.m_size); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1174 |
if (m_harqOn == true) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1175 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1176 |
// store RLC PDU list for HARQ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1177 |
std::map <uint16_t, DlHarqRlcPduListBuffer_t>::iterator itRlcPdu = m_dlHarqProcessesRlcPduListBuffer.find ((*itMap).first); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1178 |
if (itRlcPdu == m_dlHarqProcessesRlcPduListBuffer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1179 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1180 |
NS_FATAL_ERROR ("Unable to find RlcPdcList in HARQ buffer for RNTI " << (*itMap).first); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1181 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1182 |
(*itRlcPdu).second.at (j).at (newDci.m_harqProcess).push_back (newRlcEl); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1183 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1184 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1185 |
newEl.m_rlcPduList.push_back (newRlcPduLe); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1186 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1187 |
if ((*itBufReq).first.m_rnti > (*itMap).first) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1188 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1189 |
break; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1190 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1191 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1192 |
for (uint8_t j = 0; j < nLayer; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1193 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1194 |
newDci.m_ndi.push_back (1); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1195 |
newDci.m_rv.push_back (0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1196 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1197 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1198 |
newEl.m_dci = newDci; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1199 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1200 |
if (m_harqOn == true) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1201 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1202 |
// store DCI for HARQ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1203 |
std::map <uint16_t, DlHarqProcessesDciBuffer_t>::iterator itDci = m_dlHarqProcessesDciBuffer.find (newEl.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1204 |
if (itDci == m_dlHarqProcessesDciBuffer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1205 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1206 |
NS_FATAL_ERROR ("Unable to find RNTI entry in DCI HARQ buffer for RNTI " << newEl.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1207 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1208 |
(*itDci).second.at (newDci.m_harqProcess) = newDci; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1209 |
// refresh timer |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1210 |
std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itHarqTimer = m_dlHarqProcessesTimer.find (newEl.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1211 |
if (itHarqTimer== m_dlHarqProcessesTimer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1212 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1213 |
NS_FATAL_ERROR ("Unable to find HARQ timer for RNTI " << (uint16_t)newEl.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1214 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1215 |
(*itHarqTimer).second.at (newDci.m_harqProcess) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1216 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1217 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1218 |
// ...more parameters -> ingored in this version |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1219 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1220 |
ret.m_buildDataList.push_back (newEl); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1221 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1222 |
itMap++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1223 |
} // end while allocation |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1224 |
ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1225 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1226 |
m_schedSapUser->SchedDlConfigInd (ret); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1227 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1228 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1229 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1230 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1231 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1232 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1233 |
FdMtFfMacScheduler::DoSchedDlRachInfoReq (const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1234 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1235 |
NS_LOG_FUNCTION (this); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1236 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1237 |
m_rachList = params.m_rachList; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1238 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1239 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1240 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1241 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1242 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1243 |
FdMtFfMacScheduler::DoSchedDlCqiInfoReq (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1244 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1245 |
NS_LOG_FUNCTION (this); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1246 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1247 |
for (unsigned int i = 0; i < params.m_cqiList.size (); i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1248 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1249 |
if ( params.m_cqiList.at (i).m_cqiType == CqiListElement_s::P10 ) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1250 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1251 |
// wideband CQI reporting |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1252 |
std::map <uint16_t,uint8_t>::iterator it; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1253 |
uint16_t rnti = params.m_cqiList.at (i).m_rnti; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1254 |
it = m_p10CqiRxed.find (rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1255 |
if (it == m_p10CqiRxed.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1256 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1257 |
// create the new entry |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1258 |
m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.m_cqiList.at (i).m_wbCqi.at (0)) ); // only codeword 0 at this stage (SISO) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1259 |
// generate correspondent timer |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1260 |
m_p10CqiTimers.insert ( std::pair<uint16_t, uint32_t > (rnti, m_cqiTimersThreshold)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1261 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1262 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1263 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1264 |
// update the CQI value and refresh correspondent timer |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1265 |
(*it).second = params.m_cqiList.at (i).m_wbCqi.at (0); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1266 |
// update correspondent timer |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1267 |
std::map <uint16_t,uint32_t>::iterator itTimers; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1268 |
itTimers = m_p10CqiTimers.find (rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1269 |
(*itTimers).second = m_cqiTimersThreshold; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1270 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1271 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1272 |
else if ( params.m_cqiList.at (i).m_cqiType == CqiListElement_s::A30 ) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1273 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1274 |
// subband CQI reporting high layer configured |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1275 |
std::map <uint16_t,SbMeasResult_s>::iterator it; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1276 |
uint16_t rnti = params.m_cqiList.at (i).m_rnti; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1277 |
it = m_a30CqiRxed.find (rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1278 |
if (it == m_a30CqiRxed.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1279 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1280 |
// create the new entry |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1281 |
m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.m_cqiList.at (i).m_sbMeasResult) ); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1282 |
m_a30CqiTimers.insert ( std::pair<uint16_t, uint32_t > (rnti, m_cqiTimersThreshold)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1283 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1284 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1285 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1286 |
// update the CQI value and refresh correspondent timer |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1287 |
(*it).second = params.m_cqiList.at (i).m_sbMeasResult; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1288 |
std::map <uint16_t,uint32_t>::iterator itTimers; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1289 |
itTimers = m_a30CqiTimers.find (rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1290 |
(*itTimers).second = m_cqiTimersThreshold; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1291 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1292 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1293 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1294 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1295 |
NS_LOG_ERROR (this << " CQI type unknown"); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1296 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1297 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1298 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1299 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1300 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1301 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1302 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1303 |
double |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1304 |
FdMtFfMacScheduler::EstimateUlSinr (uint16_t rnti, uint16_t rb) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1305 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1306 |
std::map <uint16_t, std::vector <double> >::iterator itCqi = m_ueCqi.find (rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1307 |
if (itCqi == m_ueCqi.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1308 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1309 |
// no cqi info about this UE |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1310 |
return (NO_SINR); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1311 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1312 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1313 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1314 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1315 |
// take the average SINR value among the available |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1316 |
double sinrSum = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1317 |
int sinrNum = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1318 |
for (uint32_t i = 0; i < m_cschedCellConfig.m_ulBandwidth; i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1319 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1320 |
double sinr = (*itCqi).second.at (i); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1321 |
if (sinr != NO_SINR) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1322 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1323 |
sinrSum += sinr; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1324 |
sinrNum++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1325 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1326 |
} |
9788
a1c1c87153b5
[Coverity] Division or modulo by zero (DIVIDE_BY_ZERO)
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9658
diff
changeset
|
1327 |
double estimatedSinr = (sinrNum > 0) ? (sinrSum / sinrNum) : DBL_MAX; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1328 |
// store the value |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1329 |
(*itCqi).second.at (rb) = estimatedSinr; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1330 |
return (estimatedSinr); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1331 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1332 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1333 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1334 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1335 |
FdMtFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1336 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1337 |
NS_LOG_FUNCTION (this << " UL - Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf) << " size " << params.m_ulInfoList.size ()); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1338 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1339 |
RefreshUlCqiMaps (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1340 |
|
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1341 |
// Generate RBs map |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1342 |
FfMacSchedSapUser::SchedUlConfigIndParameters ret; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1343 |
std::vector <bool> rbMap; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1344 |
uint16_t rbAllocatedNum = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1345 |
std::set <uint16_t> rntiAllocated; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1346 |
std::vector <uint16_t> rbgAllocationMap; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1347 |
// update with RACH allocation map |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1348 |
rbgAllocationMap = m_rachAllocationMap; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1349 |
//rbgAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1350 |
m_rachAllocationMap.clear (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1351 |
m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1352 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1353 |
rbMap.resize (m_cschedCellConfig.m_ulBandwidth, false); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1354 |
// remove RACH allocation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1355 |
for (uint16_t i = 0; i < m_cschedCellConfig.m_ulBandwidth; i++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1356 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1357 |
if (rbgAllocationMap.at (i) != 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1358 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1359 |
rbMap.at (i) = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1360 |
NS_LOG_DEBUG (this << " Allocated for RACH " << i); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1361 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1362 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1363 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1364 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1365 |
if (m_harqOn == true) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1366 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1367 |
// Process UL HARQ feedback |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1368 |
// update UL HARQ proc id |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1369 |
std::map <uint16_t, uint8_t>::iterator itProcId; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1370 |
for (itProcId = m_ulHarqCurrentProcessId.begin (); itProcId != m_ulHarqCurrentProcessId.end (); itProcId++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1371 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1372 |
(*itProcId).second = ((*itProcId).second + 1) % HARQ_PROC_NUM; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1373 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1374 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1375 |
for (uint16_t i = 0; i < params.m_ulInfoList.size (); i++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1376 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1377 |
if (params.m_ulInfoList.at (i).m_receptionStatus == UlInfoListElement_s::NotOk) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1378 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1379 |
// retx correspondent block: retrieve the UL-DCI |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1380 |
uint16_t rnti = params.m_ulInfoList.at (i).m_rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1381 |
itProcId = m_ulHarqCurrentProcessId.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1382 |
if (itProcId == m_ulHarqCurrentProcessId.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1383 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1384 |
NS_LOG_ERROR ("No info find in HARQ buffer for UE (might change eNB) " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1385 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1386 |
uint8_t harqId = (uint8_t)((*itProcId).second - HARQ_PERIOD) % HARQ_PROC_NUM; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1387 |
NS_LOG_INFO (this << " UL-HARQ retx RNTI " << rnti << " harqId " << (uint16_t)harqId << " i " << i << " size " << params.m_ulInfoList.size ()); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1388 |
std::map <uint16_t, UlHarqProcessesDciBuffer_t>::iterator itHarq = m_ulHarqProcessesDciBuffer.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1389 |
if (itHarq == m_ulHarqProcessesDciBuffer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1390 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1391 |
NS_LOG_ERROR ("No info find in HARQ buffer for UE (might change eNB) " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1392 |
continue; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1393 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1394 |
UlDciListElement_s dci = (*itHarq).second.at (harqId); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1395 |
std::map <uint16_t, UlHarqProcessesStatus_t>::iterator itStat = m_ulHarqProcessesStatus.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1396 |
if (itStat == m_ulHarqProcessesStatus.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1397 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1398 |
NS_LOG_ERROR ("No info find in HARQ buffer for UE (might change eNB) " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1399 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1400 |
if ((*itStat).second.at (harqId) >= 3) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1401 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1402 |
NS_LOG_INFO ("Max number of retransmissions reached (UL)-> drop process"); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1403 |
continue; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1404 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1405 |
bool free = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1406 |
for (int j = dci.m_rbStart; j < dci.m_rbStart + dci.m_rbLen; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1407 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1408 |
if (rbMap.at (j) == true) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1409 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1410 |
free = false; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1411 |
NS_LOG_INFO (this << " BUSY " << j); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1412 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1413 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1414 |
if (free) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1415 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1416 |
// retx on the same RBs |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1417 |
for (int j = dci.m_rbStart; j < dci.m_rbStart + dci.m_rbLen; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1418 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1419 |
rbMap.at (j) = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1420 |
rbgAllocationMap.at (j) = dci.m_rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1421 |
NS_LOG_INFO ("\tRB " << j); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1422 |
rbAllocatedNum++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1423 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1424 |
NS_LOG_INFO (this << " Send retx in the same RBs " << (uint16_t)dci.m_rbStart << " to " << dci.m_rbStart + dci.m_rbLen << " RV " << (*itStat).second.at (harqId) + 1); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1425 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1426 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1427 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1428 |
NS_LOG_INFO ("Cannot allocate retx due to RACH allocations for UE " << rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1429 |
continue; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1430 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1431 |
dci.m_ndi = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1432 |
// Update HARQ buffers with new HarqId |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1433 |
(*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1434 |
(*itStat).second.at (harqId) = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1435 |
(*itHarq).second.at ((*itProcId).second) = dci; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1436 |
ret.m_dciList.push_back (dci); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1437 |
rntiAllocated.insert (dci.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1438 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1439 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1440 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1441 |
NS_LOG_INFO (this << " HARQ-ACK feedback from RNTI " << params.m_ulInfoList.at (i).m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1442 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1443 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1444 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1445 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1446 |
std::map <uint16_t,uint32_t>::iterator it; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1447 |
int nflows = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1448 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1449 |
for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1450 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1451 |
std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1452 |
// select UEs with queues not empty and not yet allocated for HARQ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1453 |
if (((*it).second > 0)&&(itRnti == rntiAllocated.end ())) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1454 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1455 |
nflows++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1456 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1457 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1458 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1459 |
if (nflows == 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1460 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1461 |
if (ret.m_dciList.size () > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1462 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1463 |
m_schedSapUser->SchedUlConfigInd (ret); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1464 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1465 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1466 |
return; // no flows to be scheduled |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1467 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1468 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1469 |
|
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1470 |
// Divide the remaining resources equally among the active users starting from the subsequent one served last scheduling trigger |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1471 |
uint16_t rbPerFlow = (m_cschedCellConfig.m_ulBandwidth) / (nflows + rntiAllocated.size ()); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1472 |
if (rbPerFlow < 3) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1473 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1474 |
rbPerFlow = 3; // at least 3 rbg per flow (till available resource) to ensure TxOpportunity >= 7 bytes |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1475 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1476 |
int rbAllocated = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1477 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1478 |
if (m_nextRntiUl != 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1479 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1480 |
for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1481 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1482 |
if ((*it).first == m_nextRntiUl) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1483 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1484 |
break; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1485 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1486 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1487 |
if (it == m_ceBsrRxed.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1488 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1489 |
NS_LOG_ERROR (this << " no user found"); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1490 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1491 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1492 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1493 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1494 |
it = m_ceBsrRxed.begin (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1495 |
m_nextRntiUl = (*it).first; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1496 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1497 |
do |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1498 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1499 |
std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1500 |
if ((itRnti != rntiAllocated.end ())||((*it).second == 0)) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1501 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1502 |
// UE already allocated for UL-HARQ -> skip it |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1503 |
it++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1504 |
if (it == m_ceBsrRxed.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1505 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1506 |
// restart from the first |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1507 |
it = m_ceBsrRxed.begin (); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1508 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1509 |
continue; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1510 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1511 |
if (rbAllocated + rbPerFlow - 1 > m_cschedCellConfig.m_ulBandwidth) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1512 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1513 |
// limit to physical resources last resource assignment |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1514 |
rbPerFlow = m_cschedCellConfig.m_ulBandwidth - rbAllocated; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1515 |
// at least 3 rbg per flow to ensure TxOpportunity >= 7 bytes |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1516 |
if (rbPerFlow < 3) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1517 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1518 |
// terminate allocation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1519 |
rbPerFlow = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1520 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1521 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1522 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1523 |
UlDciListElement_s uldci; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1524 |
uldci.m_rnti = (*it).first; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1525 |
uldci.m_rbLen = rbPerFlow; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1526 |
bool allocated = false; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1527 |
NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1528 |
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0)) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1529 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1530 |
// check availability |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1531 |
bool free = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1532 |
for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1533 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1534 |
if (rbMap.at (j) == true) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1535 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1536 |
free = false; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1537 |
break; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1538 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1539 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1540 |
if (free) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1541 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1542 |
uldci.m_rbStart = rbAllocated; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1543 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1544 |
for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1545 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1546 |
rbMap.at (j) = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1547 |
// store info on allocation for managing ul-cqi interpretation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1548 |
rbgAllocationMap.at (j) = (*it).first; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1549 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1550 |
rbAllocated += rbPerFlow; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1551 |
allocated = true; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1552 |
break; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1553 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1554 |
rbAllocated++; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1555 |
if (rbAllocated + rbPerFlow - 1 > m_cschedCellConfig.m_ulBandwidth) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1556 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1557 |
// limit to physical resources last resource assignment |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1558 |
rbPerFlow = m_cschedCellConfig.m_ulBandwidth - rbAllocated; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1559 |
// at least 3 rbg per flow to ensure TxOpportunity >= 7 bytes |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1560 |
if (rbPerFlow < 3) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1561 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1562 |
// terminate allocation |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1563 |
rbPerFlow = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1564 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1565 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1566 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1567 |
if (!allocated) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1568 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1569 |
// unable to allocate new resource: finish scheduling |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1570 |
m_nextRntiUl = (*it).first; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1571 |
if (ret.m_dciList.size () > 0) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1572 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1573 |
m_schedSapUser->SchedUlConfigInd (ret); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1574 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1575 |
m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> > (params.m_sfnSf, rbgAllocationMap)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1576 |
return; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1577 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1578 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1579 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1580 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1581 |
std::map <uint16_t, std::vector <double> >::iterator itCqi = m_ueCqi.find ((*it).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1582 |
int cqi = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1583 |
if (itCqi == m_ueCqi.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1584 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1585 |
// no cqi info about this UE |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1586 |
uldci.m_mcs = 0; // MCS 0 -> UL-AMC TBD |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1587 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1588 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1589 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1590 |
// take the lowest CQI value (worst RB) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1591 |
double minSinr = (*itCqi).second.at (uldci.m_rbStart); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1592 |
if (minSinr == NO_SINR) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1593 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1594 |
minSinr = EstimateUlSinr ((*it).first, uldci.m_rbStart); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1595 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1596 |
for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1597 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1598 |
double sinr = (*itCqi).second.at (i); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1599 |
if (sinr == NO_SINR) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1600 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1601 |
sinr = EstimateUlSinr ((*it).first, i); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1602 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1603 |
if ((*itCqi).second.at (i) < minSinr) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1604 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1605 |
minSinr = (*itCqi).second.at (i); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1606 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1607 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1608 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1609 |
// translate SINR -> cqi: WILD ACK: same as DL |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1610 |
double s = log2 ( 1 + ( |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1611 |
pow (10, minSinr / 10 ) / |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1612 |
( (-log (5.0 * 0.00005 )) / 1.5) )); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1613 |
cqi = m_amc->GetCqiFromSpectralEfficiency (s); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1614 |
if (cqi == 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1615 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1616 |
it++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1617 |
if (it == m_ceBsrRxed.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1618 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1619 |
// restart from the first |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1620 |
it = m_ceBsrRxed.begin (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1621 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1622 |
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1623 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1624 |
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1625 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1626 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1627 |
uldci.m_tbSize = (m_amc->GetTbSizeFromMcs (uldci.m_mcs, rbPerFlow) / 8); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1628 |
UpdateUlRlcBufferInfo (uldci.m_rnti, uldci.m_tbSize); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1629 |
uldci.m_ndi = 1; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1630 |
uldci.m_cceIndex = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1631 |
uldci.m_aggrLevel = 1; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1632 |
uldci.m_ueTxAntennaSelection = 3; // antenna selection OFF |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1633 |
uldci.m_hopping = false; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1634 |
uldci.m_n2Dmrs = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1635 |
uldci.m_tpc = 0; // no power control |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1636 |
uldci.m_cqiRequest = false; // only period CQI at this stage |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1637 |
uldci.m_ulIndex = 0; // TDD parameter |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1638 |
uldci.m_dai = 1; // TDD parameter |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1639 |
uldci.m_freqHopping = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1640 |
uldci.m_pdcchPowerOffset = 0; // not used |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1641 |
ret.m_dciList.push_back (uldci); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1642 |
// store DCI for HARQ_PERIOD |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1643 |
uint8_t harqId = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1644 |
if (m_harqOn == true) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1645 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1646 |
std::map <uint16_t, uint8_t>::iterator itProcId; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1647 |
itProcId = m_ulHarqCurrentProcessId.find (uldci.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1648 |
if (itProcId == m_ulHarqCurrentProcessId.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1649 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1650 |
NS_FATAL_ERROR ("No info find in HARQ buffer for UE " << uldci.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1651 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1652 |
harqId = (*itProcId).second; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1653 |
std::map <uint16_t, UlHarqProcessesDciBuffer_t>::iterator itDci = m_ulHarqProcessesDciBuffer.find (uldci.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1654 |
if (itDci == m_ulHarqProcessesDciBuffer.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1655 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1656 |
NS_FATAL_ERROR ("Unable to find RNTI entry in UL DCI HARQ buffer for RNTI " << uldci.m_rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1657 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1658 |
(*itDci).second.at (harqId) = uldci; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1659 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1660 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1661 |
NS_LOG_INFO (this << " UE Allocation RNTI " << (*it).first << " startPRB " << (uint32_t)uldci.m_rbStart << " nPRB " << (uint32_t)uldci.m_rbLen << " CQI " << cqi << " MCS " << (uint32_t)uldci.m_mcs << " TBsize " << uldci.m_tbSize << " RbAlloc " << rbAllocated << " harqId " << (uint16_t)harqId); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1662 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1663 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1664 |
it++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1665 |
if (it == m_ceBsrRxed.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1666 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1667 |
// restart from the first |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1668 |
it = m_ceBsrRxed.begin (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1669 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1670 |
if ((rbAllocated == m_cschedCellConfig.m_ulBandwidth) || (rbPerFlow == 0)) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1671 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1672 |
// Stop allocation: no more PRBs |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1673 |
m_nextRntiUl = (*it).first; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1674 |
break; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1675 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1676 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1677 |
while (((*it).first != m_nextRntiUl)&&(rbPerFlow!=0)); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1678 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1679 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1680 |
m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> > (params.m_sfnSf, rbgAllocationMap)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1681 |
m_schedSapUser->SchedUlConfigInd (ret); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1682 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1683 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1684 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1685 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1686 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1687 |
FdMtFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1688 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1689 |
NS_LOG_FUNCTION (this); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1690 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1691 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1692 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1693 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1694 |
FdMtFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1695 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1696 |
NS_LOG_FUNCTION (this); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1697 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1698 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1699 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1700 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1701 |
FdMtFfMacScheduler::DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1702 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1703 |
NS_LOG_FUNCTION (this); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1704 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1705 |
std::map <uint16_t,uint32_t>::iterator it; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1706 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1707 |
for (unsigned int i = 0; i < params.m_macCeList.size (); i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1708 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1709 |
if ( params.m_macCeList.at (i).m_macCeType == MacCeListElement_s::BSR ) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1710 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1711 |
// buffer status report |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1712 |
// note that this scheduler does not differentiate the |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1713 |
// allocation according to which LCGs have more/less bytes |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1714 |
// to send. |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1715 |
// Hence the BSR of different LCGs are just summed up to get |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1716 |
// a total queue size that is used for allocation purposes. |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1717 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1718 |
uint32_t buffer = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1719 |
for (uint8_t lcg = 0; lcg < 4; ++lcg) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1720 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1721 |
uint8_t bsrId = params.m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1722 |
buffer += BufferSizeLevelBsr::BsrId2BufferSize (bsrId); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1723 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1724 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1725 |
uint16_t rnti = params.m_macCeList.at (i).m_rnti; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1726 |
NS_LOG_LOGIC (this << "RNTI=" << rnti << " buffer=" << buffer); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1727 |
it = m_ceBsrRxed.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1728 |
if (it == m_ceBsrRxed.end ()) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1729 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1730 |
// create the new entry |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1731 |
m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1732 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1733 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1734 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1735 |
// update the buffer size value |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1736 |
(*it).second = buffer; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1737 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1738 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1739 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1740 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1741 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1742 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1743 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1744 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1745 |
FdMtFfMacScheduler::DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1746 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1747 |
NS_LOG_FUNCTION (this); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1748 |
// retrieve the allocation for this subframe |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1749 |
switch (m_ulCqiFilter) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1750 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1751 |
case FfMacScheduler::SRS_UL_CQI: |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1752 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1753 |
// filter all the CQIs that are not SRS based |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1754 |
if (params.m_ulCqi.m_type != UlCqi_s::SRS) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1755 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1756 |
return; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1757 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1758 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1759 |
break; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1760 |
case FfMacScheduler::PUSCH_UL_CQI: |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1761 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1762 |
// filter all the CQIs that are not SRS based |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1763 |
if (params.m_ulCqi.m_type != UlCqi_s::PUSCH) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1764 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1765 |
return; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1766 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1767 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1768 |
case FfMacScheduler::ALL_UL_CQI: |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1769 |
break; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1770 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1771 |
default: |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1772 |
NS_FATAL_ERROR ("Unknown UL CQI type"); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1773 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1774 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1775 |
switch (params.m_ulCqi.m_type) |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1776 |
{ |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1777 |
case UlCqi_s::PUSCH: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1778 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1779 |
std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1780 |
std::map <uint16_t, std::vector <double> >::iterator itCqi; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1781 |
NS_LOG_DEBUG (this << " Collect PUSCH CQIs of Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf)); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1782 |
itMap = m_allocationMaps.find (params.m_sfnSf); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1783 |
if (itMap == m_allocationMaps.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1784 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1785 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1786 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1787 |
for (uint32_t i = 0; i < (*itMap).second.size (); i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1788 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1789 |
// convert from fixed point notation Sxxxxxxxxxxx.xxx to double |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1790 |
double sinr = LteFfConverter::fpS11dot3toDouble (params.m_ulCqi.m_sinr.at (i)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1791 |
itCqi = m_ueCqi.find ((*itMap).second.at (i)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1792 |
if (itCqi == m_ueCqi.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1793 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1794 |
// create a new entry |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1795 |
std::vector <double> newCqi; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1796 |
for (uint32_t j = 0; j < m_cschedCellConfig.m_ulBandwidth; j++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1797 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1798 |
if (i == j) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1799 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1800 |
newCqi.push_back (sinr); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1801 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1802 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1803 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1804 |
// initialize with NO_SINR value. |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1805 |
newCqi.push_back (NO_SINR); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1806 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1807 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1808 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1809 |
m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1810 |
// generate correspondent timer |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1811 |
m_ueCqiTimers.insert (std::pair <uint16_t, uint32_t > ((*itMap).second.at (i), m_cqiTimersThreshold)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1812 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1813 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1814 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1815 |
// update the value |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1816 |
(*itCqi).second.at (i) = sinr; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1817 |
NS_LOG_DEBUG (this << " RNTI " << (*itMap).second.at (i) << " RB " << i << " SINR " << sinr); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1818 |
// update correspondent timer |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1819 |
std::map <uint16_t, uint32_t>::iterator itTimers; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1820 |
itTimers = m_ueCqiTimers.find ((*itMap).second.at (i)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1821 |
(*itTimers).second = m_cqiTimersThreshold; |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1822 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1823 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1824 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1825 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1826 |
// remove obsolete info on allocation |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1827 |
m_allocationMaps.erase (itMap); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1828 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1829 |
break; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1830 |
case UlCqi_s::SRS: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1831 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1832 |
// get the RNTI from vendor specific parameters |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1833 |
uint16_t rnti = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1834 |
NS_ASSERT (params.m_vendorSpecificList.size () > 0); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1835 |
for (uint16_t i = 0; i < params.m_vendorSpecificList.size (); i++) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1836 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1837 |
if (params.m_vendorSpecificList.at (i).m_type == SRS_CQI_RNTI_VSP) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1838 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1839 |
Ptr<SrsCqiRntiVsp> vsp = DynamicCast<SrsCqiRntiVsp> (params.m_vendorSpecificList.at (i).m_value); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1840 |
rnti = vsp->GetRnti (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1841 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1842 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1843 |
std::map <uint16_t, std::vector <double> >::iterator itCqi; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1844 |
itCqi = m_ueCqi.find (rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1845 |
if (itCqi == m_ueCqi.end ()) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1846 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1847 |
// create a new entry |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1848 |
std::vector <double> newCqi; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1849 |
for (uint32_t j = 0; j < m_cschedCellConfig.m_ulBandwidth; j++) |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1850 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1851 |
double sinr = LteFfConverter::fpS11dot3toDouble (params.m_ulCqi.m_sinr.at (j)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1852 |
newCqi.push_back (sinr); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1853 |
NS_LOG_INFO (this << " RNTI " << rnti << " new SRS-CQI for RB " << j << " value " << sinr); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1854 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1855 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1856 |
m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1857 |
// generate correspondent timer |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1858 |
m_ueCqiTimers.insert (std::pair <uint16_t, uint32_t > (rnti, m_cqiTimersThreshold)); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1859 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1860 |
else |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1861 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1862 |
// update the values |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1863 |
for (uint32_t j = 0; j < m_cschedCellConfig.m_ulBandwidth; j++) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1864 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1865 |
double sinr = LteFfConverter::fpS11dot3toDouble (params.m_ulCqi.m_sinr.at (j)); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1866 |
(*itCqi).second.at (j) = sinr; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1867 |
NS_LOG_INFO (this << " RNTI " << rnti << " update SRS-CQI for RB " << j << " value " << sinr); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1868 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1869 |
// update correspondent timer |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1870 |
std::map <uint16_t, uint32_t>::iterator itTimers; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1871 |
itTimers = m_ueCqiTimers.find (rnti); |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1872 |
(*itTimers).second = m_cqiTimersThreshold; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1873 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1874 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1875 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1876 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1877 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1878 |
break; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1879 |
case UlCqi_s::PUCCH_1: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1880 |
case UlCqi_s::PUCCH_2: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1881 |
case UlCqi_s::PRACH: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1882 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1883 |
NS_FATAL_ERROR ("FdMtFfMacScheduler supports only PUSCH and SRS UL-CQIs"); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1884 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1885 |
break; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1886 |
default: |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1887 |
NS_FATAL_ERROR ("Unknown type of UL-CQI"); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1888 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1889 |
return; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1890 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1891 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1892 |
void |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1893 |
FdMtFfMacScheduler::RefreshDlCqiMaps (void) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1894 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1895 |
// refresh DL CQI P01 Map |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1896 |
std::map <uint16_t,uint32_t>::iterator itP10 = m_p10CqiTimers.begin (); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1897 |
while (itP10 != m_p10CqiTimers.end ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1898 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1899 |
NS_LOG_INFO (this << " P10-CQI for user " << (*itP10).first << " is " << (uint32_t)(*itP10).second << " thr " << (uint32_t)m_cqiTimersThreshold); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1900 |
if ((*itP10).second == 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1901 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1902 |
// delete correspondent entries |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1903 |
std::map <uint16_t,uint8_t>::iterator itMap = m_p10CqiRxed.find ((*itP10).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1904 |
NS_ASSERT_MSG (itMap != m_p10CqiRxed.end (), " Does not find CQI report for user " << (*itP10).first); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1905 |
NS_LOG_INFO (this << " P10-CQI expired for user " << (*itP10).first); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1906 |
m_p10CqiRxed.erase (itMap); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1907 |
std::map <uint16_t,uint32_t>::iterator temp = itP10; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1908 |
itP10++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1909 |
m_p10CqiTimers.erase (temp); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1910 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1911 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1912 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1913 |
(*itP10).second--; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1914 |
itP10++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1915 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1916 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1917 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1918 |
// refresh DL CQI A30 Map |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1919 |
std::map <uint16_t,uint32_t>::iterator itA30 = m_a30CqiTimers.begin (); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1920 |
while (itA30 != m_a30CqiTimers.end ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1921 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1922 |
NS_LOG_INFO (this << " A30-CQI for user " << (*itA30).first << " is " << (uint32_t)(*itA30).second << " thr " << (uint32_t)m_cqiTimersThreshold); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1923 |
if ((*itA30).second == 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1924 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1925 |
// delete correspondent entries |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1926 |
std::map <uint16_t,SbMeasResult_s>::iterator itMap = m_a30CqiRxed.find ((*itA30).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1927 |
NS_ASSERT_MSG (itMap != m_a30CqiRxed.end (), " Does not find CQI report for user " << (*itA30).first); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1928 |
NS_LOG_INFO (this << " A30-CQI expired for user " << (*itA30).first); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1929 |
m_a30CqiRxed.erase (itMap); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1930 |
std::map <uint16_t,uint32_t>::iterator temp = itA30; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1931 |
itA30++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1932 |
m_a30CqiTimers.erase (temp); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1933 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1934 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1935 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1936 |
(*itA30).second--; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1937 |
itA30++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1938 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1939 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1940 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1941 |
return; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1942 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1943 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1944 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1945 |
void |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1946 |
FdMtFfMacScheduler::RefreshUlCqiMaps (void) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1947 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1948 |
// refresh UL CQI Map |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1949 |
std::map <uint16_t,uint32_t>::iterator itUl = m_ueCqiTimers.begin (); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1950 |
while (itUl != m_ueCqiTimers.end ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1951 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1952 |
NS_LOG_INFO (this << " UL-CQI for user " << (*itUl).first << " is " << (uint32_t)(*itUl).second << " thr " << (uint32_t)m_cqiTimersThreshold); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1953 |
if ((*itUl).second == 0) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1954 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1955 |
// delete correspondent entries |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1956 |
std::map <uint16_t, std::vector <double> >::iterator itMap = m_ueCqi.find ((*itUl).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1957 |
NS_ASSERT_MSG (itMap != m_ueCqi.end (), " Does not find CQI report for user " << (*itUl).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1958 |
NS_LOG_INFO (this << " UL-CQI exired for user " << (*itUl).first); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1959 |
(*itMap).second.clear (); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1960 |
m_ueCqi.erase (itMap); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1961 |
std::map <uint16_t,uint32_t>::iterator temp = itUl; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1962 |
itUl++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1963 |
m_ueCqiTimers.erase (temp); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1964 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1965 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1966 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1967 |
(*itUl).second--; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1968 |
itUl++; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1969 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1970 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1971 |
|
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1972 |
return; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1973 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1974 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1975 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1976 |
FdMtFfMacScheduler::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
|
1977 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1978 |
std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1979 |
LteFlowId_t flow (rnti, lcid); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1980 |
it = m_rlcBufferReq.find (flow); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1981 |
if (it != m_rlcBufferReq.end ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1982 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1983 |
NS_LOG_INFO (this << " UE " << rnti << " LC " << (uint16_t)lcid << " txqueue " << (*it).second.m_rlcTransmissionQueueSize << " retxqueue " << (*it).second.m_rlcRetransmissionQueueSize << " status " << (*it).second.m_rlcStatusPduSize << " decrease " << size); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1984 |
// Update queues: RLC tx order Status, ReTx, Tx |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1985 |
// Update status queue |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1986 |
if (((*it).second.m_rlcStatusPduSize > 0) && (size >= (*it).second.m_rlcStatusPduSize)) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1987 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1988 |
(*it).second.m_rlcStatusPduSize = 0; |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1989 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1990 |
else if (((*it).second.m_rlcRetransmissionQueueSize > 0) && (size >= (*it).second.m_rlcRetransmissionQueueSize)) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1991 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1992 |
(*it).second.m_rlcRetransmissionQueueSize = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1993 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1994 |
else if ((*it).second.m_rlcTransmissionQueueSize > 0) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
1995 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1996 |
// update transmission queue |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1997 |
if ((*it).second.m_rlcTransmissionQueueSize <= size) |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1998 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
1999 |
(*it).second.m_rlcTransmissionQueueSize = 0; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2000 |
} |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2001 |
else |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2002 |
{ |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2003 |
size -= 2; // remove minimun RLC overhead due to header |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2004 |
(*it).second.m_rlcTransmissionQueueSize -= size; |
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2005 |
} |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2006 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2007 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2008 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2009 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2010 |
NS_LOG_ERROR (this << " Does not find DL RLC Buffer Report of UE " << rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2011 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2012 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2013 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2014 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2015 |
FdMtFfMacScheduler::UpdateUlRlcBufferInfo (uint16_t rnti, uint16_t size) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2016 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2017 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2018 |
size = size - 2; // remove the minimum RLC overhead |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2019 |
std::map <uint16_t,uint32_t>::iterator it = m_ceBsrRxed.find (rnti); |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2020 |
if (it != m_ceBsrRxed.end ()) |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2021 |
{ |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2022 |
NS_LOG_INFO (this << " UE " << rnti << " size " << size << " BSR " << (*it).second); |
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2023 |
if ((*it).second >= size) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2024 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2025 |
(*it).second -= size; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2026 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2027 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2028 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2029 |
(*it).second = 0; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2030 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2031 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2032 |
else |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2033 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2034 |
NS_LOG_ERROR (this << " Does not find BSR report info of UE " << rnti); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2035 |
} |
9654
cd7eb841e50e
updated GSoC 2012 schedulers to LENA M5 version
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
9152
diff
changeset
|
2036 |
|
9149
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2037 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2038 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2039 |
void |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2040 |
FdMtFfMacScheduler::TransmissionModeConfigurationUpdate (uint16_t rnti, uint8_t txMode) |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2041 |
{ |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2042 |
NS_LOG_FUNCTION (this << " RNTI " << rnti << " txMode " << (uint16_t)txMode); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2043 |
FfMacCschedSapUser::CschedUeConfigUpdateIndParameters params; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2044 |
params.m_rnti = rnti; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2045 |
params.m_transmissionMode = txMode; |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2046 |
m_cschedSapUser->CschedUeConfigUpdateInd (params); |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2047 |
} |
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2048 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2049 |
|
2580b67c83b3
GSoC 2012 NS-3 LTE MAC schedulers
Dizhi Zhou <dizhi.zhou@gmail.com>
parents:
diff
changeset
|
2050 |
} |