GcrManager is a base class defining the API to handle 802.11aa GCR. More...
#include "gcr-manager.h"
Public Types | |
using | GcrMembers = std::unordered_set<Mac48Address, WifiAddressHash> |
MAC addresses of member STAs of a GCR group. | |
Public Member Functions | |
GcrManager () | |
~GcrManager () override | |
const Mac48Address & | GetGcrConcealmentAddress () const |
Get the GCR concealment address. | |
virtual Mac48Address | GetIndividuallyAddressedRecipient (const Mac48Address &groupAddress) const =0 |
Get the MAC address of the individually addressed recipient to use for a groupcast frame or for a protection frame sent prior to groupcast frames for a given group address. | |
const GcrMembers & | GetMemberStasForGroupAddress (const Mac48Address &groupAddress) const |
Get the list of MAC addresses of member STAs for a given group address. | |
GroupAddressRetransmissionPolicy | GetRetransmissionPolicy () const |
Get the configured retransmission policy. | |
GroupAddressRetransmissionPolicy | GetRetransmissionPolicyFor (const WifiMacHeader &header) const |
Get the retransmission policy to use to transmit a given group addressed packet. | |
bool | KeepGroupcastQueued (Ptr< WifiMpdu > mpdu) |
This function indicates whether a groupcast MPDU should be kept for next retransmission. | |
void | NotifyGroupMembershipChanged (const Mac48Address &staAddress, const std::set< Mac48Address > &groupAddressList) |
This function adds a STA as a member of zero or more group addresses. | |
void | NotifyStaAssociated (const Mac48Address &staAddress, bool isGcrCapable) |
This function notifies a STA is associated. | |
void | NotifyStaDeassociated (const Mac48Address &staAddress) |
This function deletes a STA as a member of any group addresses. | |
void | SetGcrConcealmentAddress (const Mac48Address &address) |
Set the GCR concealment address. | |
void | SetWifiMac (Ptr< ApWifiMac > mac) |
Set the wifi MAC. | |
bool | UseConcealment (const WifiMacHeader &header) const |
Indicate whether a group addressed packet should be transmitted to the GCR concealment address. | |
![]() | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Register this type. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Types | |
using | NonGcrStas = GcrMembers |
List of associated STAs that are not GCR capable. | |
Protected Member Functions | |
void | DoDispose () override |
Destructor implementation. | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Protected Attributes | |
Ptr< ApWifiMac > | m_apMac |
the MAC of the AP | |
Mac48Address | m_gcrConcealmentAddress |
GCR concealment address. | |
GroupcastProtectionMode | m_gcrProtectionMode |
Protection mode for groupcast frames. | |
uint8_t | m_gcrUnsolicitedRetryLimit |
GCR Unsolicited Retry Limit. | |
Ptr< WifiMpdu > | m_mpdu |
current MPDU being retransmitted | |
NonGcrStas | m_nonGcrStas |
the list of non-GCR capable STAs | |
GroupAddressRetransmissionPolicy | m_retransmissionPolicy |
retransmission policy | |
GcrMembers | m_staMembers |
the list of STA members (assume currently each member is part of all group) | |
uint8_t | m_unsolicitedRetryCounter |
the unsolicited retry counter | |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
GcrManager is a base class defining the API to handle 802.11aa GCR.
Definition at line 48 of file gcr-manager.h.
using ns3::GcrManager::GcrMembers = std::unordered_set<Mac48Address, WifiAddressHash> |
MAC addresses of member STAs of a GCR group.
Definition at line 139 of file gcr-manager.h.
|
protected |
List of associated STAs that are not GCR capable.
Definition at line 161 of file gcr-manager.h.
ns3::GcrManager::GcrManager | ( | ) |
Definition at line 72 of file gcr-manager.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 78 of file gcr-manager.cc.
References NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 84 of file gcr-manager.cc.
References ns3::Object::DoDispose(), m_apMac, and NS_LOG_FUNCTION.
const Mac48Address & ns3::GcrManager::GetGcrConcealmentAddress | ( | ) | const |
Get the GCR concealment address.
Definition at line 143 of file gcr-manager.cc.
References m_gcrConcealmentAddress.
Referenced by GetTypeId().
|
pure virtual |
Get the MAC address of the individually addressed recipient to use for a groupcast frame or for a protection frame sent prior to groupcast frames for a given group address.
groupAddress | the group address |
Implemented in ns3::WifiDefaultGcrManager.
const GcrManager::GcrMembers & ns3::GcrManager::GetMemberStasForGroupAddress | ( | const Mac48Address & | groupAddress | ) | const |
Get the list of MAC addresses of member STAs for a given group address.
groupAddress | the group address |
Definition at line 240 of file gcr-manager.cc.
References m_staMembers.
GroupAddressRetransmissionPolicy ns3::GcrManager::GetRetransmissionPolicy | ( | ) | const |
Get the configured retransmission policy.
Definition at line 103 of file gcr-manager.cc.
References m_retransmissionPolicy.
GroupAddressRetransmissionPolicy ns3::GcrManager::GetRetransmissionPolicyFor | ( | const WifiMacHeader & | header | ) | const |
Get the retransmission policy to use to transmit a given group addressed packet.
header | the header of the groupcast frame |
Definition at line 109 of file gcr-manager.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::IsGroupcast(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), m_nonGcrStas, m_retransmissionPolicy, ns3::NO_ACK_NO_RETRY, and NS_ASSERT_MSG.
|
static |
Get the type ID.
Definition at line 28 of file gcr-manager.cc.
References ns3::TypeId::ATTR_CONSTRUCT, ns3::TypeId::ATTR_GET, ns3::CTS_TO_SELF, ns3::GCR_BLOCK_ACK, ns3::GCR_UNSOLICITED_RETRY, GetGcrConcealmentAddress(), m_gcrProtectionMode, m_gcrUnsolicitedRetryLimit, m_retransmissionPolicy, ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakeMac48AddressAccessor(), ns3::MakeMac48AddressChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), ns3::NO_ACK_NO_RETRY, ns3::RTS_CTS, SetGcrConcealmentAddress(), and ns3::TypeId::SetParent().
This function indicates whether a groupcast MPDU should be kept for next retransmission.
mpdu | the groupcast MPDU |
Definition at line 172 of file gcr-manager.cc.
References ns3::GCR_BLOCK_ACK, ns3::IsGroupcast(), m_gcrUnsolicitedRetryLimit, m_mpdu, m_nonGcrStas, m_retransmissionPolicy, m_staMembers, m_unsolicitedRetryCounter, ns3::NO_ACK_NO_RETRY, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
void ns3::GcrManager::NotifyGroupMembershipChanged | ( | const Mac48Address & | staAddress, |
const std::set< Mac48Address > & | groupAddressList ) |
This function adds a STA as a member of zero or more group addresses.
staAddress | the MAC address of the STA |
groupAddressList | zero or more MAC addresses to indicate the set of group addressed MAC addresses for which the STA receives frames |
Definition at line 248 of file gcr-manager.cc.
References NS_LOG_FUNCTION.
void ns3::GcrManager::NotifyStaAssociated | ( | const Mac48Address & | staAddress, |
bool | isGcrCapable ) |
This function notifies a STA is associated.
staAddress | the MAC address of the STA |
isGcrCapable | whether GCR is supported by the STA |
Definition at line 206 of file gcr-manager.cc.
References m_nonGcrStas, m_retransmissionPolicy, m_staMembers, ns3::NO_ACK_NO_RETRY, NS_ASSERT, and NS_LOG_FUNCTION.
void ns3::GcrManager::NotifyStaDeassociated | ( | const Mac48Address & | staAddress | ) |
This function deletes a STA as a member of any group addresses.
staAddress | the MAC address of the STA |
Definition at line 227 of file gcr-manager.cc.
References m_nonGcrStas, m_retransmissionPolicy, m_staMembers, ns3::NO_ACK_NO_RETRY, and NS_LOG_FUNCTION.
void ns3::GcrManager::SetGcrConcealmentAddress | ( | const Mac48Address & | address | ) |
Set the GCR concealment address.
address | the GCR concealment address |
Definition at line 135 of file gcr-manager.cc.
References m_gcrConcealmentAddress, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
Set the wifi MAC.
Note that it must be the MAC of a QoS AP.
mac | the wifi MAC |
Definition at line 92 of file gcr-manager.cc.
References ns3::AP, m_apMac, NS_ABORT_MSG_IF, NS_ASSERT, and NS_LOG_FUNCTION.
bool ns3::GcrManager::UseConcealment | ( | const WifiMacHeader & | header | ) | const |
Indicate whether a group addressed packet should be transmitted to the GCR concealment address.
header | the header of the groupcast packet |
Definition at line 149 of file gcr-manager.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::IsGroupcast(), ns3::WifiMacHeader::IsQosAmsdu(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), m_nonGcrStas, m_retransmissionPolicy, m_staMembers, ns3::NO_ACK_NO_RETRY, and NS_ASSERT_MSG.
the MAC of the AP
Definition at line 163 of file gcr-manager.h.
Referenced by DoDispose(), and SetWifiMac().
|
protected |
GCR concealment address.
Definition at line 172 of file gcr-manager.h.
Referenced by GetGcrConcealmentAddress(), and SetGcrConcealmentAddress().
|
protected |
Protection mode for groupcast frames.
Definition at line 171 of file gcr-manager.h.
Referenced by GetTypeId().
|
protected |
GCR Unsolicited Retry Limit.
Definition at line 165 of file gcr-manager.h.
Referenced by GetTypeId(), and KeepGroupcastQueued().
current MPDU being retransmitted
Definition at line 167 of file gcr-manager.h.
Referenced by KeepGroupcastQueued().
|
protected |
the list of non-GCR capable STAs
Definition at line 168 of file gcr-manager.h.
Referenced by GetRetransmissionPolicyFor(), KeepGroupcastQueued(), NotifyStaAssociated(), NotifyStaDeassociated(), and UseConcealment().
|
protected |
retransmission policy
Definition at line 164 of file gcr-manager.h.
Referenced by GetRetransmissionPolicy(), GetRetransmissionPolicyFor(), GetTypeId(), KeepGroupcastQueued(), NotifyStaAssociated(), NotifyStaDeassociated(), and UseConcealment().
|
protected |
the list of STA members (assume currently each member is part of all group)
Definition at line 169 of file gcr-manager.h.
Referenced by ns3::WifiDefaultGcrManager::GetIndividuallyAddressedRecipient(), GetMemberStasForGroupAddress(), KeepGroupcastQueued(), NotifyStaAssociated(), NotifyStaDeassociated(), and UseConcealment().
|
protected |
the unsolicited retry counter
Definition at line 166 of file gcr-manager.h.
Referenced by KeepGroupcastQueued().