From 933678331e3ced19370b1d935bd005bb814ef752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 3 May 2023 20:21:15 +0200 Subject: [PATCH] wifi: Define initial EHT PHY header variants --- src/wifi/model/eht/eht-ppdu.h | 46 ++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/src/wifi/model/eht/eht-ppdu.h b/src/wifi/model/eht/eht-ppdu.h index 2087078fe..098f5bd84 100644 --- a/src/wifi/model/eht/eht-ppdu.h +++ b/src/wifi/model/eht/eht-ppdu.h @@ -40,6 +40,45 @@ namespace ns3 class EhtPpdu : public HePpdu { public: + /** + * PHY header for EHT TB PPDUs + */ + struct EhtTbPhyHeader + { + // U-SIG fields + uint8_t m_phyVersionId{0}; ///< PHY Version Identifier field + uint8_t m_bandwidth{0}; ///< Bandwidth field + uint8_t m_bssColor{0}; ///< BSS color field + uint8_t m_ppduType{0}; ///< PPDU Type And Compressed Mode field + + }; // struct EhtTbPhyHeader + + /** + * PHY header for EHT MU PPDUs + */ + struct EhtMuPhyHeader + { + // U-SIG fields + uint8_t m_phyVersionId{0}; ///< PHY Version Identifier field + uint8_t m_bandwidth{0}; ///< Bandwidth field + uint8_t m_bssColor{0}; ///< BSS color field + uint8_t m_ppduType{0}; ///< PPDU Type And Compressed Mode field + uint8_t m_sigBMcs{0}; ///< EHT-SIG-B MCS + + // EHT-SIG fields + uint8_t m_giLtfSize{0}; ///< GI+LTF Size field + + RuAllocation m_ruAllocationA; //!< RU Allocation-A that are going to be carried in EHT-SIG + //!< common subfields + RuAllocation m_ruAllocationB; //!< RU Allocation-B that are going to be carried in EHT-SIG + //!< common subfields + + HeSigBContentChannels m_contentChannels; //!< EHT-SIG Content Channels + }; // struct EhtMuPhyHeader + + /// type of the EHT PHY header + using EhtPhyHeader = std::variant; + /** * Create an EHT PPDU, storing a map of PSDUs. * @@ -93,9 +132,10 @@ class EhtPpdu : public HePpdu bool IsUlMu() const override; void SetTxVectorFromPhyHeaders(WifiTxVector& txVector) const override; - uint8_t m_ehtPpduType{1}; /**< EHT_PPDU_TYPE per Table 36-1 IEEE 802.11be D2.3. - To be removed once EHT PHY headers are supported. */ -}; // class EhtPpdu + uint8_t m_ehtPpduType{1}; /**< EHT_PPDU_TYPE per Table 36-1 IEEE 802.11be D2.3. + To be removed once EHT PHY headers are supported. */ + EhtPhyHeader m_ehtPhyHeader; //!< the EHT PHY header +}; // class EhtPpdu } // namespace ns3