A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ap-emlsr-manager.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Universita' di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#include "ap-emlsr-manager.h"
10
11#include "eht-configuration.h"
13
14#include "ns3/abort.h"
15#include "ns3/ap-wifi-mac.h"
16#include "ns3/assert.h"
17#include "ns3/log.h"
18
19namespace ns3
20{
21
22NS_LOG_COMPONENT_DEFINE("ApEmlsrManager");
23
24NS_OBJECT_ENSURE_REGISTERED(ApEmlsrManager);
25
26TypeId
28{
29 static TypeId tid = TypeId("ns3::ApEmlsrManager").SetParent<Object>().SetGroupName("Wifi");
30 return tid;
31}
32
37
42
43void
50
51void
53{
54 NS_LOG_FUNCTION(this << mac);
55 NS_ASSERT(mac);
56 m_apMac = mac;
57
58 NS_ABORT_MSG_IF(!m_apMac->GetEhtConfiguration(), "ApEmlsrManager requires EHT support");
59 NS_ABORT_MSG_IF(m_apMac->GetNLinks() <= 1, "ApEmlsrManager can only be installed on MLDs");
60 NS_ABORT_MSG_IF(m_apMac->GetTypeOfStation() != AP,
61 "ApEmlsrManager can only be installed on AP MLDs");
62 DoSetWifiMac(mac);
63}
64
65void
70
73{
74 return m_apMac;
75}
76
78ApEmlsrManager::GetEhtFem(uint8_t linkId) const
79{
80 return StaticCast<EhtFrameExchangeManager>(m_apMac->GetFrameExchangeManager(linkId));
81}
82
83void
85{
86 NS_LOG_FUNCTION(this << linkId << *psdu);
87}
88
89void
91{
92 NS_LOG_FUNCTION(this << linkId << *psdu);
93}
94
95} // namespace ns3
virtual void DoSetWifiMac(Ptr< ApWifiMac > mac)
Allow subclasses to take actions when the MAC is set.
virtual void NotifyPsduRxError(uint8_t linkId, Ptr< const WifiPsdu > psdu)
This method is called when the reception of a PSDU fails on the given link.
virtual void NotifyPsduRxOk(uint8_t linkId, Ptr< const WifiPsdu > psdu)
This method is called when the reception of a PSDU succeeds on the given link.
Ptr< ApWifiMac > GetApMac() const
static TypeId GetTypeId()
Get the type ID.
Ptr< ApWifiMac > m_apMac
the MAC of the managed AP MLD
Ptr< EhtFrameExchangeManager > GetEhtFem(uint8_t linkId) const
void DoDispose() override
Destructor implementation.
void SetWifiMac(Ptr< ApWifiMac > mac)
Set the wifi MAC.
A base class which provides memory management and object aggregation.
Definition object.h:78
virtual void DoDispose()
Destructor implementation.
Definition object.cc:433
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition abort.h:97
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#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.
Definition object-base.h:35
@ AP
Definition wifi-mac.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T1 > StaticCast(const Ptr< T2 > &p)
Cast a Ptr.
Definition ptr.h:587