A Discrete-Event Network Simulator
API
ampdu-tag.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Authors: Ghada Badawy <gbadawy@gmail.com>
18  * Sébastien Deronne <sebastien.deronne@gmail.com>
19  */
20 
21 #ifndef AMPDU_TAG_H
22 #define AMPDU_TAG_H
23 
24 #include "ns3/nstime.h"
25 #include "ns3/tag.h"
26 
27 namespace ns3
28 {
29 
36 class AmpduTag : public Tag
37 {
38  public:
43  static TypeId GetTypeId();
44 
45  TypeId GetInstanceTypeId() const override;
46  void Serialize(TagBuffer i) const override;
47  void Deserialize(TagBuffer i) override;
48  uint32_t GetSerializedSize() const override;
49  void Print(std::ostream& os) const override;
50 
54  AmpduTag();
60  void SetRemainingNbOfMpdus(uint8_t nbOfMpdus);
66  void SetRemainingAmpduDuration(Time duration);
67 
73  uint8_t GetRemainingNbOfMpdus() const;
80 
81  private:
82  uint8_t m_nbOfMpdus;
84 };
85 
86 } // namespace ns3
87 
88 #endif /* AMPDU_TAG_H */
The aim of the AmpduTag is to provide means for a MAC to specify that a packet includes A-MPDU since ...
Definition: ampdu-tag.h:37
uint32_t GetSerializedSize() const override
Definition: ampdu-tag.cc:62
AmpduTag()
Create a AmpduTag with the default =0 no A-MPDU.
Definition: ampdu-tag.cc:42
void SetRemainingNbOfMpdus(uint8_t nbOfMpdus)
Definition: ampdu-tag.cc:49
Time m_duration
Remaining duration of the A-MPDU.
Definition: ampdu-tag.h:83
static TypeId GetTypeId()
Get the type ID.
Definition: ampdu-tag.cc:29
Time GetRemainingAmpduDuration() const
Definition: ampdu-tag.cc:91
void Deserialize(TagBuffer i) override
Definition: ampdu-tag.cc:76
void SetRemainingAmpduDuration(Time duration)
Definition: ampdu-tag.cc:55
void Serialize(TagBuffer i) const override
Definition: ampdu-tag.cc:68
void Print(std::ostream &os) const override
Definition: ampdu-tag.cc:97
uint8_t GetRemainingNbOfMpdus() const
Definition: ampdu-tag.cc:85
uint8_t m_nbOfMpdus
Remaining number of MPDUs in the A-MPDU.
Definition: ampdu-tag.h:82
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: ampdu-tag.cc:37
read and write tag data
Definition: tag-buffer.h:52
tag a set of bytes in a packet
Definition: tag.h:39
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.