A Discrete-Event Network Simulator
API
cf-parameter-set.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015
4  *
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
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Sébastien Deronne <sebastien.deronne@gmail.com>
19  */
20 
21 #ifndef CF_PARAMETER_SET_H
22 #define CF_PARAMETER_SET_H
23 
24 #include "ns3/wifi-information-element.h"
25 
26 namespace ns3 {
27 
35 {
36 public:
37  CfParameterSet ();
38 
39  // Implementations of pure virtual methods of WifiInformationElement
41  uint8_t GetInformationFieldSize () const;
43  uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
44  /* This information element is a bit special in that it is only
45  included if the STA is a QoS STA. To support this we
46  override the Serialize and GetSerializedSize methods of
47  WifiInformationElement. */
49  uint16_t GetSerializedSize () const;
50 
55  void SetPcfSupported (uint8_t pcfSupported);
56 
62  uint8_t GetCFPCount (void) const;
68  uint8_t GetCFPPeriod (void) const;
74  uint64_t GetCFPMaxDurationUs (void) const;
80  uint64_t GetCFPDurRemainingUs (void) const;
81 
87  void SetCFPCount (uint8_t count);
93  void SetCFPPeriod (uint8_t period);
99  void SetCFPMaxDurationUs (uint64_t maxDuration);
105  void SetCFPDurRemainingUs (uint64_t durRemaining);
106 
107 
108 private:
109  uint8_t m_CFPCount;
110  uint8_t m_CFPPeriod;
111  uint64_t m_CFPMaxDuration;
112  uint64_t m_CFPDurRemaining;
113 
115  uint8_t m_pcfSupported;
116 };
117 
126 std::ostream &operator << (std::ostream &os, const CfParameterSet &cfParameterSet);
127 
128 } //namespace ns3
129 
130 #endif /* CF_PARAMETER_SET_H */
def start()
Definition: core.py:1855
uint16_t GetSerializedSize() const
uint8_t GetCFPCount(void) const
Return the CFP Count in DTIM frames unit.
WifiInformationElementId ElementId() const
void SetCFPDurRemainingUs(uint64_t durRemaining)
Set the remaining CFP duration in microseconds.
iterator in a Buffer instance
Definition: buffer.h:98
void SetCFPPeriod(uint8_t period)
Set the CFP Period in DTIM frames unit.
uint64_t m_CFPDurRemaining
CFP remaining duration in microseconds.
uint64_t GetCFPMaxDurationUs(void) const
Return the maximum CFP duration in microseconds.
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
uint8_t m_CFPPeriod
CFP Period.
uint8_t GetCFPPeriod(void) const
Return the CFP Period in DTIM frames unit.
The CF Parameter SetThis class knows how to serialise and deserialise the CF Parameter Set...
void SetPcfSupported(uint8_t pcfSupported)
Set PCF supported function.
void SetCFPMaxDurationUs(uint64_t maxDuration)
Set the maximum CFP duration in microseconds.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t m_pcfSupported
This is used to decide if this element should be added to the frame or not.
uint64_t m_CFPMaxDuration
CFP maximum duration in microseconds.
uint64_t GetCFPDurRemainingUs(void) const
Return the remaining CFP duration in microseconds.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
void SetCFPCount(uint8_t count)
Set the CFP Count in DTIM frames unit.
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
uint8_t m_CFPCount
CFP Count.
Buffer::Iterator Serialize(Buffer::Iterator start) const
uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...