A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ampdu-tag.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Ghada Badawy <gbadawy@gmail.com>
7 * Sébastien Deronne <sebastien.deronne@gmail.com>
8 */
9
10#ifndef AMPDU_TAG_H
11#define AMPDU_TAG_H
12
13#include "ns3/nstime.h"
14#include "ns3/tag.h"
15
16namespace ns3
17{
18
19/**
20 * \ingroup wifi
21 *
22 * The aim of the AmpduTag is to provide means for a MAC to specify that a packet includes A-MPDU
23 * since this is done in HT-SIG and there is no HT-SIG representation in ns-3
24 */
25class AmpduTag : public Tag
26{
27 public:
28 /**
29 * \brief Get the type ID.
30 * \return the object TypeId
31 */
32 static TypeId GetTypeId();
33
34 TypeId GetInstanceTypeId() const override;
35 void Serialize(TagBuffer i) const override;
36 void Deserialize(TagBuffer i) override;
37 uint32_t GetSerializedSize() const override;
38 void Print(std::ostream& os) const override;
39
40 /**
41 * Create a AmpduTag with the default =0 no A-MPDU
42 */
43 AmpduTag();
44 /**
45 * \param nbOfMpdus the remaining number of MPDUs
46 *
47 * Set the remaining number of MPDUs in the A-MPDU.
48 */
49 void SetRemainingNbOfMpdus(uint8_t nbOfMpdus);
50 /**
51 * \param duration the remaining duration of the A-MPDU
52 *
53 * Set the remaining duration of the A-MPDU.
54 */
55 void SetRemainingAmpduDuration(Time duration);
56
57 /**
58 * \return the remaining number of MPDUs in an A-MPDU
59 *
60 * Returns the remaining number of MPDUs in an A-MPDU
61 */
62 uint8_t GetRemainingNbOfMpdus() const;
63 /**
64 * \return the remaining duration of an A-MPDU
65 *
66 * Returns the remaining duration of an A-MPDU
67 */
69
70 private:
71 uint8_t m_nbOfMpdus; //!< Remaining number of MPDUs in the A-MPDU
72 Time m_duration; //!< Remaining duration of the A-MPDU
73};
74
75} // namespace ns3
76
77#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:26
uint32_t GetSerializedSize() const override
Definition ampdu-tag.cc:51
AmpduTag()
Create a AmpduTag with the default =0 no A-MPDU.
Definition ampdu-tag.cc:31
void SetRemainingNbOfMpdus(uint8_t nbOfMpdus)
Definition ampdu-tag.cc:38
Time m_duration
Remaining duration of the A-MPDU.
Definition ampdu-tag.h:72
static TypeId GetTypeId()
Get the type ID.
Definition ampdu-tag.cc:18
Time GetRemainingAmpduDuration() const
Definition ampdu-tag.cc:80
void Deserialize(TagBuffer i) override
Definition ampdu-tag.cc:65
void SetRemainingAmpduDuration(Time duration)
Definition ampdu-tag.cc:44
void Serialize(TagBuffer i) const override
Definition ampdu-tag.cc:57
void Print(std::ostream &os) const override
Definition ampdu-tag.cc:86
uint8_t GetRemainingNbOfMpdus() const
Definition ampdu-tag.cc:74
uint8_t m_nbOfMpdus
Remaining number of MPDUs in the A-MPDU.
Definition ampdu-tag.h:71
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition ampdu-tag.cc:26
read and write tag data
Definition tag-buffer.h:41
tag a set of bytes in a packet
Definition tag.h:28
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.