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
33{
34 public:
36 ~AmpduSubframeHeader() override;
37
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
55 void SetLength(uint16_t length);
61 void SetEof(bool eof);
67 uint16_t GetLength() const;
73 bool GetEof() const;
81 bool IsSignatureValid() const;
82
83 private:
84 uint16_t m_length;
85 bool m_eof;
86 uint8_t m_signature;
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.