22#include "ns3/boolean.h"
23#include "ns3/channel-access-manager.h"
25#include "ns3/wifi-mpdu.h"
26#include "ns3/wifi-phy.h"
39 TypeId(
"ns3::DefaultEmlsrManager")
43 .AddAttribute(
"SwitchAuxPhy",
44 "Whether Aux PHY should switch channel to operate on the link on which "
45 "the Main PHY was operating before moving to the link of the Aux PHY.",
73 NS_ASSERT_MSG(linkId,
"Link on which the main PHY is operating not found");
82 NS_ASSERT_MSG(linkId,
"Link on which the main PHY is operating not found");
107 NS_LOG_DEBUG(
"Aux PHY (" << auxPhy <<
") is about to switch to " << newAuxPhyChannel
108 <<
" to operate on link " << +currLinkId);
AttributeValue implementation for Boolean.
void NotifySwitchingEmlsrLink(Ptr< WifiPhy > phy, const WifiPhyOperatingChannel &channel, uint8_t linkId)
Notify that the given PHY is about to switch to the given operating channel, which is used by the giv...
DefaultEmlsrManager is the default EMLSR manager.
void DoNotifyMgtFrameReceived(Ptr< const WifiMpdu > mpdu, uint8_t linkId) override
Notify the subclass of the reception of a management frame addressed to us.
void NotifyEmlsrModeChanged() override
Notify subclass that EMLSR mode changed.
bool m_switchAuxPhy
whether Aux PHY should switch channel to operate on the link on which the Main PHY was operating befo...
static TypeId GetTypeId()
Get the type ID.
std::optional< uint8_t > ResendNotification(Ptr< const WifiMpdu > mpdu) override
A previous EML Operating Mode Notification frame was dropped.
void NotifyMainPhySwitch(uint8_t currLinkId, uint8_t nextLinkId) override
Notify subclass that the main PHY is switching channel to operate on another link.
~DefaultEmlsrManager() override
uint8_t GetLinkToSendEmlOmn() override
EmlsrManager is an abstract base class defining the API that EHT non-AP MLDs with EMLSR activated can...
uint8_t m_mainPhyId
ID of main PHY (position in the vector of PHYs held by WifiNetDevice)
Ptr< StaWifiMac > GetStaMac() const
const WifiPhyOperatingChannel & GetChannelForAuxPhy(uint8_t linkId) const
Smart pointer class similar to boost::intrusive_ptr.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
std::optional< uint8_t > GetLinkForPhy(Ptr< const WifiPhy > phy) const
Get the ID of the link (if any) on which the given PHY is operating.
Ptr< ChannelAccessManager > GetChannelAccessManager(uint8_t linkId=SINGLE_LINK_OP_ID) const
Get the Channel Access Manager associated with the given link.
void SetOperatingChannel(const ChannelTuple &channelTuple)
If the standard for this object has not been set yet, store the given channel settings.
Class that keeps track of all information about the current PHY operating channel.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Ptr< const AttributeChecker > MakeBooleanChecker()
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.