LEFT | RIGHT |
(no file at all) | |
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) 2006 INRIA | 3 * Copyright (c) 2006 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 * stations which need 2 rates each from Clauses 15 and 18, and then 8 | 146 * stations which need 2 rates each from Clauses 15 and 18, and then 8 |
147 * from Clause 19. | 147 * from Clause 19. |
148 */ | 148 */ |
149 static const uint8_t MAX_SUPPORTED_RATES = 32; | 149 static const uint8_t MAX_SUPPORTED_RATES = 32; |
150 | 150 |
151 /** | 151 /** |
152 * Add the given rate to the supported rates. | 152 * Add the given rate to the supported rates. |
153 * | 153 * |
154 * \param bs the rate to be added | 154 * \param bs the rate to be added |
155 */ | 155 */ |
156 void AddSupportedRate (uint32_t bs); | 156 void AddSupportedRate (uint64_t bs); |
157 /** | 157 /** |
158 * Set the given rate to basic rates. | 158 * Set the given rate to basic rates. |
159 * | 159 * |
160 * \param bs the rate to be set | 160 * \param bs the rate to be set |
161 */ | 161 */ |
162 void SetBasicRate (uint32_t bs); | 162 void SetBasicRate (uint64_t bs); |
163 /** | 163 /** |
164 * Add a special value to the supported rate set, corresponding to | 164 * Add a special value to the supported rate set, corresponding to |
165 * a BSS membership selector | 165 * a BSS membership selector |
166 * | 166 * |
167 * \param bs the special membership selector value (not a valid rate) | 167 * \param bs the special membership selector value (not a valid rate) |
168 */ | 168 */ |
169 void AddBssMembershipSelectorRate (uint32_t bs); | 169 void AddBssMembershipSelectorRate (uint32_t bs); |
170 /** | 170 /** |
171 * Check if the given rate is supported. The rate is encoded as it is | 171 * Check if the given rate is supported. The rate is encoded as it is |
172 * serialized to the Supported Rates Information Element (i.e. as a | 172 * serialized to the Supported Rates Information Element (i.e. as a |
173 * multiple of 500 Kbits/sec, possibly with MSB set to 1). | 173 * multiple of 500 Kbits/sec, possibly with MSB set to 1). |
174 * | 174 * |
175 * \param bs the rate to be checked | 175 * \param bs the rate to be checked |
176 * | 176 * |
177 * \return true if the rate is supported, false otherwise | 177 * \return true if the rate is supported, false otherwise |
178 */ | 178 */ |
179 bool IsSupportedRate (uint32_t bs) const; | 179 bool IsSupportedRate (uint64_t bs) const; |
180 /** | 180 /** |
181 * Check if the given rate is a basic rate. The rate is encoded as it is | 181 * Check if the given rate is a basic rate. The rate is encoded as it is |
182 * serialized to the Supported Rates Information Element (i.e. as a | 182 * serialized to the Supported Rates Information Element (i.e. as a |
183 * multiple of 500 Kbits/sec, with MSB set to 1). | 183 * multiple of 500 Kbits/sec, with MSB set to 1). |
184 * | 184 * |
185 * \param bs the rate to be checked | 185 * \param bs the rate to be checked |
186 * | 186 * |
187 * \return true if the rate is a basic rate, false otherwise | 187 * \return true if the rate is a basic rate, false otherwise |
188 */ | 188 */ |
189 bool IsBasicRate (uint32_t bs) const; | 189 bool IsBasicRate (uint64_t bs) const; |
190 /** | 190 /** |
191 * Check if the given rate is a BSS membership selector value. The rate | 191 * Check if the given rate is a BSS membership selector value. The rate |
192 * is encoded as it is serialized to the Supporting Rates Information | 192 * is encoded as it is serialized to the Supporting Rates Information |
193 * Element (i.e. with the MSB set to 1). | 193 * Element (i.e. with the MSB set to 1). |
194 * | 194 * |
195 * \param bs the rate to be checked | 195 * \param bs the rate to be checked |
196 * | 196 * |
197 * \return true if the rate is a BSS membership selector, false otherwise | 197 * \return true if the rate is a BSS membership selector, false otherwise |
198 */ | 198 */ |
199 bool IsBssMembershipSelectorRate (uint32_t bs) const; | 199 bool IsBssMembershipSelectorRate (uint64_t bs) const; |
200 /** | 200 /** |
201 * Return the number of supported rates. | 201 * Return the number of supported rates. |
202 * | 202 * |
203 * \return the number of supported rates | 203 * \return the number of supported rates |
204 */ | 204 */ |
205 uint8_t GetNRates (void) const; | 205 uint8_t GetNRates (void) const; |
206 /** | 206 /** |
207 * Return the rate at the given index. | 207 * Return the rate at the given index. |
208 * Return the rate (converted back to raw value) at the given index. | 208 * Return the rate (converted back to raw value) at the given index. |
209 * | 209 * |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 private: | 253 private: |
254 uint8_t m_nRates; //!< Number of supported rates | 254 uint8_t m_nRates; //!< Number of supported rates |
255 uint8_t m_rates[MAX_SUPPORTED_RATES]; //!< List of supported bitrate (divided
by 500000) | 255 uint8_t m_rates[MAX_SUPPORTED_RATES]; //!< List of supported bitrate (divided
by 500000) |
256 }; | 256 }; |
257 | 257 |
258 std::ostream &operator << (std::ostream &os, const SupportedRates &rates); | 258 std::ostream &operator << (std::ostream &os, const SupportedRates &rates); |
259 | 259 |
260 } //namespace ns3 | 260 } //namespace ns3 |
261 | 261 |
262 #endif /* SUPPORTED_RATES_H */ | 262 #endif /* SUPPORTED_RATES_H */ |
LEFT | RIGHT |