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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Ghada Badawy <gbadawy@gmail.com>
7 */
8
9#ifndef AMPDU_SUBFRAME_HEADER_H
10#define AMPDU_SUBFRAME_HEADER_H
11
12#include "ns3/header.h"
13
14namespace ns3
15{
16
17/**
18 * @ingroup wifi
19 * @brief Headers for A-MPDU subframes
20 */
22{
23 public:
25 ~AmpduSubframeHeader() override;
26
27 /**
28 * @brief Get the type ID.
29 * @return the object TypeId
30 */
31 static TypeId GetTypeId();
32
33 TypeId GetInstanceTypeId() const override;
34 void Print(std::ostream& os) const override;
35 uint32_t GetSerializedSize() const override;
36 void Serialize(Buffer::Iterator start) const override;
38
39 /**
40 * Set the length field.
41 *
42 * @param length in bytes
43 */
44 void SetLength(uint16_t length);
45 /**
46 * Set the EOF field.
47 *
48 * @param eof set EOF field if true
49 */
50 void SetEof(bool eof);
51 /**
52 * Return the length field.
53 *
54 * @return the length field in bytes
55 */
56 uint16_t GetLength() const;
57 /**
58 * Return the EOF field.
59 *
60 * @return the EOF field
61 */
62 bool GetEof() const;
63 /**
64 * Return whether the pattern stored in the delimiter
65 * signature field is correct, i.e. corresponds to the
66 * unique pattern 0x4E.
67 *
68 * @return true if the signature is valid, false otherwise
69 */
70 bool IsSignatureValid() const;
71
72 private:
73 uint16_t m_length; //!< length field in bytes
74 bool m_eof; //!< EOF field
75 uint8_t m_signature; //!< delimiter signature (should correspond to pattern 0x4E in order to be
76 //!< assumed valid)
77};
78
79} // namespace ns3
80
81#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:89
Protocol header serialization and deserialization.
Definition header.h:33
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.