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 ();
42  void SetPcfSupported (uint8_t pcfSupported);
43 
53  uint8_t GetInformationFieldSize () const;
65  uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
66 
72  uint8_t GetCFPCount (void) const;
78  uint8_t GetCFPPeriod (void) const;
84  uint64_t GetCFPMaxDurationUs (void) const;
90  uint64_t GetCFPDurRemainingUs (void) const;
91 
97  void SetCFPCount (uint8_t cfpcount);
103  void SetCFPPeriod (uint8_t cfpperiod);
109  void SetCFPMaxDurationUs (uint64_t cfpmaxduration);
115  void SetCFPDurRemainingUs (uint64_t cfpdurremaining);
116 
133  uint16_t GetSerializedSize () const;
134 
135 
136 private:
137  uint8_t m_CFPCount;
138  uint8_t m_CFPPeriod;
139  uint64_t m_CFPMaxDuration;
140  uint64_t m_CFPDurRemaining;
141 
143  uint8_t m_pcfSupported;
144 };
145 
146 std::ostream &operator << (std::ostream &os, const CfParameterSet &cfParameterSet);
147 
148 } //namespace ns3
149 
150 #endif /* CF_PARAMETER_SET_H */
def start()
Definition: core.py:1858
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void SetCFPDurRemainingUs(uint64_t cfpdurremaining)
Set the CFP MaxDuration in microseconds.
uint8_t GetCFPCount(void) const
Return the CFP Count in DTIM frames unit.
WifiInformationElementId ElementId() const
Element ID function.
void SetCFPCount(uint8_t cfpcount)
Set the CFP Count in DTIM frames unit.
iterator in a Buffer instance
Definition: buffer.h:98
uint64_t m_CFPDurRemaining
CFP DurRemaining.
uint64_t GetCFPMaxDurationUs(void) const
Return the CFP MaxDuration 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.
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.
void SetCFPPeriod(uint8_t cfpperiod)
Set the CFP Period in DTIM frames unit.
void SetCFPMaxDurationUs(uint64_t cfpmaxduration)
Set the CFP MaxDuration in microseconds.
uint64_t m_CFPMaxDuration
CFP MaxDuration.
uint64_t GetCFPDurRemainingUs(void) const
Return the CFP DurRemaining in microseconds.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information field function.
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize information field function.
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
This information element is a bit special in that it is only included if the STA is a QoS STA...
uint8_t GetInformationFieldSize() const
Get information field size function.