LEFT | RIGHT |
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) 2007,2008 INRIA | 3 * Copyright (c) 2007,2008 INRIA |
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (iter->GetFecCodeType () == modulationType) | 131 if (iter->GetFecCodeType () == modulationType) |
132 { | 132 { |
133 return iter->GetUiuc (); | 133 return iter->GetUiuc (); |
134 } | 134 } |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 // burst profile got to be there in DCD/UCD, assuming always all profiles are
defined in DCD/UCD | 138 // burst profile got to be there in DCD/UCD, assuming always all profiles are
defined in DCD/UCD |
139 NS_FATAL_ERROR ("burst profile got to be there in DCD/UCD"); | 139 NS_FATAL_ERROR ("burst profile got to be there in DCD/UCD"); |
140 | 140 |
141 return (uint8_t)~0; | 141 return static_cast<uint8_t> (~0); |
142 } | 142 } |
143 | 143 |
144 uint8_t | 144 uint8_t |
145 BurstProfileManager::GetBurstProfileForSS (const SSRecord *ssRecord, | 145 BurstProfileManager::GetBurstProfileForSS (const SSRecord *ssRecord, |
146 const RngReq *rngreq, WimaxPhy::Modul
ationType &modulationType) | 146 const RngReq *rngreq, WimaxPhy::Modul
ationType &modulationType) |
147 { | 147 { |
148 /*during initial ranging or periodic ranging (or when RNG-REQ is used instead
of | 148 /*during initial ranging or periodic ranging (or when RNG-REQ is used instead
of |
149 DBPC) calculates the least robust burst profile for SS, e.g., based on distan
ce, | 149 DBPC) calculates the least robust burst profile for SS, e.g., based on distan
ce, |
150 power, signal etc, temporarily choosing same burst profile SS requested in RN
G-REQ*/ | 150 power, signal etc, temporarily choosing same burst profile SS requested in RN
G-REQ*/ |
151 | 151 |
152 modulationType = GetModulationTypeForSS (ssRecord, rngreq); | 152 modulationType = GetModulationTypeForSS (ssRecord, rngreq); |
153 return GetBurstProfile (modulationType, WimaxNetDevice::DIRECTION_DOWNLINK); | 153 return GetBurstProfile (modulationType, WimaxNetDevice::DIRECTION_DOWNLINK); |
154 } | 154 } |
155 | 155 |
156 WimaxPhy::ModulationType | 156 WimaxPhy::ModulationType |
157 BurstProfileManager::GetModulationTypeForSS (const SSRecord *ssRecord, const Rng
Req *rngreq) | 157 BurstProfileManager::GetModulationTypeForSS (const SSRecord *ssRecord, const Rng
Req *rngreq) |
158 { | 158 { |
159 NS_UNUSED(ssRecord); | 159 NS_UNUSED (ssRecord); |
160 return GetModulationType (rngreq->GetReqDlBurstProfile (), | 160 return GetModulationType (rngreq->GetReqDlBurstProfile (), |
161 WimaxNetDevice::DIRECTION_DOWNLINK); | 161 WimaxNetDevice::DIRECTION_DOWNLINK); |
162 } | 162 } |
163 | 163 |
164 uint8_t | 164 uint8_t |
165 BurstProfileManager::GetBurstProfileToRequest (void) | 165 BurstProfileManager::GetBurstProfileToRequest (void) |
166 { | 166 { |
167 /*modulation type is currently set by user in simulation script, shall | 167 /*modulation type is currently set by user in simulation script, shall |
168 actually be determined based on SS's distance, power, signal etc*/ | 168 actually be determined based on SS's distance, power, signal etc*/ |
169 | 169 |
170 return GetBurstProfile ( | 170 return GetBurstProfile ( |
171 m_device->GetObject<SubscriberStationNetDevice> ()->GetModulationType
(), | 171 m_device->GetObject<SubscriberStationNetDevice> ()->GetModulationType
(), |
172 WimaxNetDevice::DIRECTION_DOWNLINK); | 172 WimaxNetDevice::DIRECTION_DOWNLINK); |
173 } | 173 } |
174 | 174 |
175 } // namespace ns3 | 175 } // namespace ns3 |
LEFT | RIGHT |