A Discrete-Event Network Simulator
API
ctrl-headers.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 MIRKO BANCHI
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Mirko Banchi <mk.banchi@gmail.com>
18  */
19 
20 #ifndef CTRL_HEADERS_H
21 #define CTRL_HEADERS_H
22 
23 #include "block-ack-type.h"
24 #include "wifi-phy-common.h"
25 
26 #include "ns3/he-ru.h"
27 #include "ns3/header.h"
28 #include "ns3/mac48-address.h"
29 
30 #include <list>
31 #include <vector>
32 
33 namespace ns3
34 {
35 
36 class WifiTxVector;
37 enum AcIndex : uint8_t;
38 
52 {
53  public:
55  ~CtrlBAckRequestHeader() override;
60  static TypeId GetTypeId();
61 
62  TypeId GetInstanceTypeId() const override;
63  void Print(std::ostream& os) const override;
64  uint32_t GetSerializedSize() const override;
65  void Serialize(Buffer::Iterator start) const override;
66  uint32_t Deserialize(Buffer::Iterator start) override;
67 
73  void SetHtImmediateAck(bool immediateAck);
85  void SetTidInfo(uint8_t tid);
92  void SetStartingSequence(uint16_t seq);
93 
100  bool MustSendHtImmediateAck() const;
106  BlockAckReqType GetType() const;
112  uint8_t GetTidInfo() const;
118  uint16_t GetStartingSequence() const;
126  bool IsBasic() const;
134  bool IsCompressed() const;
141  bool IsExtendedCompressed() const;
148  bool IsMultiTid() const;
149 
155  uint16_t GetStartingSequenceControl() const;
156 
157  private:
164  void SetStartingSequenceControl(uint16_t seqControl);
170  uint16_t GetBarControl() const;
176  void SetBarControl(uint16_t bar);
177 
186  uint16_t m_tidInfo;
187  uint16_t m_startingSeq;
188 };
189 
203 {
204  public:
206  ~CtrlBAckResponseHeader() override;
211  static TypeId GetTypeId();
212  TypeId GetInstanceTypeId() const override;
213  void Print(std::ostream& os) const override;
214  uint32_t GetSerializedSize() const override;
215  void Serialize(Buffer::Iterator start) const override;
216  uint32_t Deserialize(Buffer::Iterator start) override;
217 
223  void SetHtImmediateAck(bool immediateAck);
229  void SetType(BlockAckType type);
239  void SetTidInfo(uint8_t tid, std::size_t index = 0);
249  void SetStartingSequence(uint16_t seq, std::size_t index = 0);
250 
257  bool MustSendHtImmediateAck() const;
263  BlockAckType GetType() const;
273  uint8_t GetTidInfo(std::size_t index = 0) const;
282  uint16_t GetStartingSequence(std::size_t index = 0) const;
289  bool IsBasic() const;
296  bool IsCompressed() const;
303  bool IsExtendedCompressed() const;
310  bool IsMultiTid() const;
317  bool IsMultiSta() const;
318 
326  void SetAid11(uint16_t aid, std::size_t index);
334  uint16_t GetAid11(std::size_t index) const;
342  void SetAckType(bool type, std::size_t index);
350  bool GetAckType(std::size_t index) const;
359  void SetUnassociatedStaAddress(const Mac48Address& ra, std::size_t index);
368  Mac48Address GetUnassociatedStaAddress(std::size_t index) const;
375  std::size_t GetNPerAidTidInfoSubfields() const;
384  std::vector<uint32_t> FindPerAidTidInfoWithAid(uint16_t aid) const;
385 
394  void SetReceivedPacket(uint16_t seq, std::size_t index = 0);
402  void SetReceivedFragment(uint16_t seq, uint8_t frag);
413  bool IsPacketReceived(uint16_t seq, std::size_t index = 0) const;
424  bool IsFragmentReceived(uint16_t seq, uint8_t frag) const;
425 
434  uint16_t GetStartingSequenceControl(std::size_t index = 0) const;
443  void SetStartingSequenceControl(uint16_t seqControl, std::size_t index = 0);
452  const std::vector<uint8_t>& GetBitmap(std::size_t index = 0) const;
453 
460  void ResetBitmap(std::size_t index = 0);
461 
462  private:
468  uint16_t GetBaControl() const;
474  void SetBaControl(uint16_t ba);
475 
484  Buffer::Iterator SerializeBitmap(Buffer::Iterator start, std::size_t index = 0) const;
494 
510  uint16_t IndexInBitmap(uint16_t seq, std::size_t index = 0) const;
511 
521  bool IsInBitmap(uint16_t seq, std::size_t index = 0) const;
522 
531  uint16_t m_tidInfo;
532 
542  {
543  uint16_t m_aidTidInfo;
546  uint16_t m_startingSeq;
547  std::vector<uint8_t> m_bitmap;
550  };
551 
552  std::vector<BaInfoInstance> m_baInfo;
553 };
554 
559 enum class TriggerFrameType : uint8_t
560 {
561  BASIC_TRIGGER = 0, // Basic
562  BFRP_TRIGGER = 1, // Beamforming Report Poll
563  MU_BAR_TRIGGER = 2, // Multi-User Block Ack Request
564  MU_RTS_TRIGGER = 3, // Multi-User Request To Send
565  BSRP_TRIGGER = 4, // Buffer Status Report Poll
566  GCR_MU_BAR_TRIGGER = 5, // Groupcast with Retries MU-BAR
567  BQRP_TRIGGER = 6, // Bandwidth Query Report Poll
568  NFRP_TRIGGER = 7 // NDP Feedback Report Poll
569 };
570 
575 enum class TriggerFrameVariant : uint8_t
576 {
577  HE = 0,
578  EHT
579 };
580 
590 {
591  public:
618  void Print(std::ostream& os) const;
624  uint32_t GetSerializedSize() const;
646  TriggerFrameType GetType() const;
658  void SetAid12(uint16_t aid);
664  uint16_t GetAid12() const;
671  bool HasRaRuForAssociatedSta() const;
678  bool HasRaRuForUnassociatedSta() const;
685  void SetRuAllocation(HeRu::RuSpec ru);
722  void SetMuRtsRuAllocation(uint8_t value);
728  uint8_t GetMuRtsRuAllocation() const;
734  void SetUlFecCodingType(bool ldpc);
740  bool GetUlFecCodingType() const;
746  void SetUlMcs(uint8_t mcs);
752  uint8_t GetUlMcs() const;
759  void SetUlDcm(bool dcm);
766  bool GetUlDcm() const;
775  void SetSsAllocation(uint8_t startingSs, uint8_t nSs);
781  uint8_t GetStartingSs() const;
787  uint8_t GetNss() const;
796  void SetRaRuInformation(uint8_t nRaRu, bool moreRaRu);
803  uint8_t GetNRaRus() const;
811  bool GetMoreRaRu() const;
823  void SetUlTargetRssi(int8_t dBm);
831  bool IsUlTargetRssiMaxTxPower() const;
838  int8_t GetUlTargetRssi() const;
846  void SetBasicTriggerDepUserInfo(uint8_t spacingFactor, uint8_t tidLimit, AcIndex prefAc);
853  uint8_t GetMpduMuSpacingFactor() const;
860  uint8_t GetTidAggregationLimit() const;
867  AcIndex GetPreferredAc() const;
888 
889  private:
891 
892  uint16_t m_aid12;
893  uint8_t m_ruAllocation;
895  uint8_t m_ulMcs;
896  bool m_ulDcm;
897  bool m_ps160;
898 
899  union {
900  struct
901  {
902  uint8_t startingSs;
903  uint8_t nSs;
905 
906  struct
907  {
908  uint8_t nRaRu;
909  bool moreRaRu;
912 
913  uint8_t m_ulTargetRssi;
919 };
920 
941 class CtrlTriggerHeader : public Header
942 {
943  public:
963  ~CtrlTriggerHeader() override;
978  static TypeId GetTypeId();
979  TypeId GetInstanceTypeId() const override;
980  void Print(std::ostream& os) const override;
981  uint32_t GetSerializedSize() const override;
982  void Serialize(Buffer::Iterator start) const override;
983  uint32_t Deserialize(Buffer::Iterator start) override;
984 
993  void SetVariant(TriggerFrameVariant variant);
1011  TriggerFrameType GetType() const;
1017  const char* GetTypeString() const;
1024  static const char* GetTypeString(TriggerFrameType type);
1031  bool IsBasic() const;
1038  bool IsBfrp() const;
1045  bool IsMuBar() const;
1052  bool IsMuRts() const;
1059  bool IsBsrp() const;
1066  bool IsGcrMuBar() const;
1073  bool IsBqrp() const;
1080  bool IsNfrp() const;
1086  void SetUlLength(uint16_t len);
1092  uint16_t GetUlLength() const;
1101  WifiTxVector GetHeTbTxVector(uint16_t staId) const;
1107  void SetMoreTF(bool more);
1113  bool GetMoreTF() const;
1119  void SetCsRequired(bool cs);
1125  bool GetCsRequired() const;
1131  void SetUlBandwidth(uint16_t bw);
1137  uint16_t GetUlBandwidth() const;
1148  void SetGiAndLtfType(uint16_t guardInterval, uint8_t ltfType);
1154  uint16_t GetGuardInterval() const;
1160  uint8_t GetLtfType() const;
1166  void SetApTxPower(int8_t power);
1173  int8_t GetApTxPower() const;
1179  void SetUlSpatialReuse(uint16_t sr);
1185  uint16_t GetUlSpatialReuse() const;
1192  void SetPaddingSize(std::size_t size);
1196  std::size_t GetPaddingSize() const;
1204 
1222 
1224  typedef std::list<CtrlTriggerUserInfoField>::const_iterator ConstIterator;
1225 
1227  typedef std::list<CtrlTriggerUserInfoField>::iterator Iterator;
1228 
1234  ConstIterator begin() const;
1240  ConstIterator end() const;
1246  Iterator begin();
1252  Iterator end();
1258  std::size_t GetNUserInfoFields() const;
1269  ConstIterator FindUserInfoWithAid(ConstIterator start, uint16_t aid12) const;
1278  ConstIterator FindUserInfoWithAid(uint16_t aid12) const;
1325  bool IsValid() const;
1326 
1327  private:
1333  uint16_t m_ulLength;
1334  bool m_moreTF;
1336  uint8_t m_ulBandwidth;
1337  uint8_t m_giAndLtfType;
1338  uint8_t m_apTxPower;
1339  uint16_t m_ulSpatialReuse;
1340  std::size_t m_padding;
1341 
1345  std::list<CtrlTriggerUserInfoField> m_userInfoFields;
1346 };
1347 
1348 } // namespace ns3
1349 
1350 #endif /* CTRL_HEADERS_H */
iterator in a Buffer instance
Definition: buffer.h:100
Headers for BlockAckRequest.
Definition: ctrl-headers.h:52
uint16_t GetStartingSequence() const
Return the starting sequence number.
uint32_t GetSerializedSize() const override
Definition: ctrl-headers.cc:72
void Serialize(Buffer::Iterator start) const override
Definition: ctrl-headers.cc:94
uint16_t m_startingSeq
starting seq
Definition: ctrl-headers.h:187
bool m_barAckPolicy
The LSB bit of the BAR control field is used only for the HT (High Throughput) delayed block ack conf...
Definition: ctrl-headers.h:184
uint16_t m_tidInfo
TID info.
Definition: ctrl-headers.h:186
uint8_t GetTidInfo() const
Return the Traffic ID (TID).
bool IsExtendedCompressed() const
Check if the current Ack Policy is Extended Compressed Block Ack.
void Print(std::ostream &os) const override
Definition: ctrl-headers.cc:66
void SetType(BlockAckReqType type)
Set the BlockAckRequest type.
BlockAckReqType m_barType
BAR type.
Definition: ctrl-headers.h:185
void SetStartingSequenceControl(uint16_t seqControl)
Set the starting sequence control with the given sequence control value.
bool IsMultiTid() const
Check if the current Ack Policy has Multi-TID Block Ack.
BlockAckReqType GetType() const
Return the BlockAckRequest type.
void SetHtImmediateAck(bool immediateAck)
Enable or disable HT immediate Ack.
bool IsCompressed() const
Check if the current Ack Policy is Compressed Block Ack and not multi-TID.
void SetStartingSequence(uint16_t seq)
Set the starting sequence number from the given raw sequence control field.
void SetTidInfo(uint8_t tid)
Set Traffic ID (TID).
uint16_t GetBarControl() const
Return the Block Ack control.
static TypeId GetTypeId()
Get the type ID.
Definition: ctrl-headers.cc:50
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: ctrl-headers.cc:60
uint16_t GetStartingSequenceControl() const
Return the starting sequence control.
void SetBarControl(uint16_t bar)
Set the Block Ack control.
bool MustSendHtImmediateAck() const
Check if the current Ack Policy is immediate.
bool IsBasic() const
Check if the current Ack Policy is Basic Block Ack (i.e.
Headers for BlockAck response.
Definition: ctrl-headers.h:203
void SetBaControl(uint16_t ba)
Set the Block Ack control.
bool IsExtendedCompressed() const
Check if the current BA policy is Extended Compressed Block Ack.
void SetStartingSequence(uint16_t seq, std::size_t index=0)
For Block Ack variants other than Multi-STA Block Ack, set the starting sequence number to the given ...
uint16_t GetStartingSequenceControl(std::size_t index=0) const
Return the value of the Starting Sequence Control subfield.
BlockAckType m_baType
BA type.
Definition: ctrl-headers.h:530
bool IsFragmentReceived(uint16_t seq, uint8_t frag) const
Check if the packet with the given sequence number and fragment number was acknowledged in this Block...
void Serialize(Buffer::Iterator start) const override
bool IsPacketReceived(uint16_t seq, std::size_t index=0) const
Check if the packet with the given sequence number was acknowledged in this BlockAck response.
void SetStartingSequenceControl(uint16_t seqControl, std::size_t index=0)
Set the Starting Sequence Control subfield with the given sequence control value.
std::vector< uint32_t > FindPerAidTidInfoWithAid(uint16_t aid) const
For Multi-STA Block Acks, get the indices of the Per AID TID Info subfields carrying the given AID in...
Buffer::Iterator SerializeBitmap(Buffer::Iterator start, std::size_t index=0) const
Serialize bitmap to the given buffer.
std::size_t GetNPerAidTidInfoSubfields() const
For Multi-STA Block Acks, get the number of Per AID TID Info subfields included in this Block Ack.
uint16_t GetStartingSequence(std::size_t index=0) const
For Block Ack variants other than Multi-STA Block Ack, get the starting sequence number.
Mac48Address GetUnassociatedStaAddress(std::size_t index) const
For Multi-STA Block Acks, get the RA subfield of the Per AID TID Info subfield (with AID11 subfield e...
uint8_t GetTidInfo(std::size_t index=0) const
For Block Ack variants other than Multi-STA Block Ack, get the TID_INFO subfield of the BA Control fi...
bool IsBasic() const
Check if the current BA policy is Basic Block Ack.
const std::vector< uint8_t > & GetBitmap(std::size_t index=0) const
Return a const reference to the bitmap from the BlockAck response header.
bool m_baAckPolicy
The LSB bit of the BA control field is used only for the HT (High Throughput) delayed block ack confi...
Definition: ctrl-headers.h:529
bool IsCompressed() const
Check if the current BA policy is Compressed Block Ack.
void SetUnassociatedStaAddress(const Mac48Address &ra, std::size_t index)
For Multi-STA Block Acks, set the RA subfield of the Per AID TID Info subfield (with AID11 subfield e...
bool MustSendHtImmediateAck() const
Check if the current Ack Policy is immediate.
Buffer::Iterator DeserializeBitmap(Buffer::Iterator start, std::size_t index=0)
Deserialize bitmap from the given buffer.
void ResetBitmap(std::size_t index=0)
Reset the bitmap to 0.
void SetAckType(bool type, std::size_t index)
For Multi-STA Block Acks, set the Ack Type subfield of the Per AID TID Info subfield identified by th...
void SetTidInfo(uint8_t tid, std::size_t index=0)
For Block Ack variants other than Multi-STA Block Ack, set the TID_INFO subfield of the BA Control fi...
uint16_t m_tidInfo
TID info (reserved if Multi-STA Block Ack)
Definition: ctrl-headers.h:531
void Print(std::ostream &os) const override
void SetType(BlockAckType type)
Set the block ack type.
uint32_t GetSerializedSize() const override
uint16_t GetBaControl() const
Return the Block Ack control.
BlockAckType GetType() const
Return the block ack type ID.
void SetReceivedFragment(uint16_t seq, uint8_t frag)
Set the bitmap that the packet with the given sequence number and fragment number was received.
static TypeId GetTypeId()
Get the type ID.
void SetReceivedPacket(uint16_t seq, std::size_t index=0)
Record in the bitmap that the packet with the given sequence number was received.
bool IsMultiTid() const
Check if the current BA policy is Multi-TID Block Ack.
void SetHtImmediateAck(bool immediateAck)
Enable or disable HT immediate Ack.
std::vector< BaInfoInstance > m_baInfo
BA Information field.
Definition: ctrl-headers.h:552
void SetAid11(uint16_t aid, std::size_t index)
For Multi-STA Block Acks, set the AID11 subfield of the Per AID TID Info subfield identified by the g...
bool GetAckType(std::size_t index) const
For Multi-STA Block Acks, get the Ack Type subfield of the Per AID TID Info subfield identified by th...
uint16_t GetAid11(std::size_t index) const
For Multi-STA Block Acks, get the AID11 subfield of the Per AID TID Info subfield identified by the g...
bool IsMultiSta() const
Check if the BlockAck frame variant is Multi-STA Block Ack.
bool IsInBitmap(uint16_t seq, std::size_t index=0) const
Check if sequence number seq can be acknowledged in the bitmap.
uint16_t IndexInBitmap(uint16_t seq, std::size_t index=0) const
This function is used to correctly index in both bitmap and compressed bitmap, one bit or one block o...
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Headers for Trigger frames.
Definition: ctrl-headers.h:942
std::size_t GetPaddingSize() const
CtrlTriggerUserInfoField & AddUserInfoField()
Append a new User Info field to this Trigger frame and return a non-const reference to it.
uint32_t GetSerializedSize() const override
bool IsBasic() const
Check if this is a Basic Trigger frame.
ConstIterator FindUserInfoWithRaRuAssociated() const
Get a const iterator pointing to the first User Info field found which allocates a Random Access RU f...
void Print(std::ostream &os) const override
bool IsNfrp() const
Check if this is a NDP Feedback Report Poll Trigger frame.
void SetApTxPower(int8_t power)
Set the AP TX Power subfield of the Common Info field.
ConstIterator end() const
Get a const iterator indicating past-the-last User Info field in the list.
uint16_t GetUlSpatialReuse() const
Get the UL Spatial Reuse subfield of the Common Info field.
std::size_t m_padding
the size in bytes of the Padding field
uint8_t m_giAndLtfType
GI And LTF Type subfield.
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...
bool IsMuRts() const
Check if this is a MU-RTS Trigger frame.
TriggerFrameType m_triggerType
Trigger type.
void SetPaddingSize(std::size_t size)
Set the size in bytes of the Padding field.
uint16_t GetGuardInterval() const
Get the guard interval duration (in nanoseconds) of the solicited HE TB PPDU.
bool IsBsrp() const
Check if this is a Buffer Status Report Poll Trigger frame.
TriggerFrameType GetType() const
Get the Trigger Frame type.
bool IsMuBar() const
Check if this is a MU-BAR Trigger frame.
void SetUlBandwidth(uint16_t bw)
Set the bandwidth of the solicited HE TB PPDU.
ConstIterator FindUserInfoWithRaRuUnassociated() const
Get a const iterator pointing to the first User Info field found which allocates a Random Access RU f...
bool IsBfrp() const
Check if this is a Beamforming Report Poll Trigger frame.
ConstIterator begin() const
Get a const iterator pointing to the first User Info field in the list.
std::size_t GetNUserInfoFields() const
Get the number of User Info fields in this Trigger Frame.
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::list< CtrlTriggerUserInfoField >::const_iterator ConstIterator
User Info fields list const iterator.
bool IsBqrp() const
Check if this is a Bandwidth Query Report Poll Trigger frame.
static TypeId GetTypeId()
Get the type ID.
bool IsValid() const
Check the validity of this Trigger frame.
void SetType(TriggerFrameType type)
Set the Trigger frame type.
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...
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetCsRequired(bool cs)
Set the CS Required subfield of the Common Info field.
const char * GetTypeString() const
Return a string corresponding to the Trigger Frame type.
uint16_t GetUlLength() const
Get the UL Length subfield of the Common Info field.
uint16_t GetUlBandwidth() const
Get the bandwidth of the solicited HE TB PPDU.
TriggerFrameVariant m_variant
Common Info field.
uint16_t m_ulLength
Value for the L-SIG Length field.
bool m_csRequired
Carrier Sense required.
TriggerFrameVariant GetVariant() const
Get the Common Info field variant.
CtrlTriggerHeader GetCommonInfoField() const
Get a copy of the Common Info field of this Trigger frame.
void SetGiAndLtfType(uint16_t guardInterval, uint8_t ltfType)
Set the GI And LTF Type subfield of the Common Info field.
std::list< CtrlTriggerUserInfoField > m_userInfoFields
List of User Info fields.
bool m_moreTF
True if a subsequent Trigger frame follows.
void SetVariant(TriggerFrameVariant variant)
Set the Common Info field variant.
void SetUlSpatialReuse(uint16_t sr)
Set the UL Spatial Reuse subfield of the Common Info field.
uint8_t m_ulBandwidth
UL BW subfield.
bool GetCsRequired() const
Get the CS Required subfield of the Common Info field.
bool IsGcrMuBar() const
Check if this is a Groupcast with Retries (GCR) MU-BAR Trigger frame.
std::list< CtrlTriggerUserInfoField >::iterator Iterator
User Info fields list iterator.
void SetUlLength(uint16_t len)
Set the UL Length subfield of the Common Info field.
void Serialize(Buffer::Iterator start) const override
int8_t GetApTxPower() const
Get the power value (dBm) indicated by the AP TX Power subfield of the Common Info field.
uint8_t m_apTxPower
Tx Power used by AP to transmit the Trigger Frame.
CtrlTriggerHeader & operator=(const CtrlTriggerHeader &trigger)
Copy assignment operator.
uint16_t m_ulSpatialReuse
Value for the Spatial Reuse field in HE-SIG-A.
void SetMoreTF(bool more)
Set the More TF subfield of the Common Info field.
User Info field of Trigger frames.
Definition: ctrl-headers.h:590
bool GetUlFecCodingType() const
Get the UL FEC Coding Type subfield, which indicates whether BCC or LDPC is used.
bool GetUlDcm() const
Get the UL DCM subfield, which indicates whether or not DCM is used This method can only be used with...
struct ns3::CtrlTriggerUserInfoField::@71::@73 raRuInformation
Used when AID12 is 0 or 2045.
AcIndex GetPreferredAc() const
Get the Preferred AC subfield.
uint8_t GetMpduMuSpacingFactor() const
Get the MPDU MU spacing factor.
int8_t GetUlTargetRssi() const
Get the expected receive signal power for the solicited HE TB PPDU.
uint8_t startingSs
Starting spatial stream.
Definition: ctrl-headers.h:902
TriggerFrameType m_triggerType
Trigger frame type.
Definition: ctrl-headers.h:914
uint8_t GetUlMcs() const
Get the UL MCS subfield, which indicates the MCS of the solicited HE TB PPDU.
WifiPreamble GetPreambleType() const
uint32_t GetSerializedSize() const
Get the expected size of this User Info field.
void SetMuRtsRuAllocation(uint8_t value)
Set the RU Allocation subfield based on the given value for the B7-B1 bits.
CtrlTriggerUserInfoField(TriggerFrameType triggerType, TriggerFrameVariant variant)
Constructor.
void Print(std::ostream &os) const
Print the content of this User Info field.
uint8_t nRaRu
Number of Random Access RUs.
Definition: ctrl-headers.h:908
void SetAid12(uint16_t aid)
Set the AID12 subfield, which carries the 12 LSBs of the AID of the station for which this User Info ...
union ns3::CtrlTriggerUserInfoField::@71 m_bits26To31
Fields occupying bits 26-31 in the User Info field.
bool m_ps160
identifies the location of the RU (EHT variant only)
Definition: ctrl-headers.h:897
const CtrlBAckRequestHeader & GetMuBarTriggerDepUserInfo() const
Get the Trigger Dependent User Info subfield for the MU-BAR variant of Trigger frames,...
void SetUlFecCodingType(bool ldpc)
Set the UL FEC Coding Type subfield, which indicates whether BCC or LDPC is used.
bool HasRaRuForUnassociatedSta() const
Check if this User Info field allocates a Random Access RU for stations not associated with the AP th...
void SetUlTargetRssiMaxTxPower()
Set the UL Target RSSI subfield to indicate to the station to transmit an HE TB PPDU response at its ...
void SetUlMcs(uint8_t mcs)
Set the UL MCS subfield, which indicates the MCS of the solicited HE TB PPDU.
void SetMuBarTriggerDepUserInfo(const CtrlBAckRequestHeader &bar)
Set the Trigger Dependent User Info subfield for the MU-BAR variant of Trigger frames,...
void SetUlDcm(bool dcm)
Set the UL DCM subfield, which indicates whether or not DCM is used.
void SetSsAllocation(uint8_t startingSs, uint8_t nSs)
Set the SS Allocation subfield, which is present when the AID12 subfield is neither 0 nor 2045.
uint16_t m_aid12
Association ID of the addressed station.
Definition: ctrl-headers.h:892
uint8_t nSs
Number of spatial streams.
Definition: ctrl-headers.h:903
uint8_t m_basicTriggerDependentUserInfo
Basic Trigger variant of Trigger Dependent User Info subfield.
Definition: ctrl-headers.h:915
TriggerFrameVariant m_variant
User Info field variant.
Definition: ctrl-headers.h:890
uint8_t GetTidAggregationLimit() const
Get the TID Aggregation Limit.
uint8_t m_ulMcs
MCS to be used by the addressed station.
Definition: ctrl-headers.h:895
TriggerFrameType GetType() const
Get the type of the Trigger Frame this User Info field belongs to.
uint8_t m_ruAllocation
RU Allocation.
Definition: ctrl-headers.h:893
HeRu::RuSpec GetRuAllocation() const
Get the RU specified by the RU Allocation subfield.
struct ns3::CtrlTriggerUserInfoField::@71::@72 ssAllocation
Used when AID12 is neither 0 nor 2045.
uint8_t GetNss() const
Get the number of spatial streams.
bool HasRaRuForAssociatedSta() const
Check if this User Info field allocates a Random Access RU for stations associated with the AP that t...
uint8_t GetMuRtsRuAllocation() const
This method can only be called on MU-RTS Trigger Frames.
uint16_t GetAid12() const
Get the value of the AID12 subfield.
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize the User Info field to the given buffer.
uint8_t GetNRaRus() const
Get the number of contiguous RUs for Random Access.
bool m_ulDcm
whether or not to use Dual Carrier Modulation (HE variant only)
Definition: ctrl-headers.h:896
void SetUlTargetRssi(int8_t dBm)
Set the UL Target RSSI subfield to indicate the expected receive signal power in dBm.
uint8_t GetStartingSs() const
Get the starting spatial stream.
CtrlTriggerUserInfoField & operator=(const CtrlTriggerUserInfoField &userInfo)
Copy assignment operator.
uint8_t m_ulTargetRssi
Expected receive signal power.
Definition: ctrl-headers.h:913
void SetRaRuInformation(uint8_t nRaRu, bool moreRaRu)
Set the RA-RU Information subfield, which is present when the AID12 subfield is 0 or 2045.
Buffer::Iterator Deserialize(Buffer::Iterator start)
Deserialize the User Info field from the given buffer.
bool IsUlTargetRssiMaxTxPower() const
Return true if the UL Target RSSI subfield indicates to the station to transmit an HE TB PPDU respons...
void SetRuAllocation(HeRu::RuSpec ru)
Set the RU Allocation subfield according to the specified RU.
void SetBasicTriggerDepUserInfo(uint8_t spacingFactor, uint8_t tidLimit, AcIndex prefAc)
Set the Trigger Dependent User Info subfield for Basic Trigger frames.
bool moreRaRu
More RA-RU in subsequent Trigger frames.
Definition: ctrl-headers.h:909
bool m_ulFecCodingType
UL FEC Coding Type.
Definition: ctrl-headers.h:894
CtrlBAckRequestHeader m_muBarTriggerDependentUserInfo
MU-BAR variant of Trigger Dependent User Info subfield.
Definition: ctrl-headers.h:918
bool GetMoreRaRu() const
Return true if more RA-RUs are allocated in subsequent Trigger frames that are sent before the end of...
RU Specification.
Definition: he-ru.h:66
Protocol header serialization and deserialization.
Definition: header.h:44
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
an EUI-48 address
Definition: mac48-address.h:46
a unique identifier for an interface.
Definition: type-id.h:59
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
TriggerFrameVariant
The different variants for Common Info field and User Info field of Trigger Frames.
Definition: ctrl-headers.h:576
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:73
TriggerFrameType
The different Trigger frame types.
Definition: ctrl-headers.h:560
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The different BlockAckRequest variants.
The different BlockAck variants.
The following structure can hold the BA Information field for the Basic and Compressed variants,...
Definition: ctrl-headers.h:542
Mac48Address m_ra
RA subfield (address of an unassociated station) for Multi-STA; reserved for other variants.
Definition: ctrl-headers.h:548
uint16_t m_startingSeq
Block Ack Starting Sequence Control subfield.
Definition: ctrl-headers.h:546
std::vector< uint8_t > m_bitmap
block ack bitmap
Definition: ctrl-headers.h:547
uint16_t m_aidTidInfo
Reserved for Basic and Compressed Per TID Info subfield for Multi-TID AID TID Info subfield for Multi...
Definition: ctrl-headers.h:543
Declaration of the following enums: