A Discrete-Event Network Simulator
API
wifi-default-assoc-manager.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022 Universita' degli Studi di Napoli Federico II
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: Stefano Avallone <stavallo@unina.it>
18  */
19 
20 #ifndef WIFI_DEFAULT_ASSOC_MANAGER_H
21 #define WIFI_DEFAULT_ASSOC_MANAGER_H
22 
23 #include "wifi-assoc-manager.h"
24 
25 namespace ns3
26 {
27 
28 class StaWifiMac;
29 
36 {
37  public:
42  static TypeId GetTypeId();
44  ~WifiDefaultAssocManager() override;
45 
46  void NotifyChannelSwitched(uint8_t linkId) override;
47  bool Compare(const StaWifiMac::ApInfo& lhs, const StaWifiMac::ApInfo& rhs) const override;
48 
49  protected:
50  void DoDispose() override;
51  bool CanBeInserted(const StaWifiMac::ApInfo& apInfo) const override;
52  bool CanBeReturned(const StaWifiMac::ApInfo& apInfo) const override;
53 
58  void EndScanning();
59 
60  private:
61  void DoStartScanning() override;
62 
69  void ChannelSwitchTimeout(uint8_t linkId);
70 
74 
77  {
81  };
82 
83  std::vector<ChannelSwitchInfo> m_channelSwitchInfo;
84 };
85 
86 } // namespace ns3
87 
88 #endif /* WIFI_DEFAULT_ASSOC_MANAGER_H */
An identifier for simulation events.
Definition: event-id.h:55
an EUI-48 address
Definition: mac48-address.h:46
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Abstract base class for the Association Manager, which manages scanning and association for single li...
Default wifi Association Manager.
void EndScanning()
Perform operations to do at the end of a scanning procedure, such as identifying the links to setup i...
void DoDispose() override
Destructor implementation.
EventId m_probeRequestEvent
probe request event
void DoStartScanning() override
Start a scanning procedure.
bool CanBeInserted(const StaWifiMac::ApInfo &apInfo) const override
Allow subclasses to choose whether the given ApInfo shall be considered and hence inserted in the sor...
Time m_channelSwitchTimeout
maximum delay for channel switching
void NotifyChannelSwitched(uint8_t linkId) override
Notify that the given link has completed channel switching.
bool Compare(const StaWifiMac::ApInfo &lhs, const StaWifiMac::ApInfo &rhs) const override
Compare two ApInfo objects for the purpose of keeping a sorted list of ApInfo objects.
EventId m_waitBeaconEvent
wait beacon event
static TypeId GetTypeId()
Get the type ID.
void ChannelSwitchTimeout(uint8_t linkId)
Take action upon the expiration of the timer set when requesting channel switch on the given link.
std::vector< ChannelSwitchInfo > m_channelSwitchInfo
per-link channel switch info
bool CanBeReturned(const StaWifiMac::ApInfo &apInfo) const override
Allow subclasses to choose whether the given ApInfo shall be returned or discarded when the STA wifi ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Struct to hold information regarding observed AP through active/passive scanning.
Definition: sta-wifi-mac.h:158