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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#ifndef WIFI_DEFAULT_ASSOC_MANAGER_H
10#define WIFI_DEFAULT_ASSOC_MANAGER_H
11
12#include "wifi-assoc-manager.h"
13
14namespace ns3
15{
16
17class StaWifiMac;
18
19/**
20 * \ingroup wifi
21 *
22 * Default wifi Association Manager.
23 */
25{
26 public:
27 /**
28 * \brief Get the type ID.
29 * \return the object TypeId
30 */
31 static TypeId GetTypeId();
33 ~WifiDefaultAssocManager() override;
34
35 void NotifyChannelSwitched(uint8_t linkId) override;
36 bool Compare(const StaWifiMac::ApInfo& lhs, const StaWifiMac::ApInfo& rhs) const override;
37
38 protected:
39 void DoDispose() override;
40 bool CanBeInserted(const StaWifiMac::ApInfo& apInfo) const override;
41 bool CanBeReturned(const StaWifiMac::ApInfo& apInfo) const override;
42
43 /**
44 * Perform operations to do at the end of a scanning procedure, such as
45 * identifying the links to setup in case of 11be MLD devices.
46 */
47 void EndScanning();
48
49 private:
50 void DoStartScanning() override;
51
52 /**
53 * Take action upon the expiration of the timer set when requesting channel
54 * switch on the given link.
55 *
56 * \param linkId the ID of the given link
57 */
58 void ChannelSwitchTimeout(uint8_t linkId);
59
60 EventId m_waitBeaconEvent; ///< wait beacon event
61 EventId m_probeRequestEvent; ///< probe request event
62 Time m_channelSwitchTimeout; ///< maximum delay for channel switching
63
64 /** Channel switch info */
66 {
67 EventId timer; ///< timer
68 Mac48Address apLinkAddress; ///< AP link address
69 Mac48Address apMldAddress; ///< AP MLD address
70 };
71
72 std::vector<ChannelSwitchInfo> m_channelSwitchInfo; ///< per-link channel switch info
73};
74
75} // namespace ns3
76
77#endif /* WIFI_DEFAULT_ASSOC_MANAGER_H */
An identifier for simulation events.
Definition event-id.h:45
an EUI-48 address
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
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.