A Discrete-Event Network Simulator
API
ampdu-tag.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013
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  * Author: Ghada Badawy <gbadawy@gmail.com>
19  */
20 #ifndef AMPDU_TAG_H
21 #define AMPDU_TAG_H
22 
23 #include "ns3/packet.h"
24 
25 namespace ns3 {
26 
27 class Tag;
28 
35 class AmpduTag : public Tag
36 {
37 public:
38  static TypeId GetTypeId (void);
39  virtual TypeId GetInstanceTypeId (void) const;
40 
44  AmpduTag ();
48  void SetAmpdu (bool supported);
54  void SetNoOfMpdus (uint8_t noofmpdus);
55 
56  virtual void Serialize (TagBuffer i) const;
57  virtual void Deserialize (TagBuffer i);
58  virtual uint32_t GetSerializedSize () const;
59  virtual void Print (std::ostream &os) const;
60 
67  bool GetAmpdu (void) const;
73  uint8_t GetNoOfMpdus (void) const;
74 
75 private:
76  uint8_t m_ampdu;
77  uint8_t m_noOfMpdus;
78 };
79 
80 } // namespace ns3
81 
82 #endif /* AMPDU_TAG_H */
virtual void Print(std::ostream &os) const
Definition: ampdu-tag.cc:100
bool GetAmpdu(void) const
Definition: ampdu-tag.cc:88
virtual uint32_t GetSerializedSize() const
Definition: ampdu-tag.cc:68
void SetNoOfMpdus(uint8_t noofmpdus)
Definition: ampdu-tag.cc:61
void SetAmpdu(bool supported)
Set m_ampdu to 1.
Definition: ampdu-tag.cc:55
AmpduTag()
Create a AmpduTag with the default =0 no Ampdu.
Definition: ampdu-tag.cc:49
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:35
tag a set of bytes in a packet
Definition: tag.h:36
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: ampdu-tag.cc:44
virtual void Deserialize(TagBuffer i)
Definition: ampdu-tag.cc:81
uint8_t m_ampdu
Flag whether it is an A-MPDU.
Definition: ampdu-tag.h:76
read and write tag data
Definition: tag-buffer.h:51
virtual void Serialize(TagBuffer i) const
Definition: ampdu-tag.cc:74
uint8_t m_noOfMpdus
number of MPDUs in the A-MPDU
Definition: ampdu-tag.h:77
static TypeId GetTypeId(void)
Definition: ampdu-tag.cc:29
a unique identifier for an interface.
Definition: type-id.h:57
uint8_t GetNoOfMpdus(void) const
Definition: ampdu-tag.cc:94