/usr/include/ns3.26/ns3/edca-parameter-set.h is in libns3-dev 3.26+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016 Sébastien Deronne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
*/
#ifndef EDCA_PARAMETER_SET_H
#define EDCA_PARAMETER_SET_H
#include <stdint.h>
#include <ostream>
#include "ns3/buffer.h"
#include "ns3/wifi-information-element.h"
namespace ns3 {
/**
* \brief The EDCA Parameter Set
* \ingroup wifi
*
* This class knows how to serialise and deserialise the EDCA Parameter Set.
*/
class EdcaParameterSet : public WifiInformationElement
{
public:
EdcaParameterSet ();
void SetQosSupported (uint8_t qosSupported);
/**
* Set the QoS Info field in the EdcaParameterSet information element.
*
* \param qosInfo the QoS Info field in the EdcaParameterSet information element
*/
void SetQosInfo (uint8_t qosInfo);
/**
* Set the AC_BE AIFSN field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BE AIFSN field in the EdcaParameterSet information element
*/
void SetBeAifsn (uint8_t aifsn);
/**
* Set the AC_BE ACM field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BE ACM field in the EdcaParameterSet information element
*/
void SetBeAcm (uint8_t acm);
/**
* Set the AC_BE ACI field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BE ACI field in the EdcaParameterSet information element
*/
void SetBeAci (uint8_t aci);
/**
* Set the AC_BE CWmin field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BE CWmin field in the EdcaParameterSet information element
*/
void SetBeCWmin (uint8_t cwMin);
/**
* Set the AC_BE CWmax field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BE CWmax field in the EdcaParameterSet information element
*/
void SetBeCWmax (uint8_t cwMax);
/**
* Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BE TXOP Limit field in the EdcaParameterSet information element
*/
void SetBeTXOPLimit (uint16_t txop);
/**
* Set the AC_BK AIFSN field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BB AIFSN field in the EdcaParameterSet information element
*/
void SetBkAifsn (uint8_t aifsn);
/**
* Set the AC_BK ACM field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BK ACM field in the EdcaParameterSet information element
*/
void SetBkAcm (uint8_t acm);
/**
* Set the AC_BK ACI field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BK ACI field in the EdcaParameterSet information element
*/
void SetBkAci (uint8_t aci);
/**
* Set the AC_BK CWmin field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BK CWmin field in the EdcaParameterSet information element
*/
void SetBkCWmin (uint8_t cwMin);
/**
* Set the AC_BK CWmax field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BK CWmax field in the EdcaParameterSet information element
*/
void SetBkCWmax (uint8_t cwMax);
/**
* Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
*
* \param aifsn the AC_BK TXOP Limit field in the EdcaParameterSet information element
*/
void SetBkTXOPLimit (uint16_t txop);
/**
* Set the AC_VI AIFSN field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VI AIFSN field in the EdcaParameterSet information element
*/
void SetViAifsn (uint8_t aifsn);
/**
* Set the AC_VI ACM field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VI ACM field in the EdcaParameterSet information element
*/
void SetViAcm (uint8_t acm);
/**
* Set the AC_VI ACI field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VI ACI field in the EdcaParameterSet information element
*/
void SetViAci (uint8_t aci);
/**
* Set the AC_VI CWmin field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VI CWmin field in the EdcaParameterSet information element
*/
void SetViCWmin (uint8_t cwMin);
/**
* Set the AC_VI CWmax field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VI CWmax field in the EdcaParameterSet information element
*/
void SetViCWmax (uint8_t cwMax);
/**
* Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VI TXOP Limit field in the EdcaParameterSet information element
*/
void SetViTXOPLimit (uint16_t txop);
/**
* Set the AC_VO AIFSN field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VO AIFSN field in the EdcaParameterSet information element
*/
void SetVoAifsn (uint8_t aifsn);
/**
* Set the AC_VO ACM field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VO ACM field in the EdcaParameterSet information element
*/
void SetVoAcm (uint8_t acm);
/**
* Set the AC_VO ACI field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VO ACI field in the EdcaParameterSet information element
*/
void SetVoAci (uint8_t aci);
/**
* Set the AC_VO CWmin field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VO CWmin field in the EdcaParameterSet information element
*/
void SetVoCWmin (uint8_t cwMin);
/**
* Set the AC_VO CWmax field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VO CWmax field in the EdcaParameterSet information element
*/
void SetVoCWmax (uint8_t cwMax);
/**
* Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
*
* \param aifsn the AC_VO TXOP Limit field in the EdcaParameterSet information element
*/
void SetVoTXOPLimit (uint16_t txop);
/*
* Return the QoS Info field in the EdcaParameterSet information element.
*
* \return the QoS Info field in the EdcaParameterSet information element
*/
uint8_t GetQosInfo (void) const;
/*
* Return the AC_BE AIFSN field in the EdcaParameterSet information element.
*
* \return the AC_BE AIFSN field in the EdcaParameterSet information element
*/
uint8_t GetBeAifsn (void) const;
/*
* Return the AC_BE ACM field in the EdcaParameterSet information element.
*
* \return the AC_BE ACM field in the EdcaParameterSet information element
*/
uint8_t GetBeAcm (void) const;
/*
* Return the AC_BE ACI field in the EdcaParameterSet information element.
*
* \return the AC_BE ACI field in the EdcaParameterSet information element
*/
uint8_t GetBeAci (void) const;
/*
* Return the AC_BE CWmin field in the EdcaParameterSet information element.
*
* \return the AC_BE CWmin field in the EdcaParameterSet information element
*/
uint8_t GetBeCWmin (void) const;
/*
* Return the AC_BE CWmax field in the EdcaParameterSet information element.
*
* \return the AC_BE CWmax field in the EdcaParameterSet information element
*/
uint8_t GetBeCWmax (void) const;
/*
* Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
*
* \return the AC_BE TXOP Limit field in the EdcaParameterSet information element
*/
uint16_t GetBeTXOPLimit (void) const;
/*
* Return the AC_BK AIFSN field in the EdcaParameterSet information element.
*
* \return the AC_BK AIFSN field in the EdcaParameterSet information element
*/
uint8_t GetBkAifsn (void) const;
/*
* Return the AC_BK ACM field in the EdcaParameterSet information element.
*
* \return the AC_BK ACM field in the EdcaParameterSet information element
*/
uint8_t GetBkAcm (void) const;
/*
* Return the AC_BK ACI field in the EdcaParameterSet information element.
*
* \return the AC_BK ACI field in the EdcaParameterSet information element
*/
uint8_t GetBkAci (void) const;
/*
* Return the AC_BK CWmin field in the EdcaParameterSet information element.
*
* \return the AC_BK CWmin field in the EdcaParameterSet information element
*/
uint8_t GetBkCWmin (void) const;
/*
* Return the AC_BK CWmax field in the EdcaParameterSet information element.
*
* \return the AC_BK CWmax field in the EdcaParameterSet information element
*/
uint8_t GetBkCWmax (void) const;
/*
* Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
*
* \return the AC_BK TXOP Limit field in the EdcaParameterSet information element
*/
uint16_t GetBkTXOPLimit (void) const;
/*
* Return the AC_VI AIFSN field in the EdcaParameterSet information element.
*
* \return the AC_VI AIFSN field in the EdcaParameterSet information element
*/
uint8_t GetViAifsn (void) const;
/*
* Return the AC_VI ACM field in the EdcaParameterSet information element.
*
* \return the AC_VI ACM field in the EdcaParameterSet information element
*/
uint8_t GetViAcm (void) const;
/*
* Return the AC_VI ACI field in the EdcaParameterSet information element.
*
* \return the AC_VI ACI field in the EdcaParameterSet information element
*/
uint8_t GetViAci (void) const;
/*
* Return the AC_VI CWmin field in the EdcaParameterSet information element.
*
* \return the AC_VI CWmin field in the EdcaParameterSet information element
*/
uint8_t GetViCWmin (void) const;
/*
* Return the AC_VI CWmax field in the EdcaParameterSet information element.
*
* \return the AC_VI CWmax field in the EdcaParameterSet information element
*/
uint8_t GetViCWmax (void) const;
/*
* Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
*
* \return the AC_VI TXOP Limit field in the EdcaParameterSet information element
*/
uint16_t GetViTXOPLimit (void) const;
/*
* Return the AC_VO AIFSN field in the EdcaParameterSet information element.
*
* \return the AC_VO AIFSN field in the EdcaParameterSet information element
*/
uint8_t GetVoAifsn (void) const;
/*
* Return the AC_VO ACM field in the EdcaParameterSet information element.
*
* \return the AC_VO ACM field in the EdcaParameterSet information element
*/
uint8_t GetVoAcm (void) const;
/*
* Return the AC_VO ACI field in the EdcaParameterSet information element.
*
* \return the AC_VO ACI field in the EdcaParameterSet information element
*/
uint8_t GetVoAci (void) const;
/*
* Return the AC_VO CWmin field in the EdcaParameterSet information element.
*
* \return the AC_VO CWmin field in the EdcaParameterSet information element
*/
uint8_t GetVoCWmin (void) const;
/*
* Return the AC_VO CWmax field in the EdcaParameterSet information element.
*
* \return the AC_VO CWmax field in the EdcaParameterSet information element
*/
uint8_t GetVoCWmax (void) const;
/*
* Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
*
* \return the AC_VO TXOP Limit field in the EdcaParameterSet information element
*/
uint16_t GetVoTXOPLimit (void) const;
WifiInformationElementId ElementId () const;
uint8_t GetInformationFieldSize () const;
void SerializeInformationField (Buffer::Iterator start) const;
uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
/**
* This information element is a bit special in that it is only
* included if the STA is a QoS STA. To support this we
* override the Serialize and GetSerializedSize methods of
* WifiInformationElement.
*
* \param start
*
* \return an iterator
*/
Buffer::Iterator Serialize (Buffer::Iterator start) const;
/**
* Return the serialized size of this EDCA Parameter Set.
*
* \return the serialized size of this EDCA Parameter Set
*/
uint16_t GetSerializedSize () const;
private:
uint8_t m_qosInfo;
uint8_t m_reserved;
uint32_t m_acBE;
uint32_t m_acBK;
uint32_t m_acVI;
uint32_t m_acVO;
//This is used to decide whether this element should be added to the frame or not
bool m_qosSupported;
};
std::ostream &operator << (std::ostream &os, const EdcaParameterSet &edcaParameterSet);
std::istream &operator >> (std::istream &is, EdcaParameterSet &edcaParameterSet);
ATTRIBUTE_HELPER_HEADER (EdcaParameterSet);
} //namespace ns3
#endif /* EDCA_PARAMETER_SET_H */
|