A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::GcrManager Class Referenceabstract

GcrManager is a base class defining the API to handle 802.11aa GCR. More...

#include "gcr-manager.h"

+ Inheritance diagram for ns3::GcrManager:
+ Collaboration diagram for ns3::GcrManager:

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 Mac48AddressGetGcrConcealmentAddress () 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 GcrMembersGetMemberStasForGroupAddress (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.
 
- Public Member Functions inherited from ns3::Object
 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< ObjectGetObject () 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< ObjectGetObject (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.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
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 Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
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.
 
- Protected Member Functions inherited from ns3::Object
 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.
 
- Protected Member Functions inherited from ns3::ObjectBase
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< ApWifiMacm_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< WifiMpdum_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

Detailed Description

GcrManager is a base class defining the API to handle 802.11aa GCR.

Definition at line 48 of file gcr-manager.h.

Member Typedef Documentation

◆ GcrMembers

MAC addresses of member STAs of a GCR group.

Definition at line 139 of file gcr-manager.h.

◆ NonGcrStas

List of associated STAs that are not GCR capable.

Definition at line 161 of file gcr-manager.h.

Constructor & Destructor Documentation

◆ GcrManager()

ns3::GcrManager::GcrManager ( )

Definition at line 72 of file gcr-manager.cc.

References NS_LOG_FUNCTION.

◆ ~GcrManager()

ns3::GcrManager::~GcrManager ( )
override

Definition at line 78 of file gcr-manager.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ DoDispose()

void ns3::GcrManager::DoDispose ( )
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.

+ Here is the call graph for this function:

◆ GetGcrConcealmentAddress()

const Mac48Address & ns3::GcrManager::GetGcrConcealmentAddress ( ) const

Get the GCR concealment address.

Returns
the GCR concealment address

Definition at line 143 of file gcr-manager.cc.

References m_gcrConcealmentAddress.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetIndividuallyAddressedRecipient()

virtual Mac48Address ns3::GcrManager::GetIndividuallyAddressedRecipient ( const Mac48Address & groupAddress) const
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.

Parameters
groupAddressthe group address
Returns
the MAC address of the individually addressed recipient to use.

Implemented in ns3::WifiDefaultGcrManager.

◆ GetMemberStasForGroupAddress()

const GcrManager::GcrMembers & ns3::GcrManager::GetMemberStasForGroupAddress ( const Mac48Address & groupAddress) const

Get the list of MAC addresses of member STAs for a given group address.

Parameters
groupAddressthe group address
Returns
list of MAC addresses of member STAs for the group address

Definition at line 240 of file gcr-manager.cc.

References m_staMembers.

◆ GetRetransmissionPolicy()

GroupAddressRetransmissionPolicy ns3::GcrManager::GetRetransmissionPolicy ( ) const

Get the configured retransmission policy.

Returns
the configured retransmission policy

Definition at line 103 of file gcr-manager.cc.

References m_retransmissionPolicy.

◆ GetRetransmissionPolicyFor()

GroupAddressRetransmissionPolicy ns3::GcrManager::GetRetransmissionPolicyFor ( const WifiMacHeader & header) const

Get the retransmission policy to use to transmit a given group addressed packet.

Parameters
headerthe header of the groupcast frame
Returns
the retransmission policy to use

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.

+ Here is the call graph for this function:

◆ GetTypeId()

◆ KeepGroupcastQueued()

bool ns3::GcrManager::KeepGroupcastQueued ( Ptr< WifiMpdu > mpdu)

This function indicates whether a groupcast MPDU should be kept for next retransmission.

Parameters
mpduthe groupcast MPDU
Returns
whether a groupcast MPDU should be kept for next retransmission

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.

+ Here is the call graph for this function:

◆ NotifyGroupMembershipChanged()

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.

Parameters
staAddressthe MAC address of the STA
groupAddressListzero 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.

◆ NotifyStaAssociated()

void ns3::GcrManager::NotifyStaAssociated ( const Mac48Address & staAddress,
bool isGcrCapable )

This function notifies a STA is associated.

Parameters
staAddressthe MAC address of the STA
isGcrCapablewhether 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.

◆ NotifyStaDeassociated()

void ns3::GcrManager::NotifyStaDeassociated ( const Mac48Address & staAddress)

This function deletes a STA as a member of any group addresses.

Parameters
staAddressthe 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.

◆ SetGcrConcealmentAddress()

void ns3::GcrManager::SetGcrConcealmentAddress ( const Mac48Address & address)

Set the GCR concealment address.

Parameters
addressthe 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().

+ Here is the caller graph for this function:

◆ SetWifiMac()

void ns3::GcrManager::SetWifiMac ( Ptr< ApWifiMac > mac)

Set the wifi MAC.

Note that it must be the MAC of a QoS AP.

Parameters
macthe 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.

◆ UseConcealment()

bool ns3::GcrManager::UseConcealment ( const WifiMacHeader & header) const

Indicate whether a group addressed packet should be transmitted to the GCR concealment address.

Parameters
headerthe header of the groupcast packet
Returns
whether GCR concealment should be used

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.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_apMac

Ptr<ApWifiMac> ns3::GcrManager::m_apMac
protected

the MAC of the AP

Definition at line 163 of file gcr-manager.h.

Referenced by DoDispose(), and SetWifiMac().

◆ m_gcrConcealmentAddress

Mac48Address ns3::GcrManager::m_gcrConcealmentAddress
protected

GCR concealment address.

Definition at line 172 of file gcr-manager.h.

Referenced by GetGcrConcealmentAddress(), and SetGcrConcealmentAddress().

◆ m_gcrProtectionMode

GroupcastProtectionMode ns3::GcrManager::m_gcrProtectionMode
protected

Protection mode for groupcast frames.

Definition at line 171 of file gcr-manager.h.

Referenced by GetTypeId().

◆ m_gcrUnsolicitedRetryLimit

uint8_t ns3::GcrManager::m_gcrUnsolicitedRetryLimit
protected

GCR Unsolicited Retry Limit.

Definition at line 165 of file gcr-manager.h.

Referenced by GetTypeId(), and KeepGroupcastQueued().

◆ m_mpdu

Ptr<WifiMpdu> ns3::GcrManager::m_mpdu
protected

current MPDU being retransmitted

Definition at line 167 of file gcr-manager.h.

Referenced by KeepGroupcastQueued().

◆ m_nonGcrStas

NonGcrStas ns3::GcrManager::m_nonGcrStas
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().

◆ m_retransmissionPolicy

GroupAddressRetransmissionPolicy ns3::GcrManager::m_retransmissionPolicy
protected

◆ m_staMembers

GcrMembers ns3::GcrManager::m_staMembers
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().

◆ m_unsolicitedRetryCounter

uint8_t ns3::GcrManager::m_unsolicitedRetryCounter
protected

the unsolicited retry counter

Definition at line 166 of file gcr-manager.h.

Referenced by KeepGroupcastQueued().


The documentation for this class was generated from the following files: