OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2014 Piotr Gawlowicz | 3 * Copyright (c) 2014 Piotr Gawlowicz |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ns3/boolean.h" | 27 #include "ns3/boolean.h" |
28 #include <ns3/double.h> | 28 #include <ns3/double.h> |
29 #include <cfloat> | 29 #include <cfloat> |
30 | 30 |
31 namespace ns3 { | 31 namespace ns3 { |
32 | 32 |
33 NS_LOG_COMPONENT_DEFINE ("LteFfrEnhancedAlgorithm"); | 33 NS_LOG_COMPONENT_DEFINE ("LteFfrEnhancedAlgorithm"); |
34 | 34 |
35 NS_OBJECT_ENSURE_REGISTERED (LteFfrEnhancedAlgorithm); | 35 NS_OBJECT_ENSURE_REGISTERED (LteFfrEnhancedAlgorithm); |
36 | 36 |
| 37 /// Spectral efficency for CQI table |
37 static const double SpectralEfficiencyForCqi[16] = { | 38 static const double SpectralEfficiencyForCqi[16] = { |
38 0.0, // out of range | 39 0.0, // out of range |
39 0.15, 0.23, 0.38, 0.6, 0.88, 1.18, | 40 0.15, 0.23, 0.38, 0.6, 0.88, 1.18, |
40 1.48, 1.91, 2.41, | 41 1.48, 1.91, 2.41, |
41 2.73, 3.32, 3.9, 4.52, 5.12, 5.55 | 42 2.73, 3.32, 3.9, 4.52, 5.12, 5.55 |
42 }; | 43 }; |
43 | 44 |
| 45 /// FfrEnhancedDownlinkDefaultConfiguration structure |
44 static const struct FfrEnhancedDownlinkDefaultConfiguration | 46 static const struct FfrEnhancedDownlinkDefaultConfiguration |
45 { | 47 { |
46 uint8_t cellId; | 48 uint8_t cellId; ///< cell ID |
47 uint8_t dlBandwidth; | 49 uint8_t dlBandwidth; ///< DL bandwidth |
48 uint8_t dlSubBandOffset; | 50 uint8_t dlSubBandOffset; ///< DL subband offset |
49 uint8_t dlReuse3SubBandwidth; | 51 uint8_t dlReuse3SubBandwidth; ///< reuse 3 subbandwidth |
50 uint8_t dlReuse1SubBandwidth; | 52 uint8_t dlReuse1SubBandwidth; ///< reuse 1 subbandwidth |
51 } g_ffrEnhancedDownlinkDefaultConfiguration[] = { | 53 } g_ffrEnhancedDownlinkDefaultConfiguration[] = { |
52 { 1, 25, 0, 4, 4}, | 54 { 1, 25, 0, 4, 4}, |
53 { 2, 25, 8, 4, 4}, | 55 { 2, 25, 8, 4, 4}, |
54 { 3, 25, 16, 4, 4}, | 56 { 3, 25, 16, 4, 4}, |
55 { 1, 50, 0, 9, 6}, | 57 { 1, 50, 0, 9, 6}, |
56 { 2, 50, 15, 9, 6}, | 58 { 2, 50, 15, 9, 6}, |
57 { 3, 50, 30, 9, 6}, | 59 { 3, 50, 30, 9, 6}, |
58 { 1, 75, 0, 8, 16}, | 60 { 1, 75, 0, 8, 16}, |
59 { 2, 75, 24, 8, 16}, | 61 { 2, 75, 24, 8, 16}, |
60 { 3, 75, 48, 8, 16}, | 62 { 3, 75, 48, 8, 16}, |
61 { 1, 100, 0, 16, 16}, | 63 { 1, 100, 0, 16, 16}, |
62 { 2, 100, 32, 16, 16}, | 64 { 2, 100, 32, 16, 16}, |
63 { 3, 100, 64, 16, 16} | 65 { 3, 100, 64, 16, 16} |
64 }; | 66 }; ///< the enhanced downlink default configation |
65 | 67 |
| 68 /// FfrEnhancedUplinkDefaultConfiguration structure |
66 static const struct FfrEnhancedUplinkDefaultConfiguration | 69 static const struct FfrEnhancedUplinkDefaultConfiguration |
67 { | 70 { |
68 uint8_t cellId; | 71 uint8_t cellId; ///< cell ID |
69 uint8_t ulBandwidth; | 72 uint8_t ulBandwidth; ///< UL bandwidth |
70 uint8_t ulSubBandOffset; | 73 uint8_t ulSubBandOffset; ///< UL subband offset |
71 uint8_t ulReuse3SubBandwidth; | 74 uint8_t ulReuse3SubBandwidth; ///< UL reuse 3 subbandwidth |
72 uint8_t ulReuse1SubBandwidth; | 75 uint8_t ulReuse1SubBandwidth; ///< UL reuse 1 subbandwidth |
73 } g_ffrEnhancedUplinkDefaultConfiguration[] = { | 76 } g_ffrEnhancedUplinkDefaultConfiguration[] = { |
74 { 1, 25, 0, 4, 4}, | 77 { 1, 25, 0, 4, 4}, |
75 { 2, 25, 8, 4, 4}, | 78 { 2, 25, 8, 4, 4}, |
76 { 3, 25, 16, 4, 4}, | 79 { 3, 25, 16, 4, 4}, |
77 { 1, 50, 0, 9, 6}, | 80 { 1, 50, 0, 9, 6}, |
78 { 2, 50, 15, 9, 6}, | 81 { 2, 50, 15, 9, 6}, |
79 { 3, 50, 30, 9, 6}, | 82 { 3, 50, 30, 9, 6}, |
80 { 1, 75, 0, 8, 16}, | 83 { 1, 75, 0, 8, 16}, |
81 { 2, 75, 24, 8, 16}, | 84 { 2, 75, 24, 8, 16}, |
82 { 3, 75, 48, 8, 16}, | 85 { 3, 75, 48, 8, 16}, |
83 { 1, 100, 0, 16, 16}, | 86 { 1, 100, 0, 16, 16}, |
84 { 2, 100, 32, 16, 16}, | 87 { 2, 100, 32, 16, 16}, |
85 { 3, 100, 64, 16, 16} | 88 { 3, 100, 64, 16, 16} |
86 }; | 89 }; ///< the enhanced uplink default configuration |
87 | 90 |
| 91 /// number of downlink configurations |
88 const uint16_t NUM_DOWNLINK_CONFS (sizeof (g_ffrEnhancedDownlinkDefaultConfigura
tion) / sizeof (FfrEnhancedDownlinkDefaultConfiguration)); | 92 const uint16_t NUM_DOWNLINK_CONFS (sizeof (g_ffrEnhancedDownlinkDefaultConfigura
tion) / sizeof (FfrEnhancedDownlinkDefaultConfiguration)); |
| 93 /// number of uplink configurations |
89 const uint16_t NUM_UPLINK_CONFS (sizeof (g_ffrEnhancedUplinkDefaultConfiguration
) / sizeof (FfrEnhancedUplinkDefaultConfiguration)); | 94 const uint16_t NUM_UPLINK_CONFS (sizeof (g_ffrEnhancedUplinkDefaultConfiguration
) / sizeof (FfrEnhancedUplinkDefaultConfiguration)); |
90 | 95 |
91 | 96 |
92 LteFfrEnhancedAlgorithm::LteFfrEnhancedAlgorithm () | 97 LteFfrEnhancedAlgorithm::LteFfrEnhancedAlgorithm () |
93 : m_ffrSapUser (0), | 98 : m_ffrSapUser (0), |
94 m_ffrRrcSapUser (0), | 99 m_ffrRrcSapUser (0), |
95 m_measId (0) | 100 m_measId (0) |
96 { | 101 { |
97 NS_LOG_FUNCTION (this); | 102 NS_LOG_FUNCTION (this); |
98 m_ffrSapProvider = new MemberLteFfrSapProvider<LteFfrEnhancedAlgorithm> (this)
; | 103 m_ffrSapProvider = new MemberLteFfrSapProvider<LteFfrEnhancedAlgorithm> (this)
; |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 } | 904 } |
900 } | 905 } |
901 void | 906 void |
902 LteFfrEnhancedAlgorithm::DoRecvLoadInformation (EpcX2Sap::LoadInformationParams
params) | 907 LteFfrEnhancedAlgorithm::DoRecvLoadInformation (EpcX2Sap::LoadInformationParams
params) |
903 { | 908 { |
904 NS_LOG_FUNCTION (this); | 909 NS_LOG_FUNCTION (this); |
905 NS_LOG_WARN ("Method should not be called, because it is empty"); | 910 NS_LOG_WARN ("Method should not be called, because it is empty"); |
906 } | 911 } |
907 | 912 |
908 } // end of namespace ns3 | 913 } // end of namespace ns3 |
OLD | NEW |