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) 2009 IITP RAS | 3 * Copyright (c) 2009 IITP RAS |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual void Print (std::ostream &os) const; | 61 virtual void Print (std::ostream &os) const; |
62 | 62 |
63 /** | 63 /** |
64 * \brief Needed when you try to deserialize a lonely IE inside other header | 64 * \brief Needed when you try to deserialize a lonely IE inside other header |
65 * | 65 * |
66 * \param start is the start of the buffer | 66 * \param start is the start of the buffer |
67 * | 67 * |
68 * \return deserialized bytes | 68 * \return deserialized bytes |
69 */ | 69 */ |
70 virtual uint32_t DeserializeSingleIe (Buffer::Iterator start); | 70 virtual uint32_t DeserializeSingleIe (Buffer::Iterator start); |
71 /// Set maximum size to control overflow of the max packet length | 71 /** |
| 72 * Set maximum size to control overflow of the max packet length |
| 73 * |
| 74 * \param size the maximum size to set |
| 75 */ |
72 void SetMaxSize (uint16_t size); | 76 void SetMaxSize (uint16_t size); |
73 /// As soon as this is a vector, we define an Iterator | 77 /// As soon as this is a vector, we define an Iterator |
74 typedef std::vector<Ptr<WifiInformationElement> >::iterator Iterator; | 78 typedef std::vector<Ptr<WifiInformationElement> >::iterator Iterator; |
75 /// Returns Begin of the vector | 79 /** |
| 80 * Returns Begin of the vector |
| 81 * \returns the begin of the vector |
| 82 */ |
76 Iterator Begin (); | 83 Iterator Begin (); |
77 /// Returns End of the vector | 84 /** |
| 85 * Returns End of the vector |
| 86 * \returns the end of the vector |
| 87 */ |
78 Iterator End (); | 88 Iterator End (); |
79 /// add an IE, if maxSize has exceeded, returns false | 89 /** |
| 90 * add an IE, if maxSize has exceeded, returns false |
| 91 * |
| 92 * \param element wifi information element to add |
| 93 * \returns true is added |
| 94 */ |
80 bool AddInformationElement (Ptr<WifiInformationElement> element); | 95 bool AddInformationElement (Ptr<WifiInformationElement> element); |
81 /// vector of pointers to information elements is the body of IeVector | 96 /** |
| 97 * vector of pointers to information elements is the body of IeVector |
| 98 * |
| 99 * \param id the element id to find |
| 100 * \returns the information element |
| 101 */ |
82 Ptr<WifiInformationElement> FindFirst (WifiInformationElementId id) const; | 102 Ptr<WifiInformationElement> FindFirst (WifiInformationElementId id) const; |
83 | 103 |
84 /** | 104 /** |
85 * Check if the given WifiInformationElementVectors are equivalent. | 105 * Check if the given WifiInformationElementVectors are equivalent. |
86 * | 106 * |
87 * \param a another WifiInformationElementVector | 107 * \param a another WifiInformationElementVector |
88 * | 108 * |
89 * \return true if the given WifiInformationElementVectors are equivalent, | 109 * \return true if the given WifiInformationElementVectors are equivalent, |
90 * false otherwise | 110 * false otherwise |
91 */ | 111 */ |
92 virtual bool operator== (const WifiInformationElementVector & a) const; | 112 virtual bool operator== (const WifiInformationElementVector & a) const; |
93 | 113 |
94 | 114 |
95 protected: | 115 protected: |
96 /** | 116 /** |
97 * typedef for a vector of WifiInformationElements. | 117 * typedef for a vector of WifiInformationElements. |
98 */ | 118 */ |
99 typedef std::vector<Ptr<WifiInformationElement> > IE_VECTOR; | 119 typedef std::vector<Ptr<WifiInformationElement> > IE_VECTOR; |
100 /// Current number of bytes | 120 /** |
| 121 * Current number of bytes |
| 122 * \returns the number of bytes |
| 123 */ |
101 uint32_t GetSize () const; | 124 uint32_t GetSize () const; |
102 IE_VECTOR m_elements; //!< Information element vector | 125 IE_VECTOR m_elements; //!< Information element vector |
103 /// Size in bytes (actually, max packet length) | 126 /// Size in bytes (actually, max packet length) |
104 uint16_t m_maxSize; | 127 uint16_t m_maxSize; |
105 }; | 128 }; |
106 | 129 |
107 } //namespace ns3 | 130 } //namespace ns3 |
108 | 131 |
109 #endif /* WIFI_INFORMATION_ELEMENT_VECTOR_H */ | 132 #endif /* WIFI_INFORMATION_ELEMENT_VECTOR_H */ |
OLD | NEW |