A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
mac-tx-middle.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005, 2009 INRIA
3
* Copyright (c) 2009 MIRKO BANCHI
4
*
5
* SPDX-License-Identifier: GPL-2.0-only
6
*
7
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
8
* Mirko Banchi <mk.banchi@gmail.com>
9
*/
10
11
#ifndef MAC_TX_MIDDLE_H
12
#define MAC_TX_MIDDLE_H
13
14
#include "ns3/simple-ref-count.h"
15
16
#include <map>
17
18
namespace
ns3
19
{
20
21
class
WifiMacHeader;
22
class
Mac48Address;
23
24
/**
25
* \ingroup wifi
26
*
27
* Handles sequence numbering of IEEE 802.11 data frames
28
*/
29
class
MacTxMiddle
:
public
SimpleRefCount
<MacTxMiddle>
30
{
31
public
:
32
MacTxMiddle
();
33
~MacTxMiddle
();
34
35
/**
36
* Return the next sequence number for the given header.
37
*
38
* \param hdr Wi-Fi header
39
* \return the next sequence number
40
*/
41
uint16_t
GetNextSequenceNumberFor
(
const
WifiMacHeader
* hdr);
42
/**
43
* Return the next sequence number for the Traffic ID and destination, but do not pick it (i.e.
44
* the current sequence number remains unchanged). This functions is used for A-MPDU
45
* aggregation.
46
*
47
* \param hdr Wi-Fi header
48
* \return the next sequence number
49
*/
50
uint16_t
PeekNextSequenceNumberFor
(
const
WifiMacHeader
* hdr);
51
/**
52
* Return the next sequence number for the Traffic ID and destination.
53
*
54
* \param tid Traffic ID
55
* \param addr destination address
56
* \return the next sequence number
57
*/
58
uint16_t
GetNextSeqNumberByTidAndAddress
(uint8_t tid,
Mac48Address
addr)
const
;
59
/**
60
* Set the sequence number of the given MAC header as the next sequence
61
* number for the Traffic ID and destination of the given MAC header.
62
*
63
* \param hdr the given MAC header
64
*/
65
void
SetSequenceNumberFor
(
const
WifiMacHeader
* hdr);
66
67
private
:
68
std::map<Mac48Address, uint16_t*>
m_qosSequences
;
///< QOS sequences
69
uint16_t
m_sequence
;
///< current sequence number
70
};
71
72
}
// namespace ns3
73
74
#endif
/* MAC_TX_MIDDLE_H */
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:35
ns3::MacTxMiddle
Handles sequence numbering of IEEE 802.11 data frames.
Definition
mac-tx-middle.h:30
ns3::MacTxMiddle::~MacTxMiddle
~MacTxMiddle()
Definition
mac-tx-middle.cc:29
ns3::MacTxMiddle::SetSequenceNumberFor
void SetSequenceNumberFor(const WifiMacHeader *hdr)
Set the sequence number of the given MAC header as the next sequence number for the Traffic ID and de...
Definition
mac-tx-middle.cc:117
ns3::MacTxMiddle::m_qosSequences
std::map< Mac48Address, uint16_t * > m_qosSequences
QOS sequences.
Definition
mac-tx-middle.h:68
ns3::MacTxMiddle::m_sequence
uint16_t m_sequence
current sequence number
Definition
mac-tx-middle.h:69
ns3::MacTxMiddle::GetNextSeqNumberByTidAndAddress
uint16_t GetNextSeqNumberByTidAndAddress(uint8_t tid, Mac48Address addr) const
Return the next sequence number for the Traffic ID and destination.
Definition
mac-tx-middle.cc:103
ns3::MacTxMiddle::GetNextSequenceNumberFor
uint16_t GetNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
Definition
mac-tx-middle.cc:39
ns3::MacTxMiddle::PeekNextSequenceNumberFor
uint16_t PeekNextSequenceNumberFor(const WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i....
Definition
mac-tx-middle.cc:77
ns3::MacTxMiddle::MacTxMiddle
MacTxMiddle()
Definition
mac-tx-middle.cc:23
ns3::SimpleRefCount
A template-based reference counting class.
Definition
simple-ref-count.h:70
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition
wifi-mac-header.h:87
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
mac-tx-middle.h
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0