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) 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 * The \c ExtendedSupportedRatesIE class (of which an instance exists | 126 * The \c ExtendedSupportedRatesIE class (of which an instance exists |
127 * in objects of this class) deals with rates beyond the first 8. | 127 * in objects of this class) deals with rates beyond the first 8. |
128 */ | 128 */ |
129 class SupportedRates : public WifiInformationElement | 129 class SupportedRates : public WifiInformationElement |
130 { | 130 { |
131 public: | 131 public: |
132 SupportedRates (); | 132 SupportedRates (); |
133 | 133 |
134 /// type conversion operator | 134 /// type conversion operator |
135 SupportedRates (const SupportedRates &); | 135 SupportedRates (const SupportedRates &); |
136 /// assignment operator | 136 /** |
137 SupportedRates& operator= (const SupportedRates&); | 137 * assignment operator |
| 138 * |
| 139 * \param rates the rates to assign |
| 140 * \returns the assigned value |
| 141 */ |
| 142 SupportedRates& operator= (const SupportedRates& rates); |
138 | 143 |
139 /** | 144 /** |
140 * This defines the maximum number of supported rates that a STA is | 145 * This defines the maximum number of supported rates that a STA is |
141 * allowed to have. Currently this number is set for IEEE 802.11b/g and SISO IEE
802.11n | 146 * allowed to have. Currently this number is set for IEEE 802.11b/g and SISO IEE
802.11n |
142 * stations which need 2 rates each from Clauses 15 and 18, and then 8 | 147 * stations which need 2 rates each from Clauses 15 and 18, and then 8 |
143 * from Clause 19. | 148 * from Clause 19. |
144 */ | 149 */ |
145 static const uint8_t MAX_SUPPORTED_RATES = 32; | 150 static const uint8_t MAX_SUPPORTED_RATES = 32; |
146 | 151 |
147 /** | 152 /** |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 */ | 205 */ |
201 uint8_t GetNRates (void) const; | 206 uint8_t GetNRates (void) const; |
202 /** | 207 /** |
203 * Return the rate at the given index. | 208 * Return the rate at the given index. |
204 * Return the rate (converted back to raw value) at the given index. | 209 * Return the rate (converted back to raw value) at the given index. |
205 * | 210 * |
206 * \param i the given index | 211 * \param i the given index |
207 * \return the rate | 212 * \return the rate |
208 */ | 213 */ |
209 uint32_t GetRate (uint8_t i) const; | 214 uint32_t GetRate (uint8_t i) const; |
210 | 215 /** |
| 216 * Get the ElementID. |
| 217 * |
| 218 * \returns the element ID |
| 219 */ |
211 WifiInformationElementId ElementId () const; | 220 WifiInformationElementId ElementId () const; |
| 221 /** |
| 222 * Get the information field size. |
| 223 * |
| 224 * \returns the information field size |
| 225 */ |
212 uint8_t GetInformationFieldSize () const; | 226 uint8_t GetInformationFieldSize () const; |
| 227 /** |
| 228 * Get the information field size. |
| 229 * |
| 230 * \param start the information field iterator |
| 231 */ |
213 void SerializeInformationField (Buffer::Iterator start) const; | 232 void SerializeInformationField (Buffer::Iterator start) const; |
| 233 /** |
| 234 * Get the information field size. |
| 235 * |
| 236 * \param start the information field iterator |
| 237 * \param length the size of the information field |
| 238 * \returns the size of the field read |
| 239 */ |
214 uint8_t DeserializeInformationField (Buffer::Iterator start, | 240 uint8_t DeserializeInformationField (Buffer::Iterator start, |
215 uint8_t length); | 241 uint8_t length); |
216 | 242 |
217 /* | 243 /** |
218 * We support the Extended Supported Rates Information Element | 244 * We support the Extended Supported Rates Information Element |
219 * through the ExtendedSupportedRatesIE object which is declared | 245 * through the ExtendedSupportedRatesIE object which is declared |
220 * above. We allow this class to be a friend so that it can access | 246 * above. We allow this class to be a friend so that it can access |
221 * our private data detailing the rates, and create an instance as | 247 * our private data detailing the rates, and create an instance as |
222 * extended. | 248 * extended. |
223 */ | 249 */ |
224 friend class ExtendedSupportedRatesIE; | 250 friend class ExtendedSupportedRatesIE; |
225 ExtendedSupportedRatesIE extended; //!< extended suppoted rates info element | 251 ExtendedSupportedRatesIE extended; //!< extended suppoted rates info element |
226 | 252 |
227 | 253 |
228 private: | 254 private: |
229 uint8_t m_nRates; //!< Number of supported rates | 255 uint8_t m_nRates; //!< Number of supported rates |
230 uint8_t m_rates[MAX_SUPPORTED_RATES]; //!< List of supported bitrate (divided
by 500000) | 256 uint8_t m_rates[MAX_SUPPORTED_RATES]; //!< List of supported bitrate (divided
by 500000) |
231 }; | 257 }; |
232 | 258 |
233 std::ostream &operator << (std::ostream &os, const SupportedRates &rates); | 259 std::ostream &operator << (std::ostream &os, const SupportedRates &rates); |
234 | 260 |
235 } //namespace ns3 | 261 } //namespace ns3 |
236 | 262 |
237 #endif /* SUPPORTED_RATES_H */ | 263 #endif /* SUPPORTED_RATES_H */ |
OLD | NEW |