A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::CtrlTriggerHeader Class Reference

Headers for Trigger frames. More...

#include "ctrl-headers.h"

+ Inheritance diagram for ns3::CtrlTriggerHeader:
+ Collaboration diagram for ns3::CtrlTriggerHeader:

Public Types

typedef std::list< CtrlTriggerUserInfoField >::const_iterator ConstIterator
 User Info fields list const iterator.
 
typedef std::list< CtrlTriggerUserInfoField >::iterator Iterator
 User Info fields list iterator.
 

Public Member Functions

 CtrlTriggerHeader ()
 
 CtrlTriggerHeader (TriggerFrameType type, const WifiTxVector &txVector)
 Constructor.
 
 ~CtrlTriggerHeader () override
 
CtrlTriggerUserInfoFieldAddUserInfoField ()
 Append a new User Info field to this Trigger frame and return a non-const reference to it.
 
CtrlTriggerUserInfoFieldAddUserInfoField (const CtrlTriggerUserInfoField &userInfo)
 Append the given User Info field to this Trigger frame and return a non-const reference to it.
 
Iterator begin ()
 Get an iterator pointing to the first User Info field in the list.
 
ConstIterator begin () const
 Get a const iterator pointing to the first User Info field in the list.
 
uint32_t Deserialize (Buffer::Iterator start) override
 
Iterator end ()
 Get an iterator indicating past-the-last User Info field in the list.
 
ConstIterator end () const
 Get a const iterator indicating past-the-last User Info field in the list.
 
ConstIterator FindUserInfoWithAid (ConstIterator start, uint16_t aid12) const
 Get a const iterator pointing to the first User Info field found (starting from the one pointed to by the given iterator) whose AID12 subfield is set to the given value.
 
ConstIterator FindUserInfoWithAid (uint16_t aid12) const
 Get a const iterator pointing to the first User Info field found whose AID12 subfield is set to the given value.
 
ConstIterator FindUserInfoWithRaRuAssociated () const
 Get a const iterator pointing to the first User Info field found which allocates a Random Access RU for associated stations.
 
ConstIterator FindUserInfoWithRaRuAssociated (ConstIterator start) const
 Get a const iterator pointing to the first User Info field found (starting from the one pointed to by the given iterator) which allocates a Random Access RU for associated stations.
 
ConstIterator FindUserInfoWithRaRuUnassociated () const
 Get a const iterator pointing to the first User Info field found which allocates a Random Access RU for unassociated stations.
 
ConstIterator FindUserInfoWithRaRuUnassociated (ConstIterator start) const
 Get a const iterator pointing to the first User Info field found (starting from the one pointed to by the given iterator) which allocates a Random Access RU for unassociated stations.
 
int8_t GetApTxPower () const
 Get the power value (dBm) indicated by the AP TX Power subfield of the Common Info field.
 
CtrlTriggerHeader GetCommonInfoField () const
 Get a copy of the Common Info field of this Trigger frame.
 
bool GetCsRequired () const
 Get the CS Required subfield of the Common Info field.
 
uint16_t GetGuardInterval () const
 Get the guard interval duration (in nanoseconds) of the solicited HE TB PPDU.
 
WifiTxVector GetHeTbTxVector (uint16_t staId) const
 Get the TX vector that the station with the given STA-ID will use to send the HE TB PPDU solicited by this Trigger Frame.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
uint8_t GetLtfType () const
 Get the LTF type of the solicited HE TB PPDU.
 
bool GetMoreTF () const
 Get the More TF subfield of the Common Info field.
 
std::size_t GetNUserInfoFields () const
 Get the number of User Info fields in this Trigger Frame.
 
std::size_t GetPaddingSize () const
 
uint32_t GetSerializedSize () const override
 
TriggerFrameType GetType () const
 Get the Trigger Frame type.
 
const char * GetTypeString () const
 Return a string corresponding to the Trigger Frame type.
 
uint16_t GetUlBandwidth () const
 Get the bandwidth of the solicited HE TB PPDU.
 
uint16_t GetUlLength () const
 Get the UL Length subfield of the Common Info field.
 
uint16_t GetUlSpatialReuse () const
 Get the UL Spatial Reuse subfield of the Common Info field.
 
TriggerFrameVariant GetVariant () const
 Get the Common Info field variant.
 
bool IsBasic () const
 Check if this is a Basic Trigger frame.
 
bool IsBfrp () const
 Check if this is a Beamforming Report Poll Trigger frame.
 
bool IsBqrp () const
 Check if this is a Bandwidth Query Report Poll Trigger frame.
 
bool IsBsrp () const
 Check if this is a Buffer Status Report Poll Trigger frame.
 
bool IsGcrMuBar () const
 Check if this is a Groupcast with Retries (GCR) MU-BAR Trigger frame.
 
bool IsMuBar () const
 Check if this is a MU-BAR Trigger frame.
 
bool IsMuRts () const
 Check if this is a MU-RTS Trigger frame.
 
bool IsNfrp () const
 Check if this is a NDP Feedback Report Poll Trigger frame.
 
bool IsValid () const
 Check the validity of this Trigger frame.
 
CtrlTriggerHeaderoperator= (const CtrlTriggerHeader &trigger)
 Copy assignment operator.
 
void Print (std::ostream &os) const override
 
void Serialize (Buffer::Iterator start) const override
 
void SetApTxPower (int8_t power)
 Set the AP TX Power subfield of the Common Info field.
 
void SetCsRequired (bool cs)
 Set the CS Required subfield of the Common Info field.
 
void SetGiAndLtfType (uint16_t guardInterval, uint8_t ltfType)
 Set the GI And LTF Type subfield of the Common Info field.
 
void SetMoreTF (bool more)
 Set the More TF subfield of the Common Info field.
 
void SetPaddingSize (std::size_t size)
 Set the size in bytes of the Padding field.
 
void SetType (TriggerFrameType type)
 Set the Trigger frame type.
 
void SetUlBandwidth (uint16_t bw)
 Set the bandwidth of the solicited HE TB PPDU.
 
void SetUlLength (uint16_t len)
 Set the UL Length subfield of the Common Info field.
 
void SetUlSpatialReuse (uint16_t sr)
 Set the UL Spatial Reuse subfield of the Common Info field.
 
void SetVariant (TriggerFrameVariant variant)
 Set the Common Info field variant.
 
- Public Member Functions inherited from ns3::Header
 ~Header () override
 
uint32_t Deserialize (Buffer::Iterator start) override=0
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 Deserialize the object from a buffer iterator.
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator.
 
virtual uint32_t GetSerializedSize () const =0
 
void Print (std::ostream &os) const override=0
 
virtual void Serialize (Buffer::Iterator start) const =0
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 Deserialize the object from a buffer iterator.
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator.
 
virtual void Print (std::ostream &os) const =0
 Print the object contents.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value) 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.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
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 const char * GetTypeString (TriggerFrameType type)
 Return a string corresponding to the given Trigger Frame type.
 
- Static Public Member Functions inherited from ns3::Header
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Attributes

uint8_t m_apTxPower
 Tx Power used by AP to transmit the Trigger Frame.
 
bool m_csRequired
 Carrier Sense required.
 
uint8_t m_giAndLtfType
 GI And LTF Type subfield.
 
bool m_moreTF
 True if a subsequent Trigger frame follows.
 
std::size_t m_padding
 the size in bytes of the Padding field
 
TriggerFrameType m_triggerType
 Trigger type.
 
uint8_t m_ulBandwidth
 UL BW subfield.
 
uint16_t m_ulLength
 Value for the L-SIG Length field.
 
uint16_t m_ulSpatialReuse
 Value for the Spatial Reuse field in HE-SIG-A.
 
std::list< CtrlTriggerUserInfoFieldm_userInfoFields
 List of User Info fields.
 
TriggerFrameVariant m_variant
 Common Info field.
 

Additional Inherited Members

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

Detailed Description

Headers for Trigger frames.

Introspection did not find any typical Config paths.

802.11ax amendment defines eight types of Trigger frames (see Section 9.3.1.23 of D3.0):

  • Basic
  • Beamforming Report Poll (BFRP)
  • Multi-User Block Ack Request (MU-BAR)
  • Multi-User Request To Send (MU-RTS)
  • Buffer Status Report Poll (BSRP)
  • Groupcast with Retries (GCR) MU-BAR
  • Bandwidth Query Report Poll (BQRP)
  • NDP Feedback Report Poll (NFRP) For now only the Basic, MU-BAR, MU-RTS, BSRP and BQRP variants are supported. Basic Trigger is also the default variant.

The Padding field is optional, given that other techniques (post-EOF A-MPDU padding, aggregating other MPDUs in the A-MPDU) are available to satisfy the minimum time requirement. The size in bytes of the Padding field is configurable.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 48 bytes (on a 64-bit architecture).

Definition at line 941 of file ctrl-headers.h.

Member Typedef Documentation

◆ ConstIterator

User Info fields list const iterator.

Definition at line 1224 of file ctrl-headers.h.

◆ Iterator

User Info fields list iterator.

Definition at line 1227 of file ctrl-headers.h.

Constructor & Destructor Documentation

◆ CtrlTriggerHeader() [1/2]

ns3::CtrlTriggerHeader::CtrlTriggerHeader ( )

Definition at line 1663 of file ctrl-headers.cc.

◆ CtrlTriggerHeader() [2/2]

ns3::CtrlTriggerHeader::CtrlTriggerHeader ( TriggerFrameType  type,
const WifiTxVector txVector 
)

Constructor.

Construct a Trigger Frame of the given type from the values stored in the given TX vector. In particular:

  • the UL Bandwidth, UL Length and GI And LTF Type subfields of the Common Info field are set based on the values stored in the TX vector;
  • as many User Info fields as the number of entries in the HeMuUserInfoMap of the TX vector are added to the Trigger Frame. The AID12, RU Allocation, UL MCS and SS Allocation subfields of each User Info field are set based on the values stored in the corresponding entry of the HeMuUserInfoMap.

This constructor cannot be used to construct MU-RTS Trigger Frames.

Parameters
typethe Trigger frame type
txVectorthe TX vector used to build this Trigger Frame

Definition at line 1677 of file ctrl-headers.cc.

References AddUserInfoField(), ns3::EHT, ns3::WifiTxVector::GetChannelWidth(), ns3::WifiTxVector::GetGuardInterval(), ns3::WifiTxVector::GetHeMuUserInfoMap(), ns3::WifiTxVector::GetLength(), ns3::WifiTxVector::GetPreambleType(), ns3::HE, m_giAndLtfType, m_triggerType, m_variant, ns3::MU_RTS_TRIGGER, NS_ABORT_MSG, NS_ABORT_MSG_IF, ns3::CtrlTriggerUserInfoField::SetAid12(), ns3::CtrlTriggerUserInfoField::SetRuAllocation(), ns3::CtrlTriggerUserInfoField::SetSsAllocation(), SetUlBandwidth(), SetUlLength(), ns3::CtrlTriggerUserInfoField::SetUlMcs(), ns3::WIFI_PREAMBLE_EHT_TB, and ns3::WIFI_PREAMBLE_HE_TB.

+ Here is the call graph for this function:

◆ ~CtrlTriggerHeader()

ns3::CtrlTriggerHeader::~CtrlTriggerHeader ( )
override

Definition at line 1718 of file ctrl-headers.cc.

Member Function Documentation

◆ AddUserInfoField() [1/2]

CtrlTriggerUserInfoField & ns3::CtrlTriggerHeader::AddUserInfoField ( )

Append a new User Info field to this Trigger frame and return a non-const reference to it.

Make sure to call this method after setting the type of the Trigger frame.

Returns
a non-const reference to the newly added User Info field

Definition at line 2179 of file ctrl-headers.cc.

References m_triggerType, m_userInfoFields, and m_variant.

Referenced by CtrlTriggerHeader(), ns3::WifiProtectionManager::AddUserInfoToMuRts(), Deserialize(), ns3::GetMuBarSize(), and TestUlOfdmaPowerControl::SendMuBar().

+ Here is the caller graph for this function:

◆ AddUserInfoField() [2/2]

CtrlTriggerUserInfoField & ns3::CtrlTriggerHeader::AddUserInfoField ( const CtrlTriggerUserInfoField userInfo)

Append the given User Info field to this Trigger frame and return a non-const reference to it.

Make sure that the type of the given User Info field matches the type of this Trigger Frame.

Parameters
userInfothe User Info field to append to this Trigger Frame
Returns
a non-const reference to the newly added User Info field

Definition at line 2186 of file ctrl-headers.cc.

References ns3::CtrlTriggerUserInfoField::GetType(), m_triggerType, m_userInfoFields, and NS_ABORT_MSG_IF.

+ Here is the call graph for this function:

◆ begin() [1/2]

CtrlTriggerHeader::Iterator ns3::CtrlTriggerHeader::begin ( )

Get an iterator pointing to the first User Info field in the list.

Returns
an iterator pointing to the first User Info field in the list

Definition at line 2208 of file ctrl-headers.cc.

References m_userInfoFields.

◆ begin() [2/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::begin ( ) const

Get a const iterator pointing to the first User Info field in the list.

Returns
a const iterator pointing to the first User Info field in the list

Definition at line 2196 of file ctrl-headers.cc.

References m_userInfoFields.

Referenced by ns3::MultiUserScheduler::GetTriggerFrame(), TestMultiUserScheduler::SelectTxFormat(), OfdmaAckSequenceTest::Transmit(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().

+ Here is the caller graph for this function:

◆ Deserialize()

uint32_t ns3::CtrlTriggerHeader::Deserialize ( Buffer::Iterator  start)
overridevirtual
Parameters
startan iterator which points to where the header should read from.
Returns
the number of bytes read.

This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet. The data read is expected to match bit-for-bit the representation of this header in real networks.

Note that data is not actually removed from the buffer to which the iterator points. Both Packet::RemoveHeader() and Packet::PeekHeader() call Deserialize(), but only the RemoveHeader() has additional statements to remove the header bytes from the underlying buffer and associated metadata.

Implements ns3::Header.

Definition at line 1851 of file ctrl-headers.cc.

References AddUserInfoField(), ns3::BFRP_TRIGGER, ns3::CtrlTriggerUserInfoField::Deserialize(), ns3::EHT, ns3::GCR_MU_BAR_TRIGGER, ns3::Buffer::Iterator::GetDistanceFrom(), ns3::Buffer::Iterator::GetRemainingSize(), ns3::HE, m_apTxPower, m_csRequired, m_giAndLtfType, m_moreTF, m_padding, m_triggerType, m_ulBandwidth, m_ulLength, m_ulSpatialReuse, m_userInfoFields, m_variant, ns3::NFRP_TRIGGER, NS_ABORT_MSG_IF, ns3::Buffer::Iterator::Prev(), ns3::Buffer::Iterator::ReadLsbtohU64(), and ns3::Buffer::Iterator::ReadU16().

+ Here is the call graph for this function:

◆ end() [1/2]

CtrlTriggerHeader::Iterator ns3::CtrlTriggerHeader::end ( )

Get an iterator indicating past-the-last User Info field in the list.

Returns
an iterator indicating past-the-last User Info field in the list

Definition at line 2214 of file ctrl-headers.cc.

References m_userInfoFields.

Referenced by grid.TimelinesRenderer::draw_events(), and grid.TimelinesRenderer::draw_ranges().

+ Here is the caller graph for this function:

◆ end() [2/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::end ( ) const

Get a const iterator indicating past-the-last User Info field in the list.

Returns
a const iterator indicating past-the-last User Info field in the list

Definition at line 2202 of file ctrl-headers.cc.

References m_userInfoFields.

Referenced by grid.TimelinesRenderer::draw_events(), grid.TimelinesRenderer::draw_ranges(), FindUserInfoWithAid(), ns3::HeFrameExchangeManager::GetCtsTxVectorAfterMuRts(), ns3::EhtFrameExchangeManager::GetEmlsrSwitchToListening(), ns3::HeFrameExchangeManager::GetHeTbTxVector(), GetHeTbTxVector(), ns3::HeFrameExchangeManager::PostProcessFrame(), ns3::EhtFrameExchangeManager::ReceiveMpdu(), ns3::HeFrameExchangeManager::ReceiveMpdu(), and ns3::HeFrameExchangeManager::UlMuCsMediumIdle().

+ Here is the caller graph for this function:

◆ FindUserInfoWithAid() [1/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::FindUserInfoWithAid ( ConstIterator  start,
uint16_t  aid12 
) const

Get a const iterator pointing to the first User Info field found (starting from the one pointed to by the given iterator) whose AID12 subfield is set to the given value.

Parameters
starta const iterator pointing to the User Info field to start the search from
aid12the value of the AID12 subfield to match
Returns
a const iterator pointing to the User Info field matching the specified criterion, if any, or an iterator indicating past-the-last User Info field.

Definition at line 2226 of file ctrl-headers.cc.

References end(), and ns3::CtrlTriggerUserInfoField::GetAid12().

Referenced by FindUserInfoWithAid(), FindUserInfoWithRaRuAssociated(), FindUserInfoWithRaRuUnassociated(), ns3::HeFrameExchangeManager::GetCtsTxVectorAfterMuRts(), ns3::EhtFrameExchangeManager::GetEmlsrSwitchToListening(), ns3::HeFrameExchangeManager::GetHeTbTxVector(), GetHeTbTxVector(), ns3::HeFrameExchangeManager::PostProcessFrame(), ns3::HeFrameExchangeManager::ReceiveBasicTrigger(), ns3::EhtFrameExchangeManager::ReceiveMpdu(), ns3::HeFrameExchangeManager::ReceiveMpdu(), and ns3::HeFrameExchangeManager::UlMuCsMediumIdle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindUserInfoWithAid() [2/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::FindUserInfoWithAid ( uint16_t  aid12) const

Get a const iterator pointing to the first User Info field found whose AID12 subfield is set to the given value.

Parameters
aid12the value of the AID12 subfield to match
Returns
a const iterator pointing to the User Info field matching the specified criterion, if any, or an iterator indicating past-the-last User Info field.

Definition at line 2236 of file ctrl-headers.cc.

References FindUserInfoWithAid(), and m_userInfoFields.

+ Here is the call graph for this function:

◆ FindUserInfoWithRaRuAssociated() [1/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::FindUserInfoWithRaRuAssociated ( ) const

Get a const iterator pointing to the first User Info field found which allocates a Random Access RU for associated stations.

Returns
a const iterator pointing to the User Info field matching the specified criterion, if any, or an iterator indicating past-the-last User Info field.

Definition at line 2248 of file ctrl-headers.cc.

References FindUserInfoWithAid().

+ Here is the call graph for this function:

◆ FindUserInfoWithRaRuAssociated() [2/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::FindUserInfoWithRaRuAssociated ( ConstIterator  start) const

Get a const iterator pointing to the first User Info field found (starting from the one pointed to by the given iterator) which allocates a Random Access RU for associated stations.

Parameters
starta const iterator pointing to the User Info field to start the search from
Returns
a const iterator pointing to the User Info field matching the specified criterion, if any, or an iterator indicating past-the-last User Info field.

Definition at line 2242 of file ctrl-headers.cc.

References FindUserInfoWithAid().

+ Here is the call graph for this function:

◆ FindUserInfoWithRaRuUnassociated() [1/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::FindUserInfoWithRaRuUnassociated ( ) const

Get a const iterator pointing to the first User Info field found which allocates a Random Access RU for unassociated stations.

Returns
a const iterator pointing to the User Info field matching the specified criterion, if any, or an iterator indicating past-the-last User Info field.

Definition at line 2260 of file ctrl-headers.cc.

References FindUserInfoWithAid().

+ Here is the call graph for this function:

◆ FindUserInfoWithRaRuUnassociated() [2/2]

CtrlTriggerHeader::ConstIterator ns3::CtrlTriggerHeader::FindUserInfoWithRaRuUnassociated ( ConstIterator  start) const

Get a const iterator pointing to the first User Info field found (starting from the one pointed to by the given iterator) which allocates a Random Access RU for unassociated stations.

Parameters
starta const iterator pointing to the User Info field to start the search from
Returns
a const iterator pointing to the User Info field matching the specified criterion, if any, or an iterator indicating past-the-last User Info field.

Definition at line 2254 of file ctrl-headers.cc.

References FindUserInfoWithAid().

+ Here is the call graph for this function:

◆ GetApTxPower()

int8_t ns3::CtrlTriggerHeader::GetApTxPower ( ) const

Get the power value (dBm) indicated by the AP TX Power subfield of the Common Info field.

Returns
the AP TX Power (dBm) per 20 MHz

Definition at line 2138 of file ctrl-headers.cc.

References m_apTxPower.

Referenced by ns3::HeFrameExchangeManager::GetHeTbTxVector().

+ Here is the caller graph for this function:

◆ GetCommonInfoField()

CtrlTriggerHeader ns3::CtrlTriggerHeader::GetCommonInfoField ( ) const

Get a copy of the Common Info field of this Trigger frame.

Note that the User Info fields are excluded.

Returns
a Trigger frame including a copy of the Common Info field of this frame.

Definition at line 2170 of file ctrl-headers.cc.

References m_userInfoFields.

◆ GetCsRequired()

bool ns3::CtrlTriggerHeader::GetCsRequired ( ) const

Get the CS Required subfield of the Common Info field.

Returns
the CS Required subfield

Definition at line 2035 of file ctrl-headers.cc.

References m_csRequired.

Referenced by ns3::HeFrameExchangeManager::UlMuCsMediumIdle().

+ Here is the caller graph for this function:

◆ GetGuardInterval()

uint16_t ns3::CtrlTriggerHeader::GetGuardInterval ( ) const

Get the guard interval duration (in nanoseconds) of the solicited HE TB PPDU.

Returns
the guard interval duration (in nanoseconds) of the solicited HE TB PPDU

Definition at line 2091 of file ctrl-headers.cc.

References m_giAndLtfType, and NS_FATAL_ERROR.

Referenced by GetHeTbTxVector(), ns3::HeFrameExchangeManager::GetTrigVector(), TestMultiUserScheduler::SelectTxFormat(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().

+ Here is the caller graph for this function:

◆ GetHeTbTxVector()

WifiTxVector ns3::CtrlTriggerHeader::GetHeTbTxVector ( uint16_t  staId) const

Get the TX vector that the station with the given STA-ID will use to send the HE TB PPDU solicited by this Trigger Frame.

Note that the TX power level is not set by this method.

Parameters
staIdthe STA-ID of a station addressed by this Trigger Frame
Returns
the TX vector of the solicited HE TB PPDU

Definition at line 1998 of file ctrl-headers.cc.

References end(), FindUserInfoWithAid(), GetGuardInterval(), GetUlBandwidth(), GetUlLength(), m_triggerType, ns3::MU_RTS_TRIGGER, NS_ABORT_MSG_IF, NS_ASSERT, ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetHeMuUserInfo(), ns3::WifiTxVector::SetLength(), and ns3::WifiTxVector::SetPreambleType().

Referenced by ns3::HeFrameExchangeManager::GetHeTbTxVector(), TestMultiUserScheduler::SelectTxFormat(), TestUlOfdmaPowerControl::SendMuBar(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::CtrlTriggerHeader::GetInstanceTypeId ( ) const
overridevirtual

Get the most derived TypeId for this Object.

This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.

Returns
The TypeId associated to the most-derived type of this instance.

Implements ns3::ObjectBase.

Definition at line 1757 of file ctrl-headers.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetLtfType()

uint8_t ns3::CtrlTriggerHeader::GetLtfType ( ) const

Get the LTF type of the solicited HE TB PPDU.

Returns
the LTF type of the solicited HE TB PPDU

Definition at line 2108 of file ctrl-headers.cc.

References m_giAndLtfType, and NS_FATAL_ERROR.

◆ GetMoreTF()

bool ns3::CtrlTriggerHeader::GetMoreTF ( ) const

Get the More TF subfield of the Common Info field.

Returns
the More TF subfield

Definition at line 2023 of file ctrl-headers.cc.

References m_moreTF.

◆ GetNUserInfoFields()

std::size_t ns3::CtrlTriggerHeader::GetNUserInfoFields ( ) const

Get the number of User Info fields in this Trigger Frame.

Returns
the number of User Info fields in this Trigger Frame

Definition at line 2220 of file ctrl-headers.cc.

References m_userInfoFields.

Referenced by OfdmaAckSequenceTest::CheckResults(), ns3::MultiUserScheduler::GetTriggerFrame(), ns3::HeFrameExchangeManager::PrepareMuBar(), and ns3::WifiDefaultProtectionManager::TryUlMuTransmission().

+ Here is the caller graph for this function:

◆ GetPaddingSize()

std::size_t ns3::CtrlTriggerHeader::GetPaddingSize ( ) const
Returns
the size in bytes of the Padding field

Definition at line 2164 of file ctrl-headers.cc.

References m_padding.

◆ GetSerializedSize()

uint32_t ns3::CtrlTriggerHeader::GetSerializedSize ( ) const
overridevirtual
Returns
the expected size of the header.

This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. This method should return the number of bytes which are needed to store the full header data by Serialize.

Implements ns3::Header.

Definition at line 1789 of file ctrl-headers.cc.

References ns3::GCR_MU_BAR_TRIGGER, m_padding, m_triggerType, and m_userInfoFields.

Referenced by ns3::GetMuBarSize().

+ Here is the caller graph for this function:

◆ GetType()

TriggerFrameType ns3::CtrlTriggerHeader::GetType ( ) const

Get the Trigger Frame type.

Returns
the Trigger Frame type

Definition at line 1903 of file ctrl-headers.cc.

References m_triggerType.

Referenced by GetTypeString(), and ns3::RrMultiUserScheduler::SelectTxFormat().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::CtrlTriggerHeader::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 1747 of file ctrl-headers.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeString() [1/2]

const char * ns3::CtrlTriggerHeader::GetTypeString ( ) const

Return a string corresponding to the Trigger Frame type.

Returns
a string corresponding to the Trigger Frame type.

Definition at line 1909 of file ctrl-headers.cc.

References GetType(), and GetTypeString().

Referenced by GetTypeString(), and Print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeString() [2/2]

const char * ns3::CtrlTriggerHeader::GetTypeString ( TriggerFrameType  type)
static

Return a string corresponding to the given Trigger Frame type.

Parameters
typethe Trigger Frame type
Returns
a string corresponding to the Trigger Frame type.

Definition at line 1915 of file ctrl-headers.cc.

References ns3::BASIC_TRIGGER, ns3::BFRP_TRIGGER, ns3::BQRP_TRIGGER, ns3::BSRP_TRIGGER, FOO, ns3::GCR_MU_BAR_TRIGGER, ns3::MU_BAR_TRIGGER, ns3::MU_RTS_TRIGGER, and ns3::NFRP_TRIGGER.

◆ GetUlBandwidth()

uint16_t ns3::CtrlTriggerHeader::GetUlBandwidth ( ) const

Get the bandwidth of the solicited HE TB PPDU.

Returns
the bandwidth (20, 40, 80 or 160)

Definition at line 2064 of file ctrl-headers.cc.

References m_ulBandwidth.

Referenced by GetHeTbTxVector(), ns3::HeFrameExchangeManager::GetTrigVector(), IsValid(), Print(), ns3::WifiDefaultProtectionManager::TryUlMuTransmission(), and ns3::HeFrameExchangeManager::UlMuCsMediumIdle().

+ Here is the caller graph for this function:

◆ GetUlLength()

uint16_t ns3::CtrlTriggerHeader::GetUlLength ( ) const

Get the UL Length subfield of the Common Info field.

Returns
the UL Length subfield

Definition at line 1992 of file ctrl-headers.cc.

References m_ulLength.

Referenced by GetHeTbTxVector(), ns3::HeFrameExchangeManager::GetTrigVector(), ns3::HeFrameExchangeManager::PrepareMuBar(), ns3::HeFrameExchangeManager::ReceiveBasicTrigger(), and ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu().

+ Here is the caller graph for this function:

◆ GetUlSpatialReuse()

uint16_t ns3::CtrlTriggerHeader::GetUlSpatialReuse ( ) const

Get the UL Spatial Reuse subfield of the Common Info field.

Returns
the UL Spatial Reuse subfield

Definition at line 2151 of file ctrl-headers.cc.

References m_ulSpatialReuse.

◆ GetVariant()

TriggerFrameVariant ns3::CtrlTriggerHeader::GetVariant ( ) const

Get the Common Info field variant.

Returns
the Common Info field variant

Definition at line 1783 of file ctrl-headers.cc.

References m_variant.

Referenced by ns3::HeFrameExchangeManager::GetTrigVector().

+ Here is the caller graph for this function:

◆ IsBasic()

bool ns3::CtrlTriggerHeader::IsBasic ( ) const

Check if this is a Basic Trigger frame.

Returns
true if this is a Basic Trigger frame, false otherwise

Definition at line 1938 of file ctrl-headers.cc.

References ns3::BASIC_TRIGGER, and m_triggerType.

Referenced by OfdmaAckSequenceTest::CheckResults(), ns3::HeFrameExchangeManager::ReceiveBasicTrigger(), ns3::HeFrameExchangeManager::ReceiveMpdu(), ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu(), MultiLinkMuTxTest::Transmit(), OfdmaAckSequenceTest::Transmit(), and ns3::WifiDefaultAckManager::TryUlMuTransmission().

+ Here is the caller graph for this function:

◆ IsBfrp()

bool ns3::CtrlTriggerHeader::IsBfrp ( ) const

Check if this is a Beamforming Report Poll Trigger frame.

Returns
true if this is a Beamforming Report Poll Trigger frame, false otherwise

Definition at line 1944 of file ctrl-headers.cc.

References ns3::BFRP_TRIGGER, and m_triggerType.

◆ IsBqrp()

bool ns3::CtrlTriggerHeader::IsBqrp ( ) const

Check if this is a Bandwidth Query Report Poll Trigger frame.

Returns
true if this is a Bandwidth Query Report Poll Trigger frame, false otherwise

Definition at line 1974 of file ctrl-headers.cc.

References ns3::BQRP_TRIGGER, and m_triggerType.

◆ IsBsrp()

bool ns3::CtrlTriggerHeader::IsBsrp ( ) const

Check if this is a Buffer Status Report Poll Trigger frame.

Returns
true if this is a Buffer Status Report Poll Trigger frame, false otherwise

Definition at line 1962 of file ctrl-headers.cc.

References ns3::BSRP_TRIGGER, and m_triggerType.

Referenced by OfdmaAckSequenceTest::CheckResults(), ns3::HeFrameExchangeManager::ReceiveMpdu(), ns3::HeFrameExchangeManager::SendQosNullFramesInTbPpdu(), and ns3::WifiDefaultAckManager::TryUlMuTransmission().

+ Here is the caller graph for this function:

◆ IsGcrMuBar()

bool ns3::CtrlTriggerHeader::IsGcrMuBar ( ) const

Check if this is a Groupcast with Retries (GCR) MU-BAR Trigger frame.

Returns
true if this is a Groupcast with Retries (GCR) MU-BAR Trigger frame, false otherwise

Definition at line 1968 of file ctrl-headers.cc.

References ns3::GCR_MU_BAR_TRIGGER, and m_triggerType.

◆ IsMuBar()

bool ns3::CtrlTriggerHeader::IsMuBar ( ) const

Check if this is a MU-BAR Trigger frame.

Returns
true if this is a MU-BAR Trigger frame, false otherwise

Definition at line 1950 of file ctrl-headers.cc.

References m_triggerType, and ns3::MU_BAR_TRIGGER.

Referenced by ns3::HeFrameExchangeManager::ReceiveMpdu().

+ Here is the caller graph for this function:

◆ IsMuRts()

bool ns3::CtrlTriggerHeader::IsMuRts ( ) const

Check if this is a MU-RTS Trigger frame.

Returns
true if this is a MU-RTS Trigger frame, false otherwise

Definition at line 1956 of file ctrl-headers.cc.

References m_triggerType, and ns3::MU_RTS_TRIGGER.

Referenced by EmlsrDlTxopTest::CheckInitialControlFrame(), EmlsrDlTxopTest::CheckResults(), EmlsrUlTxopTest::CheckResults(), OfdmaAckSequenceTest::CheckResults(), ns3::HeFrameExchangeManager::PostProcessFrame(), ns3::EhtFrameExchangeManager::ReceiveMpdu(), ns3::HeFrameExchangeManager::ReceiveMpdu(), and ns3::HeFrameExchangeManager::UlMuCsMediumIdle().

+ Here is the caller graph for this function:

◆ IsNfrp()

bool ns3::CtrlTriggerHeader::IsNfrp ( ) const

Check if this is a NDP Feedback Report Poll Trigger frame.

Returns
true if this is a NDP Feedback Report Poll Trigger frame, false otherwise

Definition at line 1980 of file ctrl-headers.cc.

References m_triggerType, and ns3::NFRP_TRIGGER.

◆ IsValid()

bool ns3::CtrlTriggerHeader::IsValid ( ) const

Check the validity of this Trigger frame.

TODO Implement the checks listed in Section 27.5.3.2.3 of 802.11ax amendment D3.0 (Allowed settings of the Trigger frame fields and TRS Control subfield).

This function shall be invoked before transmitting and upon receiving a Trigger frame.

Returns
true if the Trigger frame is valid, false otherwise.

Definition at line 2266 of file ctrl-headers.cc.

References ns3::HeRu::DoesOverlap(), GetUlBandwidth(), m_triggerType, m_userInfoFields, and ns3::MU_RTS_TRIGGER.

+ Here is the call graph for this function:

◆ operator=()

CtrlTriggerHeader & ns3::CtrlTriggerHeader::operator= ( const CtrlTriggerHeader trigger)

Copy assignment operator.

Parameters
triggerthe Trigger frame to copy
Returns
a reference to the copied object

Ensure that the type of this Trigger Frame is set to the type of the given Trigger Frame before copying the User Info fields.

Definition at line 1723 of file ctrl-headers.cc.

References m_apTxPower, m_csRequired, m_giAndLtfType, m_moreTF, m_padding, m_triggerType, m_ulBandwidth, m_ulLength, m_ulSpatialReuse, m_userInfoFields, and m_variant.

◆ Print()

void ns3::CtrlTriggerHeader::Print ( std::ostream &  os) const
overridevirtual
Parameters
osoutput stream This method is used by Packet::Print to print the content of a header as ascii data to a c++ output stream. Although the header is free to format its output as it wishes, it is recommended to follow a few rules to integrate with the packet pretty printer: start with flags, small field values located between a pair of parens. Values should be separated by whitespace. Follow the parens with the important fields, separated by whitespace. i.e.: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5

Implements ns3::Header.

Definition at line 1763 of file ctrl-headers.cc.

References GetTypeString(), GetUlBandwidth(), m_ulLength, and m_userInfoFields.

+ Here is the call graph for this function:

◆ Serialize()

void ns3::CtrlTriggerHeader::Serialize ( Buffer::Iterator  start) const
overridevirtual
Parameters
startan iterator which points to where the header should be written.

This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. The data written is expected to match bit-for-bit the representation of this header in a real network.

Implements ns3::Header.

Definition at line 1811 of file ctrl-headers.cc.

References ns3::BFRP_TRIGGER, ns3::GCR_MU_BAR_TRIGGER, ns3::HE, m_apTxPower, m_csRequired, m_giAndLtfType, m_moreTF, m_padding, m_triggerType, m_ulBandwidth, m_ulLength, m_ulSpatialReuse, m_userInfoFields, m_variant, ns3::NFRP_TRIGGER, NS_ABORT_MSG_IF, ns3::Buffer::Iterator::WriteHtolsbU64(), and ns3::Buffer::Iterator::WriteU8().

+ Here is the call graph for this function:

◆ SetApTxPower()

void ns3::CtrlTriggerHeader::SetApTxPower ( int8_t  power)

Set the AP TX Power subfield of the Common Info field.

Parameters
powerthe value (from -20 to 40) for the AP TX Power (dBm)

Definition at line 2129 of file ctrl-headers.cc.

References m_apTxPower, and NS_ABORT_MSG_IF.

Referenced by TestUlOfdmaPowerControl::SendMuBar(), and ns3::HeFrameExchangeManager::SetTargetRssi().

+ Here is the caller graph for this function:

◆ SetCsRequired()

void ns3::CtrlTriggerHeader::SetCsRequired ( bool  cs)

Set the CS Required subfield of the Common Info field.

Parameters
csthe value for the CS Required subfield

Definition at line 2029 of file ctrl-headers.cc.

References m_csRequired.

Referenced by ns3::HeFrameExchangeManager::PrepareMuBar(), and TestUlOfdmaPowerControl::SendMuBar().

+ Here is the caller graph for this function:

◆ SetGiAndLtfType()

void ns3::CtrlTriggerHeader::SetGiAndLtfType ( uint16_t  guardInterval,
uint8_t  ltfType 
)

Set the GI And LTF Type subfield of the Common Info field.

Allowed combinations are:

  • 1x LTF + 1.6us GI
  • 2x LTF + 1.6us GI
  • 4x LTF + 3.2us GI
Parameters
guardIntervalthe guard interval duration (in nanoseconds)
ltfTypethe HE-LTF type (1, 2 or 4)

Definition at line 2070 of file ctrl-headers.cc.

References m_giAndLtfType, and NS_FATAL_ERROR.

Referenced by TestUlOfdmaPowerControl::SendMuBar().

+ Here is the caller graph for this function:

◆ SetMoreTF()

void ns3::CtrlTriggerHeader::SetMoreTF ( bool  more)

Set the More TF subfield of the Common Info field.

Parameters
morethe value for the More TF subfield

Definition at line 2017 of file ctrl-headers.cc.

References m_moreTF.

Referenced by TestUlOfdmaPowerControl::SendMuBar().

+ Here is the caller graph for this function:

◆ SetPaddingSize()

void ns3::CtrlTriggerHeader::SetPaddingSize ( std::size_t  size)

Set the size in bytes of the Padding field.

The Padding field, if present, shall be at least two octets in length.

Parameters
sizethe size in bytes of the Padding field

Definition at line 2157 of file ctrl-headers.cc.

References m_padding, and NS_ABORT_MSG_IF.

Referenced by EmlsrDlTxopTest::CheckInitialControlFrame().

+ Here is the caller graph for this function:

◆ SetType()

void ns3::CtrlTriggerHeader::SetType ( TriggerFrameType  type)

Set the Trigger frame type.

Parameters
typethe Trigger frame type

Definition at line 1897 of file ctrl-headers.cc.

References m_triggerType.

Referenced by WifiPrimaryChannelsTest::DoSetup(), ns3::GetMuBarSize(), TestUlOfdmaPowerControl::SendMuBar(), and ns3::WifiDefaultProtectionManager::TryAddMpduToMuPpdu().

+ Here is the caller graph for this function:

◆ SetUlBandwidth()

void ns3::CtrlTriggerHeader::SetUlBandwidth ( uint16_t  bw)

Set the bandwidth of the solicited HE TB PPDU.

Parameters
bwbandwidth (allowed values: 20, 40, 80, 160)

Definition at line 2041 of file ctrl-headers.cc.

References m_ulBandwidth, and NS_FATAL_ERROR.

Referenced by CtrlTriggerHeader(), TestUlOfdmaPowerControl::SendMuBar(), and ns3::WifiDefaultProtectionManager::TryAddMpduToMuPpdu().

+ Here is the caller graph for this function:

◆ SetUlLength()

void ns3::CtrlTriggerHeader::SetUlLength ( uint16_t  len)

Set the UL Length subfield of the Common Info field.

Parameters
lenthe value for the UL Length subfield

Definition at line 1986 of file ctrl-headers.cc.

References m_ulLength.

Referenced by CtrlTriggerHeader(), TestMultiUserScheduler::SelectTxFormat(), TestUlOfdmaPowerControl::SendMuBar(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().

+ Here is the caller graph for this function:

◆ SetUlSpatialReuse()

void ns3::CtrlTriggerHeader::SetUlSpatialReuse ( uint16_t  sr)

Set the UL Spatial Reuse subfield of the Common Info field.

Parameters
srthe value for the UL Spatial Reuse subfield

Definition at line 2145 of file ctrl-headers.cc.

References m_ulSpatialReuse.

Referenced by TestUlOfdmaPowerControl::SendMuBar().

+ Here is the caller graph for this function:

◆ SetVariant()

void ns3::CtrlTriggerHeader::SetVariant ( TriggerFrameVariant  variant)

Set the Common Info field variant.

For the moment, all User Info fields are of the same variant type, hence we forbid changing the Common Info field variant type after adding User Info fields.

Parameters
variantthe Common Info field variant

Definition at line 1775 of file ctrl-headers.cc.

References m_userInfoFields, m_variant, and NS_ABORT_MSG_IF.

Member Data Documentation

◆ m_apTxPower

uint8_t ns3::CtrlTriggerHeader::m_apTxPower
private

Tx Power used by AP to transmit the Trigger Frame.

Definition at line 1338 of file ctrl-headers.h.

Referenced by Deserialize(), GetApTxPower(), operator=(), Serialize(), and SetApTxPower().

◆ m_csRequired

bool ns3::CtrlTriggerHeader::m_csRequired
private

Carrier Sense required.

Definition at line 1335 of file ctrl-headers.h.

Referenced by Deserialize(), GetCsRequired(), operator=(), Serialize(), and SetCsRequired().

◆ m_giAndLtfType

uint8_t ns3::CtrlTriggerHeader::m_giAndLtfType
private

GI And LTF Type subfield.

Definition at line 1337 of file ctrl-headers.h.

Referenced by CtrlTriggerHeader(), Deserialize(), GetGuardInterval(), GetLtfType(), operator=(), Serialize(), and SetGiAndLtfType().

◆ m_moreTF

bool ns3::CtrlTriggerHeader::m_moreTF
private

True if a subsequent Trigger frame follows.

Definition at line 1334 of file ctrl-headers.h.

Referenced by Deserialize(), GetMoreTF(), operator=(), Serialize(), and SetMoreTF().

◆ m_padding

std::size_t ns3::CtrlTriggerHeader::m_padding
private

the size in bytes of the Padding field

Definition at line 1340 of file ctrl-headers.h.

Referenced by Deserialize(), GetPaddingSize(), GetSerializedSize(), operator=(), Serialize(), and SetPaddingSize().

◆ m_triggerType

◆ m_ulBandwidth

uint8_t ns3::CtrlTriggerHeader::m_ulBandwidth
private

UL BW subfield.

Definition at line 1336 of file ctrl-headers.h.

Referenced by Deserialize(), GetUlBandwidth(), operator=(), Serialize(), and SetUlBandwidth().

◆ m_ulLength

uint16_t ns3::CtrlTriggerHeader::m_ulLength
private

Value for the L-SIG Length field.

Definition at line 1333 of file ctrl-headers.h.

Referenced by Deserialize(), GetUlLength(), operator=(), Print(), Serialize(), and SetUlLength().

◆ m_ulSpatialReuse

uint16_t ns3::CtrlTriggerHeader::m_ulSpatialReuse
private

Value for the Spatial Reuse field in HE-SIG-A.

Definition at line 1339 of file ctrl-headers.h.

Referenced by Deserialize(), GetUlSpatialReuse(), operator=(), Serialize(), and SetUlSpatialReuse().

◆ m_userInfoFields

std::list<CtrlTriggerUserInfoField> ns3::CtrlTriggerHeader::m_userInfoFields
private

◆ m_variant

TriggerFrameVariant ns3::CtrlTriggerHeader::m_variant
private

Common Info field.

Common Info field variant

Definition at line 1331 of file ctrl-headers.h.

Referenced by CtrlTriggerHeader(), AddUserInfoField(), Deserialize(), GetVariant(), operator=(), Serialize(), and SetVariant().


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