A Discrete-Event Network Simulator
API
rr-multi-user-scheduler.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2020 Universita' degli Studi di Napoli Federico II
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Stefano Avallone <stavallo@unina.it>
19  */
20 
21 #ifndef RR_MULTI_USER_SCHEDULER_H
22 #define RR_MULTI_USER_SCHEDULER_H
23 
24 #include "multi-user-scheduler.h"
25 #include <list>
26 
27 namespace ns3 {
28 
43 {
44 public:
49  static TypeId GetTypeId (void);
51  virtual ~RrMultiUserScheduler ();
52 
53 protected:
54  void DoDispose (void) override;
55  void DoInitialize (void) override;
56 
57 private:
58  TxFormat SelectTxFormat (void) override;
59  DlMuInfo ComputeDlMuInfo (void) override;
60  UlMuInfo ComputeUlMuInfo (void) override;
61 
68  virtual TxFormat TrySendingBsrpTf (void);
69 
77  virtual TxFormat TrySendingBasicTf (void);
78 
87  virtual TxFormat TrySendingDlMuPpdu (void);
88 
95  void AssignRuIndices (WifiTxVector& txVector);
96 
103  void NotifyStationAssociated (uint16_t aid, Mac48Address address);
110  void NotifyStationDeassociated (uint16_t aid, Mac48Address address);
111 
115  struct MasterInfo
116  {
117  uint16_t aid;
119  double credits;
120  };
121 
125  typedef std::pair<std::list<MasterInfo>::iterator, Ptr<const WifiMacQueueItem>> CandidateInfo;
126 
127  uint8_t m_nStations;
133  uint32_t m_ulPsduSize;
134  std::map<AcIndex, std::list<MasterInfo>> m_staList;
135  std::list<CandidateInfo> m_candidates;
141 };
142 
143 } //namespace ns3
144 
145 #endif /* RR_MULTI_USER_SCHEDULER_H */
ns3::RrMultiUserScheduler::m_trigger
Ptr< WifiMacQueueItem > m_trigger
Trigger Frame to send.
Definition: rr-multi-user-scheduler.h:137
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::MultiUserScheduler::UlMuInfo
Information to be provided in case of UL MU transmission.
Definition: multi-user-scheduler.h:79
ns3::RrMultiUserScheduler::TrySendingBsrpTf
virtual TxFormat TrySendingBsrpTf(void)
Check if it is possible to send a BSRP Trigger Frame given the current time limits.
Definition: rr-multi-user-scheduler.cc:167
ns3::RrMultiUserScheduler::AssignRuIndices
void AssignRuIndices(WifiTxVector &txVector)
Assign an RU index to all the RUs allocated by the given TXVECTOR.
Definition: rr-multi-user-scheduler.cc:804
ns3::RrMultiUserScheduler::m_enableTxopSharing
bool m_enableTxopSharing
allow A-MPDUs of different TIDs in a DL MU PPDU
Definition: rr-multi-user-scheduler.h:128
ns3::RrMultiUserScheduler::DoInitialize
void DoInitialize(void) override
Initialize() implementation.
Definition: rr-multi-user-scheduler.cc:105
ns3::RrMultiUserScheduler::TrySendingDlMuPpdu
virtual TxFormat TrySendingDlMuPpdu(void)
Check if it is possible to send a DL MU PPDU given the current time limits.
Definition: rr-multi-user-scheduler.cc:502
ns3::MultiUserScheduler
MultiUserScheduler is an abstract base class defining the API that APs supporting at least VHT can us...
Definition: multi-user-scheduler.h:51
ns3::RrMultiUserScheduler::ComputeDlMuInfo
DlMuInfo ComputeDlMuInfo(void) override
Compute the information required to perform a DL MU transmission.
Definition: rr-multi-user-scheduler.cc:644
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
multi-user-scheduler.h
ns3::RrMultiUserScheduler::CandidateInfo
std::pair< std::list< MasterInfo >::iterator, Ptr< const WifiMacQueueItem > > CandidateInfo
Information stored for candidate stations.
Definition: rr-multi-user-scheduler.h:125
ns3::RrMultiUserScheduler::m_ulTriggerType
TriggerFrameType m_ulTriggerType
Trigger Frame type for UL MU.
Definition: rr-multi-user-scheduler.h:140
ns3::TriggerFrameType
TriggerFrameType
The different Trigger frame types.
Definition: ctrl-headers.h:561
ns3::RrMultiUserScheduler
RrMultiUserScheduler is a simple OFDMA scheduler that indicates to perform a DL OFDMA transmission if...
Definition: rr-multi-user-scheduler.h:43
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::RrMultiUserScheduler::m_forceDlOfdma
bool m_forceDlOfdma
return DL_OFDMA even if no DL MU PPDU was built
Definition: rr-multi-user-scheduler.h:129
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition: wifi-tx-vector.h:71
ns3::RrMultiUserScheduler::m_nStations
uint8_t m_nStations
Number of stations/slots to fill.
Definition: rr-multi-user-scheduler.h:127
ns3::WifiTxParameters
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
Definition: wifi-tx-parameters.h:45
ns3::RrMultiUserScheduler::MasterInfo::address
Mac48Address address
station's MAC Address
Definition: rr-multi-user-scheduler.h:118
ns3::RrMultiUserScheduler::SelectTxFormat
TxFormat SelectTxFormat(void) override
Select the format of the next transmission.
Definition: rr-multi-user-scheduler.cc:136
ns3::RrMultiUserScheduler::m_maxCredits
Time m_maxCredits
Max amount of credits a station can have.
Definition: rr-multi-user-scheduler.h:136
ns3::RrMultiUserScheduler::DoDispose
void DoDispose(void) override
Destructor implementation.
Definition: rr-multi-user-scheduler.cc:121
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::RrMultiUserScheduler::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: rr-multi-user-scheduler.cc:38
ns3::RrMultiUserScheduler::m_enableBsrp
bool m_enableBsrp
send a BSRP before an UL MU transmission
Definition: rr-multi-user-scheduler.h:131
ns3::RrMultiUserScheduler::MasterInfo::aid
uint16_t aid
station's AID
Definition: rr-multi-user-scheduler.h:117
ns3::RrMultiUserScheduler::ComputeUlMuInfo
UlMuInfo ComputeUlMuInfo(void) override
Prepare the information required to solicit an UL MU transmission.
Definition: rr-multi-user-scheduler.cc:853
ns3::MultiUserScheduler::DlMuInfo
Information to be provided in case of DL MU transmission.
Definition: multi-user-scheduler.h:72
ns3::RrMultiUserScheduler::MasterInfo::credits
double credits
credits accumulated by the station
Definition: rr-multi-user-scheduler.h:119
ns3::RrMultiUserScheduler::m_candidates
std::list< CandidateInfo > m_candidates
Candidate stations for MU TX.
Definition: rr-multi-user-scheduler.h:135
ns3::RrMultiUserScheduler::m_staList
std::map< AcIndex, std::list< MasterInfo > > m_staList
Per-AC list of stations (next to serve first)
Definition: rr-multi-user-scheduler.h:134
first.address
address
Definition: first.py:44
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::RrMultiUserScheduler::TrySendingBasicTf
virtual TxFormat TrySendingBasicTf(void)
Check if it is possible to send a Basic Trigger Frame given the current time limits.
Definition: rr-multi-user-scheduler.cc:252
ns3::RrMultiUserScheduler::RrMultiUserScheduler
RrMultiUserScheduler()
Definition: rr-multi-user-scheduler.cc:93
ns3::RrMultiUserScheduler::m_tbPpduDuration
Time m_tbPpduDuration
Duration of the solicited TB PPDUs.
Definition: rr-multi-user-scheduler.h:138
ns3::RrMultiUserScheduler::m_enableUlOfdma
bool m_enableUlOfdma
enable the scheduler to also return UL_OFDMA
Definition: rr-multi-user-scheduler.h:130
ns3::RrMultiUserScheduler::m_ulPsduSize
uint32_t m_ulPsduSize
the size in byte of the solicited PSDU
Definition: rr-multi-user-scheduler.h:133
ns3::RrMultiUserScheduler::m_txParams
WifiTxParameters m_txParams
TX parameters.
Definition: rr-multi-user-scheduler.h:139
ns3::RrMultiUserScheduler::~RrMultiUserScheduler
virtual ~RrMultiUserScheduler()
Definition: rr-multi-user-scheduler.cc:99
ns3::MultiUserScheduler::TxFormat
TxFormat
Enumeration of the possible transmission formats.
Definition: multi-user-scheduler.h:63
ns3::RrMultiUserScheduler::m_useCentral26TonesRus
bool m_useCentral26TonesRus
whether to allocate central 26-tone RUs
Definition: rr-multi-user-scheduler.h:132
ns3::RrMultiUserScheduler::NotifyStationDeassociated
void NotifyStationDeassociated(uint16_t aid, Mac48Address address)
Notify the scheduler that a station deassociated with the AP.
Definition: rr-multi-user-scheduler.cc:487
ns3::RrMultiUserScheduler::MasterInfo
Information used to sort stations.
Definition: rr-multi-user-scheduler.h:116
ns3::RrMultiUserScheduler::NotifyStationAssociated
void NotifyStationAssociated(uint16_t aid, Mac48Address address)
Notify the scheduler that a station associated with the AP.
Definition: rr-multi-user-scheduler.cc:473