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 * Authors: Ghada Badawy <gbadawy@gmail.com>
19 * S├ębastien Deronne <sebastien.deronne@gmail.com>
20 */
21
22#ifndef AMPDU_TAG_H
23#define AMPDU_TAG_H
24
25#include "ns3/nstime.h"
26#include "ns3/tag.h"
27
28namespace ns3 {
29
36class AmpduTag : public Tag
37{
38public:
43 static TypeId GetTypeId (void);
44
45 TypeId GetInstanceTypeId (void) 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 (void) const;
80
81
82private:
83 uint8_t m_nbOfMpdus;
85};
86
87} //namespace ns3
88
89#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
uint8_t GetRemainingNbOfMpdus(void) const
Definition: ampdu-tag.cc:88
static TypeId GetTypeId(void)
Get the type ID.
Definition: ampdu-tag.cc:29
uint32_t GetSerializedSize() const override
Definition: ampdu-tag.cc:65
AmpduTag()
Create a AmpduTag with the default =0 no A-MPDU.
Definition: ampdu-tag.cc:45
TypeId GetInstanceTypeId(void) const override
Get the most derived TypeId for this Object.
Definition: ampdu-tag.cc:40
void SetRemainingNbOfMpdus(uint8_t nbOfMpdus)
Definition: ampdu-tag.cc:52
Time m_duration
Remaining duration of the A-MPDU.
Definition: ampdu-tag.h:84
void Deserialize(TagBuffer i) override
Definition: ampdu-tag.cc:79
void SetRemainingAmpduDuration(Time duration)
Definition: ampdu-tag.cc:58
void Serialize(TagBuffer i) const override
Definition: ampdu-tag.cc:71
Time GetRemainingAmpduDuration(void) const
Definition: ampdu-tag.cc:94
void Print(std::ostream &os) const override
Definition: ampdu-tag.cc:100
uint8_t m_nbOfMpdus
Remaining number of MPDUs in the A-MPDU.
Definition: ampdu-tag.h:83
read and write tag data
Definition: tag-buffer.h:52
tag a set of bytes in a packet
Definition: tag.h:37
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.