A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
25namespace ns3
26{
27
28class StaWifiMac;
29
30/**
31 * \ingroup wifi
32 *
33 * Default wifi Association Manager.
34 */
36{
37 public:
38 /**
39 * \brief Get the type ID.
40 * \return the object TypeId
41 */
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
54 /**
55 * Perform operations to do at the end of a scanning procedure, such as
56 * identifying the links to setup in case of 11be MLD devices.
57 */
58 void EndScanning();
59
60 private:
61 void DoStartScanning() override;
62
63 /**
64 * Take action upon the expiration of the timer set when requesting channel
65 * switch on the given link.
66 *
67 * \param linkId the ID of the given link
68 */
69 void ChannelSwitchTimeout(uint8_t linkId);
70
71 EventId m_waitBeaconEvent; ///< wait beacon event
72 EventId m_probeRequestEvent; ///< probe request event
73 Time m_channelSwitchTimeout; ///< maximum delay for channel switching
74
75 /** Channel switch info */
77 {
78 EventId timer; ///< timer
79 Mac48Address apLinkAddress; ///< AP link address
80 Mac48Address apMldAddress; ///< AP MLD address
81 };
82
83 std::vector<ChannelSwitchInfo> m_channelSwitchInfo; ///< per-link channel switch info
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:160