A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-default-gcr-manager.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 DERONNE SOFTWARE ENGINEERING
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7 */
8
10
11#include "ap-wifi-mac.h"
12
13#include "ns3/log.h"
14
15namespace ns3
16{
17
18NS_LOG_COMPONENT_DEFINE("WifiDefaultGcrManager");
19
20NS_OBJECT_ENSURE_REGISTERED(WifiDefaultGcrManager);
21
22TypeId
24{
25 static TypeId tid = TypeId("ns3::WifiDefaultGcrManager")
27 .SetGroupName("Wifi")
28 .AddConstructor<WifiDefaultGcrManager>();
29 return tid;
30}
31
36
41
44 const Mac48Address& /* groupAddress */) const
45{
46 /*
47 * 802.11-2020: 10.23.2.12.2 Unsolicited retry procedure:
48 * When using a protection mechanism that requires a response from another STA,
49 * the AP should select a STA that is a member of the GCR group.
50 * For now, we assume all associated GCR-capable STAs are part of the GCR group,
51 * hence we pick the first STA from the list held by the AP.
52 */
53 NS_ASSERT(!m_staMembers.empty());
54 return *m_staMembers.cbegin();
55}
56
57} // namespace ns3
GcrManager is a base class defining the API to handle 802.11aa GCR.
Definition gcr-manager.h:49
GcrMembers m_staMembers
the list of STA members (assume currently each member is part of all group)
an EUI-48 address
a unique identifier for an interface.
Definition type-id.h:49
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
WifiDefaultGcrManager is the default implementation for groupcast with retries GCR,...
Mac48Address GetIndividuallyAddressedRecipient(const Mac48Address &groupcastAddress) const override
Get the MAC address of the individually addressed recipient to use for a groupcast frame or for a pro...
static TypeId GetTypeId()
Get the type ID.
#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_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
Every class exported by the ns3 library is enclosed in the ns3 namespace.