author | Marco Miozzo <marco.miozzo@cttc.es> |
Tue, 10 May 2011 16:52:43 +0200 | |
changeset 8035 | d2e70680881a |
parent 7983 | b91d5a39aabc |
child 8047 | 3741b99462cd |
permissions | -rw-r--r-- |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
2 |
/* |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
3 |
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
4 |
* |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
8 |
* |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
13 |
* |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
17 |
* |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
18 |
* Author: Marco Miozzo <marco.miozzo@cttc.es> |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
19 |
*/ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
20 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
21 |
#include <ns3/log.h> |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
22 |
#include <ns3/pointer.h> |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
23 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
24 |
#include <ns3/simulator.h> |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
25 |
#include <ns3/lte-amc.h> |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
26 |
#include <ns3/pf-ff-mac-scheduler.h> |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
27 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
28 |
NS_LOG_COMPONENT_DEFINE ("PfFfMacScheduler"); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
29 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
30 |
namespace ns3 { |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
31 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
32 |
int PfType0AllocationRbg[4] = { |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
33 |
10, // RGB size 1 |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
34 |
26, // RGB size 2 |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
35 |
63, // RGB size 3 |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
36 |
110 // RGB size 4 |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
37 |
}; // see table 7.1.6.1-1 of 36.213 |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
38 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
39 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
40 |
NS_OBJECT_ENSURE_REGISTERED (PfFfMacScheduler); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
41 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
42 |
|
7936
2c531eab14f1
Move inline code in pf-ff-mac-schedluer to cc file
mmiozzo
parents:
7912
diff
changeset
|
43 |
|
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
44 |
class PfSchedulerMemberCschedSapProvider : public FfMacCschedSapProvider |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
45 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
46 |
public: |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
47 |
PfSchedulerMemberCschedSapProvider (PfFfMacScheduler* scheduler); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
48 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
49 |
// inherited from FfMacCschedSapProvider |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
50 |
virtual void CschedCellConfigReq (const struct CschedCellConfigReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
51 |
virtual void CschedUeConfigReq (const struct CschedUeConfigReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
52 |
virtual void CschedLcConfigReq (const struct CschedLcConfigReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
53 |
virtual void CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
54 |
virtual void CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
55 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
56 |
private: |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
57 |
PfSchedulerMemberCschedSapProvider (); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
58 |
PfFfMacScheduler* m_scheduler; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
59 |
}; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
60 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
61 |
PfSchedulerMemberCschedSapProvider::PfSchedulerMemberCschedSapProvider () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
62 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
63 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
64 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
65 |
PfSchedulerMemberCschedSapProvider::PfSchedulerMemberCschedSapProvider (PfFfMacScheduler* scheduler) : m_scheduler (scheduler) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
66 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
67 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
68 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
69 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
70 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
71 |
PfSchedulerMemberCschedSapProvider::CschedCellConfigReq (const struct CschedCellConfigReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
72 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
73 |
m_scheduler->DoCschedCellConfigReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
74 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
75 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
76 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
77 |
PfSchedulerMemberCschedSapProvider::CschedUeConfigReq (const struct CschedUeConfigReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
78 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
79 |
m_scheduler->DoCschedUeConfigReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
80 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
81 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
82 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
83 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
84 |
PfSchedulerMemberCschedSapProvider::CschedLcConfigReq (const struct CschedLcConfigReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
85 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
86 |
m_scheduler->DoCschedLcConfigReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
87 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
88 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
89 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
90 |
PfSchedulerMemberCschedSapProvider::CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
91 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
92 |
m_scheduler->DoCschedLcReleaseReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
93 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
94 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
95 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
96 |
PfSchedulerMemberCschedSapProvider::CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
97 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
98 |
m_scheduler->DoCschedUeReleaseReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
99 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
100 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
101 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
102 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
103 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
104 |
class PfSchedulerMemberSchedSapProvider : public FfMacSchedSapProvider |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
105 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
106 |
public: |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
107 |
PfSchedulerMemberSchedSapProvider (PfFfMacScheduler* scheduler); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
108 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
109 |
// inherited from FfMacSchedSapProvider |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
110 |
virtual void SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
111 |
virtual void SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
112 |
virtual void SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
113 |
virtual void SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
114 |
virtual void SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
115 |
virtual void SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
116 |
virtual void SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
117 |
virtual void SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
118 |
virtual void SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
119 |
virtual void SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
120 |
virtual void SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
121 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
122 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
123 |
private: |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
124 |
PfSchedulerMemberSchedSapProvider (); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
125 |
PfFfMacScheduler* m_scheduler; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
126 |
}; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
127 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
128 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
129 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
130 |
PfSchedulerMemberSchedSapProvider::PfSchedulerMemberSchedSapProvider () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
131 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
132 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
133 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
134 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
135 |
PfSchedulerMemberSchedSapProvider::PfSchedulerMemberSchedSapProvider (PfFfMacScheduler* scheduler) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
136 |
: m_scheduler (scheduler) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
137 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
138 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
139 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
140 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
141 |
PfSchedulerMemberSchedSapProvider::SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
142 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
143 |
m_scheduler->DoSchedDlRlcBufferReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
144 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
145 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
146 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
147 |
PfSchedulerMemberSchedSapProvider::SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
148 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
149 |
m_scheduler->DoSchedDlPagingBufferReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
150 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
151 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
152 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
153 |
PfSchedulerMemberSchedSapProvider::SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
154 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
155 |
m_scheduler->DoSchedDlMacBufferReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
156 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
157 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
158 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
159 |
PfSchedulerMemberSchedSapProvider::SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
160 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
161 |
m_scheduler->DoSchedDlTriggerReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
162 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
163 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
164 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
165 |
PfSchedulerMemberSchedSapProvider::SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
166 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
167 |
m_scheduler->DoSchedDlRachInfoReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
168 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
169 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
170 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
171 |
PfSchedulerMemberSchedSapProvider::SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
172 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
173 |
m_scheduler->DoSchedDlCqiInfoReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
174 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
175 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
176 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
177 |
PfSchedulerMemberSchedSapProvider::SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
178 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
179 |
m_scheduler->DoSchedUlTriggerReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
180 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
181 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
182 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
183 |
PfSchedulerMemberSchedSapProvider::SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
184 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
185 |
m_scheduler->DoSchedUlNoiseInterferenceReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
186 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
187 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
188 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
189 |
PfSchedulerMemberSchedSapProvider::SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
190 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
191 |
m_scheduler->DoSchedUlSrInfoReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
192 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
193 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
194 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
195 |
PfSchedulerMemberSchedSapProvider::SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
196 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
197 |
m_scheduler->DoSchedUlMacCtrlInfoReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
198 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
199 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
200 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
201 |
PfSchedulerMemberSchedSapProvider::SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
202 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
203 |
m_scheduler->DoSchedUlCqiInfoReq (params); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
204 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
205 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
206 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
207 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
208 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
209 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
210 |
PfFfMacScheduler::PfFfMacScheduler () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
211 |
: m_cschedSapUser (0), |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
212 |
m_schedSapUser (0), |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
213 |
m_timeWindow (10.0), |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
214 |
m_schedTtiDelay (2) // WILD ACK: based on a m_macChTtiDelay = 1 |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
215 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
216 |
m_cschedSapProvider = new PfSchedulerMemberCschedSapProvider (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
217 |
m_schedSapProvider = new PfSchedulerMemberSchedSapProvider (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
218 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
219 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
220 |
PfFfMacScheduler::~PfFfMacScheduler () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
221 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
222 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
223 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
224 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
225 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
226 |
PfFfMacScheduler::DoDispose () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
227 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
228 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
229 |
delete m_cschedSapProvider; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
230 |
delete m_schedSapProvider; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
231 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
232 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
233 |
TypeId |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
234 |
PfFfMacScheduler::GetTypeId (void) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
235 |
{ |
7983
b91d5a39aabc
scheduler and propagation model configurable through ConfigStore
Nicola Baldo <nbaldo@cttc.es>
parents:
7979
diff
changeset
|
236 |
static TypeId tid = TypeId ("ns3::PfFfMacScheduler") |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
237 |
.SetParent<FfMacScheduler> () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
238 |
.AddConstructor<PfFfMacScheduler> (); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
239 |
return tid; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
240 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
241 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
242 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
243 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
244 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
245 |
PfFfMacScheduler::SetFfMacCschedSapUser (FfMacCschedSapUser* s) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
246 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
247 |
m_cschedSapUser = s; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
248 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
249 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
250 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
251 |
PfFfMacScheduler::SetFfMacSchedSapUser (FfMacSchedSapUser* s) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
252 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
253 |
m_schedSapUser = s; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
254 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
255 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
256 |
FfMacCschedSapProvider* |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
257 |
PfFfMacScheduler::GetFfMacCschedSapProvider () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
258 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
259 |
return m_cschedSapProvider; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
260 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
261 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
262 |
FfMacSchedSapProvider* |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
263 |
PfFfMacScheduler::GetFfMacSchedSapProvider () |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
264 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
265 |
return m_schedSapProvider; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
266 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
267 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
268 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
269 |
PfFfMacScheduler::DoCschedCellConfigReq (const struct FfMacCschedSapProvider::CschedCellConfigReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
270 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
271 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
272 |
// Read the subset of parameters used |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
273 |
m_cschedCellConfig = params; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
274 |
FfMacCschedSapUser::CschedUeConfigCnfParameters cnf; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
275 |
cnf.m_result = SUCCESS; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
276 |
m_cschedSapUser->CschedUeConfigCnf (cnf); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
277 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
278 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
279 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
280 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
281 |
PfFfMacScheduler::DoCschedUeConfigReq (const struct FfMacCschedSapProvider::CschedUeConfigReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
282 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
283 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
284 |
// Not used at this stage |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
285 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
286 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
287 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
288 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
289 |
PfFfMacScheduler::DoCschedLcConfigReq (const struct FfMacCschedSapProvider::CschedLcConfigReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
290 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
291 |
NS_LOG_FUNCTION (this << " New LC, rnti: " << params.m_rnti); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
292 |
|
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
293 |
std::map <uint16_t, pfsFlowPerf_t>::iterator it; |
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7899
diff
changeset
|
294 |
for (uint16_t i = 0; i < params.m_logicalChannelConfigList.size (); i++) |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
295 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
296 |
it = m_flowStats.find (params.m_rnti); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
297 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
298 |
if (it == m_flowStats.end ()) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
299 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
300 |
pfsFlowPerf_t flowStats; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
301 |
flowStats.flowStart = Simulator::Now (); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
302 |
flowStats.totalBytesTransmitted = 0; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
303 |
flowStats.lastTtiBytesTrasmitted = 0; |
7974
418af6390cd8
LENA-81 same priority a start-up in PfScheduler for GBR and NGBR flows (i.e., flowStats.lastAveragedThroughput=1 always)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7971
diff
changeset
|
304 |
flowStats.lastAveragedThroughput = 1; |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
305 |
m_flowStats.insert (std::pair<uint16_t, pfsFlowPerf_t> (params.m_rnti, flowStats)); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
306 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
307 |
else |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
308 |
{ |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
309 |
NS_LOG_ERROR ("RNTI already exists"); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
310 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
311 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
312 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
313 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
314 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
315 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
316 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
317 |
PfFfMacScheduler::DoCschedLcReleaseReq (const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
318 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
319 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
320 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
321 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
322 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
323 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
324 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
325 |
PfFfMacScheduler::DoCschedUeReleaseReq (const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
326 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
327 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
328 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
329 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
330 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
331 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
332 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
333 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
334 |
PfFfMacScheduler::DoSchedDlRlcBufferReq (const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
335 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
336 |
NS_LOG_FUNCTION (this << params.m_rnti << (uint32_t) params.m_logicalChannelIdentity); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
337 |
// API generated by RLC for updating RLC parameters on a LC (tx and retx queues) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
338 |
|
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
339 |
std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it; |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
340 |
|
7971 | 341 |
LteFlowId_t flow (params.m_rnti, params.m_logicalChannelIdentity); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
342 |
|
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
343 |
it = m_rlcBufferReq.find (flow); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
344 |
|
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
345 |
if (it == m_rlcBufferReq.end ()) |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
346 |
{ |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
347 |
m_rlcBufferReq.insert (std::pair <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> (flow, params)); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
348 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
349 |
else |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
350 |
{ |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
351 |
(*it).second = params; |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
352 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
353 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
354 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
355 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
356 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
357 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
358 |
PfFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
359 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
360 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
361 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
362 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
363 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
364 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
365 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
366 |
PfFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
367 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
368 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
369 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
370 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
371 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
372 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
373 |
int |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
374 |
PfFfMacScheduler::GetRbgSize (int dlbandwidth) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
375 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
376 |
for (int i = 0; i < 4; i++) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
377 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
378 |
if (dlbandwidth < PfType0AllocationRbg[i]) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
379 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
380 |
return (i + 1); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
381 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
382 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
383 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
384 |
return (-1); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
385 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
386 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
387 |
|
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
388 |
int |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
389 |
PfFfMacScheduler::LcActivePerFlow(uint16_t rnti) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
390 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
391 |
std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
392 |
int lcActive = 0; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
393 |
for (it = m_rlcBufferReq.begin (); it!= m_rlcBufferReq.end (); it++) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
394 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
395 |
if (((*it).first.m_rnti == rnti) && (((*it).second.m_rlcTransmissionQueueSize>0) || |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
396 |
((*it).second.m_rlcRetransmissionQueueSize>0) || |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
397 |
((*it).second.m_rlcStatusPduSize>0) )) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
398 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
399 |
lcActive++; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
400 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
401 |
if ((*it).first.m_rnti > rnti) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
402 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
403 |
break; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
404 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
405 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
406 |
return (lcActive); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
407 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
408 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
409 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
410 |
|
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
411 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
412 |
PfFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
413 |
{ |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
414 |
NS_LOG_FUNCTION (this << " Frame no. " << (params.m_sfnSf>>4) << " subframe no. " << (0xF & params.m_sfnSf)); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
415 |
// API generated by RLC for triggering the scheduling of a DL subframe |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
416 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
417 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
418 |
// evaluate the relative channel quality indicator for each UE per each RBG |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
419 |
// (since we are using allocation type 0 the small unit of allocation is RBG) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
420 |
// Resource allocation type 0 (see sec 7.1.6.1 of 36.213) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
421 |
int rbgSize = GetRbgSize (m_cschedCellConfig.m_dlBandwidth); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
422 |
int rbgNum = m_cschedCellConfig.m_dlBandwidth / rbgSize; |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
423 |
//std::vector <LteFlowId_t> rbgAllocationMap; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
424 |
std::map <uint16_t, std::vector <uint16_t> > allocationMap; |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
425 |
for (int i = 0; i < rbgNum; i++) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
426 |
{ |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
427 |
NS_LOG_DEBUG (this << " ALLOCATION for RBG " << i << " of " << rbgNum); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
428 |
std::map <uint16_t, pfsFlowPerf_t>::iterator it; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
429 |
std::map <uint16_t, pfsFlowPerf_t>::iterator itMax = m_flowStats.end (); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
430 |
double rcqiMax = 0.0; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
431 |
for (it = m_flowStats.begin (); it != m_flowStats.end (); it++) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
432 |
{ |
7966
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
433 |
std::map <uint16_t,SbMeasResult_s>::iterator itCqi; |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
434 |
itCqi = m_a30CqiRxed.find ((*it).first); |
7966
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
435 |
uint8_t cqi = 0; |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
436 |
if (itCqi == m_a30CqiRxed.end ()) |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
437 |
{ |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
438 |
NS_LOG_DEBUG (this << " No DL-CQI for this UE " << (*it).first); |
7966
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
439 |
cqi = 1; // start with lowest value |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
440 |
} |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
441 |
else |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
442 |
{ |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
443 |
cqi = (*itCqi).second.m_higherLayerSelected.at (i).m_sbCqi.at (0); |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
444 |
} |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
445 |
if (cqi > 0) // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213) |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
446 |
{ |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
447 |
// NS_LOG_DEBUG (this << " LC active " << LcActivePerFlow ((*it).first)); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
448 |
if (LcActivePerFlow ((*it).first) > 0) |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
449 |
{ |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
450 |
// this UE has data to transmit |
7966
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
451 |
uint8_t mcs = LteAmc::GetMcsFromCqi (cqi); |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
452 |
double achievableRate = ((LteAmc::GetTbSizeFromMcs (mcs, 1) / 8)/0.001); // = TB size / TTI |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
453 |
double rcqi = achievableRate / (*it).second.lastAveragedThroughput; |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
454 |
NS_LOG_DEBUG (this << " RNTI " << (*it).first << " MCS " << (uint32_t)mcs << " achievableRate " << achievableRate << " avgThr " << (*it).second.lastAveragedThroughput << " RCQI " << rcqi); |
7966
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
455 |
|
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
456 |
if (rcqi > rcqiMax) |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
457 |
{ |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
458 |
rcqiMax = rcqi; |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
459 |
itMax = it; |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
460 |
} |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
461 |
} |
7966
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
462 |
} // end if cqi |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
463 |
} // end for m_rlcBufferReq |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
464 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
465 |
if (itMax == m_flowStats.end ()) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
466 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
467 |
// no UE available for this RB |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
468 |
NS_LOG_DEBUG (this << " no UE found"); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
469 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
470 |
else |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
471 |
{ |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
472 |
std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
473 |
itMap = allocationMap.find ((*itMax).first); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
474 |
if (itMap == allocationMap.end ()) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
475 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
476 |
// insert new element |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
477 |
std::vector <uint16_t> tempMap; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
478 |
tempMap.push_back (i); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
479 |
allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax).first, tempMap)); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
480 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
481 |
else |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
482 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
483 |
(*itMap).second.push_back (i); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
484 |
} |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
485 |
NS_LOG_DEBUG (this << " UE assigned " << (*itMax).first); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
486 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
487 |
} // end for RBGs |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
488 |
|
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
489 |
// generate the transmission opportunities by grouping the RBGs of the same RNTI and |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
490 |
// creating the correspondent DCIs |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
491 |
FfMacSchedSapUser::SchedDlConfigIndParameters ret; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
492 |
std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin (); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
493 |
while (itMap != allocationMap.end ()) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
494 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
495 |
// create new BuildDataListElement_s for this LC |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
496 |
BuildDataListElement_s newEl; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
497 |
newEl.m_rnti = (*itMap).first; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
498 |
// create the DlDciListElement_s |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
499 |
DlDciListElement_s newDci; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
500 |
std::vector <struct RlcPduListElement_s> newRlcPduLe; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
501 |
newDci.m_rnti = (*itMap).first; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
502 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
503 |
uint16_t lcActives = LcActivePerFlow ((*itMap).first); |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
504 |
// NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " rbg " << lcActives); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
505 |
uint16_t RgbPerRnti = (*itMap).second.size (); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
506 |
std::map <uint16_t,SbMeasResult_s>::iterator itCqi; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
507 |
itCqi = m_a30CqiRxed.find ((*itMap).first); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
508 |
uint8_t worstCqi = 15; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
509 |
for (uint16_t k = 0; k < (*itMap).second.size (); k++) |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
510 |
{ |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
511 |
if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k)) |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
512 |
{ |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
513 |
// NS_LOG_DEBUG (this << " RBG " << (*itMap).second.at (k) << " CQI " << (uint16_t)((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (0)) ); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
514 |
if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (0)) < worstCqi) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
515 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
516 |
worstCqi = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (0)); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
517 |
} |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
518 |
} |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
519 |
else |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
520 |
{ |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
521 |
worstCqi = 1; // try with lowest MCS in RBG with no info on channel |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
522 |
} |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
523 |
} |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
524 |
// NS_LOG_DEBUG (this << " CQI " << (uint16_t)worstCqi); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
525 |
newDci.m_mcs.push_back (LteAmc::GetMcsFromCqi (worstCqi)); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
526 |
int tbSize = (LteAmc::GetTbSizeFromMcs (newDci.m_mcs.at (0), RgbPerRnti * rbgSize) / 8); // (size of TB in bytes according to table 7.1.7.2.1-1 of 36.213) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
527 |
newDci.m_tbsSize.push_back (tbSize); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
528 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
529 |
newDci.m_resAlloc = 0; // only allocation type 0 at this stage |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
530 |
newDci.m_rbBitmap = 0; // TBD (32 bit bitmap see 7.1.6 of 36.213) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
531 |
uint32_t rbgMask = 0; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
532 |
for (uint16_t k = 0; k < (*itMap).second.size (); k++) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
533 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
534 |
rbgMask = rbgMask + (0x1 << (*itMap).second.at (k)); |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
535 |
// NS_LOG_DEBUG (this << " Allocated PRB " << (*itMap).second.at (k)); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
536 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
537 |
newDci.m_rbBitmap = rbgMask; // (32 bit bitmap see 7.1.6 of 36.213) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
538 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
539 |
// create the rlc PDUs -> equally divide resources among actives LCs |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
540 |
int rlcPduSize = tbSize / lcActives; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
541 |
std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
542 |
for (itBufReq = m_rlcBufferReq.begin (); itBufReq!= m_rlcBufferReq.end (); itBufReq++) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
543 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
544 |
if (((*itBufReq).first.m_rnti == (*itMap).first) && (((*itBufReq).second.m_rlcTransmissionQueueSize>0) || |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
545 |
((*itBufReq).second.m_rlcRetransmissionQueueSize>0) || |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
546 |
((*itBufReq).second.m_rlcStatusPduSize>0) )) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
547 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
548 |
RlcPduListElement_s newRlcEl; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
549 |
newRlcEl.m_logicalChannelIdentity = (*itBufReq).first.m_lcId; |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
550 |
NS_LOG_DEBUG (this << " LCID " << (uint32_t) newRlcEl.m_logicalChannelIdentity << " size " << rlcPduSize); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
551 |
newRlcEl.m_size = rlcPduSize; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
552 |
newRlcPduLe.push_back (newRlcEl); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
553 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
554 |
if ((*itBufReq).first.m_rnti > (*itMap).first) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
555 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
556 |
break; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
557 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
558 |
} |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
559 |
newDci.m_ndi.push_back (1); // TBD (new data indicator) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
560 |
newDci.m_rv.push_back (0); // TBD (redundancy version) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
561 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
562 |
newEl.m_dci = newDci; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
563 |
// ...more parameters -> ingored in this version |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
564 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
565 |
newEl.m_rlcPduList.push_back (newRlcPduLe); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
566 |
ret.m_buildDataList.push_back (newEl); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
567 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
568 |
// update UE stats |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
569 |
std::map <uint16_t, pfsFlowPerf_t>::iterator it; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
570 |
it = m_flowStats.find ((*itMap).first); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
571 |
if (it != m_flowStats.end()) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
572 |
{ |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
573 |
(*it).second.lastTtiBytesTrasmitted = tbSize; |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
574 |
NS_LOG_DEBUG (this << " UE bytes txed " << (*it).second.lastTtiBytesTrasmitted); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
575 |
(*it).second.totalBytesTransmitted += (*it).second.lastTtiBytesTrasmitted; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
576 |
// update average throughput (see eq. 12.3 of Sec 12.3.1.2 of LTE – The UMTS Long Term Evolution, Ed Wiley) |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
577 |
(*it).second.lastAveragedThroughput = ((1.0 - (1.0 / m_timeWindow)) * (*it).second.lastAveragedThroughput) + ((1.0 / m_timeWindow) * (double)((*it).second.lastTtiBytesTrasmitted / 0.001)); |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
578 |
(*it).second.lastTtiBytesTrasmitted = 0; |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
579 |
NS_LOG_DEBUG (this << " UE tot bytes " << (*it).second.totalBytesTransmitted); |
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
580 |
NS_LOG_DEBUG (this << " UE avg thr " << (*it).second.lastAveragedThroughput); |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
581 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
582 |
} |
8035
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
583 |
else |
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
584 |
{ |
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
585 |
NS_LOG_DEBUG (this << " No Stats for this allocated UE"); |
d2e70680881a
LenaTestPfFfMacSchedulerSuite works with distance 0
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7983
diff
changeset
|
586 |
} |
7979
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
587 |
|
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
588 |
itMap++; |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
589 |
} // end while allocation |
8e542d91bfc3
LENA-68 PfFfMacScheduler updated to single TB per RNTI (LC multiplexed)
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7974
diff
changeset
|
590 |
ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
591 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
592 |
m_schedSapUser->SchedDlConfigInd (ret); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
593 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
594 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
595 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
596 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
597 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
598 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
599 |
PfFfMacScheduler::DoSchedDlRachInfoReq (const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
600 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
601 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
602 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
603 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
604 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
605 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
606 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
607 |
PfFfMacScheduler::DoSchedDlCqiInfoReq (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
608 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
609 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
610 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
611 |
for (unsigned int i = 0; i < params.m_cqiList.size (); i++) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
612 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
613 |
if ( params.m_cqiList.at (i).m_cqiType == CqiListElement_s::P10 ) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
614 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
615 |
// wideband CQI reporting |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
616 |
std::map <uint16_t,uint8_t>::iterator it; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
617 |
uint16_t rnti = params.m_cqiList.at (i).m_rnti; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
618 |
it = m_p10CqiRxed.find (rnti); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
619 |
if (it == m_p10CqiRxed.end ()) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
620 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
621 |
// create the new entry |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
622 |
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) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
623 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
624 |
else |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
625 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
626 |
// update the CQI value |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
627 |
(*it).second = params.m_cqiList.at (i).m_wbCqi.at (0); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
628 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
629 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
630 |
else if ( params.m_cqiList.at (i).m_cqiType == CqiListElement_s::A30 ) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
631 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
632 |
// subband CQI reporting high layer configured |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
633 |
std::map <uint16_t,SbMeasResult_s>::iterator it; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
634 |
uint16_t rnti = params.m_cqiList.at (i).m_rnti; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
635 |
it = m_a30CqiRxed.find (rnti); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
636 |
if (it == m_a30CqiRxed.end ()) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
637 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
638 |
// create the new entry |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
639 |
m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.m_cqiList.at (i).m_sbMeasResult) ); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
640 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
641 |
else |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
642 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
643 |
// update the CQI value |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
644 |
(*it).second = params.m_cqiList.at (i).m_sbMeasResult; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
645 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
646 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
647 |
else |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
648 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
649 |
NS_LOG_ERROR (this << " CQI type unknown"); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
650 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
651 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
652 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
653 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
654 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
655 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
656 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
657 |
PfFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
658 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
659 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
660 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
661 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
662 |
std::map <uint16_t,uint8_t>::iterator it; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
663 |
int nflows = 0; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
664 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
665 |
for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
666 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
667 |
// remove old entries of this UE-LC |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
668 |
if ((*it).second > 0) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
669 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
670 |
nflows++; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
671 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
672 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
673 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
674 |
if (nflows==0) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
675 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
676 |
return ; // no flows to be scheduled |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
677 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
678 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
679 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
680 |
// Divide the resource equally among the active users |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
681 |
int rbPerFlow = m_cschedCellConfig.m_ulBandwidth / nflows; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
682 |
if (rbPerFlow == 0) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
683 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
684 |
rbPerFlow = 1; // at least 1 rbg per flow (till available resource) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
685 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
686 |
int rbAllocated = 0; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
687 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
688 |
FfMacSchedSapUser::SchedUlConfigIndParameters ret; |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
689 |
std::vector <uint16_t> rbgAllocationMap; |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
690 |
for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
691 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
692 |
if (rbAllocated + rbPerFlow > m_cschedCellConfig.m_ulBandwidth) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
693 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
694 |
// limit to physical resources last resource assignment |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
695 |
rbPerFlow = m_cschedCellConfig.m_ulBandwidth - rbAllocated; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
696 |
} |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
697 |
// store info on allocation for managing ul-cqi interpretation |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
698 |
for (int i = 0; i < rbPerFlow; i++) |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
699 |
{ |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
700 |
rbgAllocationMap.push_back ((*it).first); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
701 |
} |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
702 |
UlDciListElement_s uldci; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
703 |
uldci.m_rnti = (*it).first; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
704 |
uldci.m_rbStart = rbAllocated; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
705 |
uldci.m_rbLen = rbPerFlow; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
706 |
rbAllocated += rbPerFlow; |
7947 | 707 |
std::map <uint16_t, std::vector <double> >::iterator itCqi = m_ueCqi.find ((*it).first); |
708 |
if (itCqi == m_ueCqi.end ()) |
|
709 |
{ |
|
710 |
// no cqi info about this UE |
|
711 |
uldci.m_mcs = 0; // MCS 0 -> UL-AMC TBD |
|
712 |
//NS_LOG_DEBUG (this << " UE does not have ULCQI " << (*it).first ); |
|
713 |
} |
|
714 |
else |
|
715 |
{ |
|
716 |
// take the lowest CQI value (worst RB) |
|
717 |
double minSinr = (*itCqi).second.at(uldci.m_rbStart); |
|
718 |
for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++) |
|
719 |
{ |
|
720 |
//NS_LOG_DEBUG (this << " UE " << (*it).first << " has CQI " << (*itCqi).second.at(i)); |
|
721 |
if ((*itCqi).second.at(i) < minSinr) |
|
722 |
{ |
|
723 |
minSinr = (*itCqi).second.at(i); |
|
724 |
} |
|
725 |
} |
|
726 |
||
727 |
// translate SINR -> cqi: WILD ACK: same as DL |
|
728 |
double s = log2 ( 1 + ( |
|
729 |
pow (10, minSinr / 10 ) / |
|
730 |
( (-log (5.0 * 0.00005 )) / 1.5) )); |
|
731 |
int cqi = LteAmc::GetCqiFromSpectralEfficiency (s); |
|
7966
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
732 |
if (cqi == 0) |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
733 |
{ |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
734 |
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213) |
c2cfb1a64d66
LENA-72 CQI=0 behaviour
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7959
diff
changeset
|
735 |
} |
7947 | 736 |
uldci.m_mcs = LteAmc::GetMcsFromCqi (cqi); |
737 |
//NS_LOG_DEBUG (this << " UE " << (*it).first << " minsinr " << minSinr << " -> mcs " << (uint16_t)uldci.m_mcs); |
|
738 |
||
739 |
} |
|
740 |
uldci.m_tbSize = (LteAmc::GetTbSizeFromMcs (uldci.m_mcs, rbPerFlow) / 8); |
|
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
741 |
uldci.m_ndi = 1; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
742 |
uldci.m_cceIndex = 0; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
743 |
uldci.m_aggrLevel = 1; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
744 |
uldci.m_ueTxAntennaSelection = 3; // antenna selection OFF |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
745 |
uldci.m_hopping = false; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
746 |
uldci.m_n2Dmrs = 0; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
747 |
uldci.m_tpc = 0; // no power control |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
748 |
uldci.m_cqiRequest = false; // only period CQI at this stage |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
749 |
uldci.m_ulIndex = 0; // TDD parameter |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
750 |
uldci.m_dai = 1; // TDD parameter |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
751 |
uldci.m_freqHopping = 0; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
752 |
uldci.m_pdcchPowerOffset = 0; // not used |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
753 |
ret.m_dciList.push_back (uldci); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
754 |
} |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
755 |
m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> > (params.m_sfnSf, rbgAllocationMap)); |
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
756 |
m_schedSapUser->SchedUlConfigInd (ret); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
757 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
758 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
759 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
760 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
761 |
PfFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
762 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
763 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
764 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
765 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
766 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
767 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
768 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
769 |
PfFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
770 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
771 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
772 |
// TODO: Implementation of the API |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
773 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
774 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
775 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
776 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
777 |
PfFfMacScheduler::DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
778 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
779 |
NS_LOG_FUNCTION (this); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
780 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
781 |
std::map <uint16_t,uint8_t>::iterator it; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
782 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
783 |
for (unsigned int i = 0; i < params.m_macCeList.size (); i++) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
784 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
785 |
if ( params.m_macCeList.at (i).m_macCeType == MacCeListElement_s::BSR ) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
786 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
787 |
// buffer status report |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
788 |
uint16_t rnti = params.m_macCeList.at (i).m_rnti; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
789 |
it = m_ceBsrRxed.find(rnti); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
790 |
if (it==m_ceBsrRxed.end()) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
791 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
792 |
// create the new entry |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
793 |
uint8_t bsr = params.m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (0); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
794 |
m_ceBsrRxed.insert( std::pair<uint16_t, uint8_t > (rnti, bsr)); // only 1 buffer status is working now |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
795 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
796 |
else |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
797 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
798 |
// update the CQI value |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
799 |
(*it).second = params.m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (0); |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
800 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
801 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
802 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
803 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
804 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
805 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
806 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
807 |
void |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
808 |
PfFfMacScheduler::DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
809 |
{ |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
810 |
NS_LOG_FUNCTION (this); |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
811 |
//NS_LOG_DEBUG (this << " RX UL CQI at " << params.m_sfnSf); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
812 |
// correlate info on UL-CQIs with previous scheduling -> calculate m_sfnSf of transmission |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
813 |
uint32_t frameNo = (0xFF & params.m_sfnSf) >> 4; |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
814 |
uint32_t subframeNo = (0xF & params.m_sfnSf); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
815 |
//NS_LOG_DEBUG (this << " sfn " << frameNo << " sbfn " << subframeNo); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
816 |
if (subframeNo - m_schedTtiDelay < 0) |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
817 |
{ |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
818 |
frameNo--; |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
819 |
} |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
820 |
subframeNo = (subframeNo - m_schedTtiDelay) % 10; |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
821 |
//NS_LOG_DEBUG (this << " Actual sfn " << frameNo << " sbfn " << subframeNo); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
822 |
uint16_t sfnSf = ((0xFF & frameNo) << 4) | (0xF & subframeNo); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
823 |
// retrieve the allocation for this subframe |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
824 |
std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; |
7947 | 825 |
std::map <uint16_t, std::vector <double> >::iterator itCqi; |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
826 |
itMap = m_allocationMaps.find (sfnSf); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
827 |
if (itMap == m_allocationMaps.end()) |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
828 |
{ |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
829 |
NS_LOG_DEBUG (this << " Does not find info on allocation"); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
830 |
return; |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
831 |
} |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
832 |
for (uint32_t i = 0; i < (*itMap).second.size (); i++) |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
833 |
{ |
7947 | 834 |
// convert from fixed point notation Sxxxxxxxxxxx.xxx to double |
835 |
double sinr = LteFfConverter::fpS11dot3toDouble (params.m_ulCqi.m_sinr.at (i)); |
|
836 |
//NS_LOG_DEBUG (this << " UE " << (*itMap).second.at (i) << " SINRfp " << params.m_ulCqi.m_sinr.at (i) << " sinrdb " << sinr); |
|
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
837 |
itCqi = m_ueCqi.find ((*itMap).second.at (i)); |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
838 |
if (itCqi == m_ueCqi.end ()) |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
839 |
{ |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
840 |
// create a new entry |
7947 | 841 |
std::vector <double> newCqi; |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
842 |
for (uint32_t j = 0; j < m_cschedCellConfig.m_ulBandwidth; j++) |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
843 |
{ |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
844 |
if (i==j) |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
845 |
{ |
7947 | 846 |
newCqi.push_back (sinr); |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
847 |
} |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
848 |
else |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
849 |
{ |
7947 | 850 |
// initialize with minumum values according to the fixed point notation |
851 |
newCqi.push_back (LteFfConverter::getMinFpS11dot3Value ()); |
|
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
852 |
} |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
853 |
|
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
854 |
} |
7947 | 855 |
m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi)); |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
856 |
} |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
857 |
else |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
858 |
{ |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
859 |
// update the value |
7947 | 860 |
(*itCqi).second.at (i) = sinr; |
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
861 |
} |
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
862 |
|
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
863 |
} |
7948 | 864 |
// remove obsolete info on allocation |
865 |
m_allocationMaps.erase (m_allocationMaps.begin (), ++itMap); |
|
7943
db21a8048ab9
PfFfMacScheduler update reception of UL-CQI coherently with previous allocation
mmiozzo
parents:
7940
diff
changeset
|
866 |
|
7899
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
867 |
return; |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
868 |
} |
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
869 |
|
6cde5b6879e1
add missed file of pf-ff-mac-scheduler
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff
changeset
|
870 |
} |