A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ampdu-subframe-header.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 * Author: Ghada Badawy <gbadawy@gmail.com>
18 */
19
20#ifndef AMPDU_SUBFRAME_HEADER_H
21#define AMPDU_SUBFRAME_HEADER_H
22
23#include "ns3/header.h"
24
25namespace ns3
26{
27
28/**
29 * \ingroup wifi
30 * \brief Headers for A-MPDU subframes
31 */
33{
34 public:
36 ~AmpduSubframeHeader() override;
37
38 /**
39 * \brief Get the type ID.
40 * \return the object TypeId
41 */
42 static TypeId GetTypeId();
43
44 TypeId GetInstanceTypeId() const override;
45 void Print(std::ostream& os) const override;
46 uint32_t GetSerializedSize() const override;
47 void Serialize(Buffer::Iterator start) const override;
49
50 /**
51 * Set the length field.
52 *
53 * \param length in bytes
54 */
55 void SetLength(uint16_t length);
56 /**
57 * Set the EOF field.
58 *
59 * \param eof set EOF field if true
60 */
61 void SetEof(bool eof);
62 /**
63 * Return the length field.
64 *
65 * \return the length field in bytes
66 */
67 uint16_t GetLength() const;
68 /**
69 * Return the EOF field.
70 *
71 * \return the EOF field
72 */
73 bool GetEof() const;
74 /**
75 * Return whether the pattern stored in the delimiter
76 * signature field is correct, i.e. corresponds to the
77 * unique pattern 0x4E.
78 *
79 * \return true if the signature is valid, false otherwise
80 */
81 bool IsSignatureValid() const;
82
83 private:
84 uint16_t m_length; //!< length field in bytes
85 bool m_eof; //!< EOF field
86 uint8_t m_signature; //!< delimiter signature (should correspond to pattern 0x4E in order to be
87 //!< assumed valid)
88};
89
90} // namespace ns3
91
92#endif /* AMPDU_SUBFRAME_HEADER_H */
Headers for A-MPDU subframes.
uint32_t Deserialize(Buffer::Iterator start) override
uint16_t m_length
length field in bytes
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetEof(bool eof)
Set the EOF field.
bool IsSignatureValid() const
Return whether the pattern stored in the delimiter signature field is correct, i.e.
void SetLength(uint16_t length)
Set the length field.
uint16_t GetLength() const
Return the length field.
bool GetEof() const
Return the EOF field.
uint32_t GetSerializedSize() const override
static TypeId GetTypeId()
Get the type ID.
uint8_t m_signature
delimiter signature (should correspond to pattern 0x4E in order to be assumed valid)
void Print(std::ostream &os) const override
void Serialize(Buffer::Iterator start) const override
iterator in a Buffer instance
Definition: buffer.h:100
Protocol header serialization and deserialization.
Definition: header.h:44
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.