16#include "ns3/uinteger.h"
34 .AddAttribute(
"RetransmissionPolicy",
35 "The retransmission policy to use for group addresses.",
49 "Protection mode used for groupcast frames when needed: "
50 "Rts-Cts or Cts-To-Self",
57 .AddAttribute(
"UnsolicitedRetryLimit",
58 "The maximum number of transmission attempts of a frame delivered using "
59 "the GCR unsolicited retry retransmission policy.",
63 .AddAttribute(
"GcrConcealmentAddress",
64 "The GCR concealment address.",
73 : m_unsolicitedRetryCounter{0}
99 "GcrManager can only be installed on QoS APs");
112 "GCR service is only for QoS groupcast data frames");
138 NS_ASSERT_MSG(address.IsGroup(),
"The concealment address should be a group address");
152 "GCR service is only for QoS groupcast data frames");
154 "GCR service is not enabled");
176 "GCR service is only for QoS groupcast data frames");
178 "GCR service is not enabled");
182 return !mpdu->GetHeader().IsRetry() && !
m_nonGcrStas.empty();
184 if (!
m_mpdu || !mpdu->GetHeader().IsRetry())
188 NS_LOG_DEBUG(
"First groupcast transmission using No-Ack/No-Retry");
249 const std::set<Mac48Address>& groupAddressList)
Hold variables of type enum.
Mac48Address m_gcrConcealmentAddress
GCR concealment address.
const GcrMembers & GetMemberStasForGroupAddress(const Mac48Address &groupAddress) const
Get the list of MAC addresses of member STAs for a given group address.
NonGcrStas m_nonGcrStas
the list of non-GCR capable STAs
void SetGcrConcealmentAddress(const Mac48Address &address)
Set the GCR concealment address.
void NotifyStaAssociated(const Mac48Address &staAddress, bool isGcrCapable)
This function notifies a STA is associated.
GcrMembers m_staMembers
the list of STA members (assume currently each member is part of all group)
void DoDispose() override
Destructor implementation.
Ptr< ApWifiMac > m_apMac
the MAC of the AP
static TypeId GetTypeId()
Get the type ID.
Ptr< WifiMpdu > m_mpdu
current MPDU being retransmitted
uint8_t m_unsolicitedRetryCounter
the unsolicited retry counter
void NotifyGroupMembershipChanged(const Mac48Address &staAddress, const std::set< Mac48Address > &groupAddressList)
This function adds a STA as a member of zero or more group addresses.
GroupAddressRetransmissionPolicy m_retransmissionPolicy
retransmission policy
void NotifyStaDeassociated(const Mac48Address &staAddress)
This function deletes a STA as a member of any group addresses.
std::unordered_set< Mac48Address, WifiAddressHash > GcrMembers
MAC addresses of member STAs of a GCR group.
const Mac48Address & GetGcrConcealmentAddress() const
Get the GCR concealment address.
uint8_t m_gcrUnsolicitedRetryLimit
GCR Unsolicited Retry Limit.
GroupAddressRetransmissionPolicy GetRetransmissionPolicyFor(const WifiMacHeader &header) const
Get the retransmission policy to use to transmit a given group addressed packet.
GroupcastProtectionMode m_gcrProtectionMode
Protection mode for groupcast frames.
bool UseConcealment(const WifiMacHeader &header) const
Indicate whether a group addressed packet should be transmitted to the GCR concealment address.
bool KeepGroupcastQueued(Ptr< WifiMpdu > mpdu)
This function indicates whether a groupcast MPDU should be kept for next retransmission.
GroupAddressRetransmissionPolicy GetRetransmissionPolicy() const
Get the configured retransmission policy.
void SetWifiMac(Ptr< ApWifiMac > mac)
Set the wifi MAC.
AttributeValue implementation for Mac48Address.
A base class which provides memory management and object aggregation.
virtual void DoDispose()
Destructor implementation.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
@ ATTR_GET
The attribute can be read.
@ ATTR_CONSTRUCT
The attribute can be written at construction-time.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#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 > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeMac48AddressAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeChecker > MakeMac48AddressChecker()
Ptr< const AttributeChecker > MakeUintegerChecker()
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#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(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.
Ptr< const AttributeChecker > MakeEnumChecker(T v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
bool IsGroupcast(const Mac48Address &adr)
Check whether a MAC destination address corresponds to a groupcast transmission.
GroupAddressRetransmissionPolicy
The possible values for group address retransmission policy.