wifi: Remove useless extraction operators in wifi IEs
authorSébastien Deronne <sebastien.deronne@gmail.com>
Wed, 28 Mar 2018 12:44:36 +0200
changeset 13427 cc03236623ec
parent 13426 e680ec5efd2a
child 13428 355c696b1dd5
wifi: Remove useless extraction operators in wifi IEs
src/wifi/model/erp-information.cc
src/wifi/model/erp-information.h
src/wifi/model/extended-capabilities.cc
src/wifi/model/extended-capabilities.h
src/wifi/model/he-capabilities.cc
src/wifi/model/he-capabilities.h
src/wifi/model/he-operation.cc
src/wifi/model/he-operation.h
src/wifi/model/ht-capabilities.cc
src/wifi/model/ht-capabilities.h
src/wifi/model/ht-operation.cc
src/wifi/model/ht-operation.h
src/wifi/model/vht-capabilities.cc
src/wifi/model/vht-capabilities.h
src/wifi/model/vht-operation.cc
src/wifi/model/vht-operation.h
--- a/src/wifi/model/erp-information.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/erp-information.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -121,8 +121,6 @@
   return length;
 }
 
-ATTRIBUTE_HELPER_CPP (ErpInformation);
-
 /**
  * output stream output operator
  *
@@ -141,23 +139,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param erpinformation
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is, ErpInformation &erpinformation)
-{
-  bool c1, c2, c3;
-  is >> c1 >> c2 >> c3;
-  erpinformation.SetBarkerPreambleMode (c1);
-  erpinformation.SetUseProtection (c2);
-  erpinformation.SetNonErpPresent (c3);
-
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/erp-information.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/erp-information.h	Wed Mar 28 12:44:36 2018 +0200
@@ -143,17 +143,6 @@
  * \returns output stream
  */
 std::ostream &operator << (std::ostream &os, const ErpInformation &erpinformation);
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param erpinformation
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is, ErpInformation &erpinformation);
-
-ATTRIBUTE_HELPER_HEADER (ErpInformation);
 
 } //namespace ns3
 
--- a/src/wifi/model/extended-capabilities.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/extended-capabilities.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -390,8 +390,6 @@
   return length;
 }
 
-ATTRIBUTE_HELPER_CPP (ExtendedCapabilities);
-
 /**
  * output stream output operator
  *
@@ -406,17 +404,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param extendedcapabilities the extended capabilities
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is, ExtendedCapabilities &extendedcapabilities)
-{
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/extended-capabilities.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/extended-capabilities.h	Wed Mar 28 12:44:36 2018 +0200
@@ -212,7 +212,7 @@
   uint8_t m_collocatedInterferenceReporting; ///< Collocated Interference Reporting
   uint8_t m_civicLocation; ///< Civic Location
   uint8_t m_geospatialLocation; ///< Geospatial Location
-  
+
   uint8_t m_tfs; ///< TFS
   uint8_t m_wnmSleepMode; ///< WNM Sleep Mode
   uint8_t m_timBroadcast; ///< TIM Broadcast
@@ -221,7 +221,7 @@
   uint8_t m_acStationCount; ///< AC Station Count
   uint8_t m_multipleBssid; ///< Multiple BSSID
   uint8_t m_timingMeasurement; ///< Timing Measurement
-  
+
   uint8_t m_channelUsage; ///< Channel Usage
   uint8_t m_ssidList; ///< SSID List
   uint8_t m_dms; ///< DMS
@@ -230,7 +230,7 @@
   uint8_t m_tdlsPeerPsmSupport; ///< TDLS Peer PSM Support
   uint8_t m_tdlsChannelSwitching; ///< TDLS Channel Switching
   uint8_t m_interworking; ///< Interworking
-  
+
   uint8_t m_qosMap; ///< QoS Map
   uint8_t m_ebr; ///< EBR
   uint8_t m_sspnInterface; ///< SSPN Interface
@@ -245,7 +245,7 @@
   uint8_t m_uapsdCoexistence; ///< U-APSD Coexistence
   uint8_t m_wnmNotification; ///< WNM Notification
   uint8_t m_qabCapability; ///< QAB Capability
-  
+
   uint8_t m_utf8Ssid; ///< UTF-8 SSID
   uint8_t m_qmfActivated; ///< QMFActivated
   uint8_t m_qmfReconfigurationActivated; ///< QMFReconfigurationActivated
@@ -268,9 +268,6 @@
 };
 
 std::ostream &operator << (std::ostream &os, const ExtendedCapabilities &extendedcapabilities);
-std::istream &operator >> (std::istream &is, ExtendedCapabilities &extendedcapabilities);
-
-ATTRIBUTE_HELPER_HEADER (ExtendedCapabilities);
 
 } //namespace ns3
 
--- a/src/wifi/model/he-capabilities.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/he-capabilities.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -469,8 +469,6 @@
   return m_highestNssSupportedM1 + 1;
 }
 
-ATTRIBUTE_HELPER_CPP (HeCapabilities);
-
 /**
  * output stream output operator
  * \param os the output stream
@@ -488,24 +486,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- * \param is the output stream
- * \param HeCapabilities the HE capabilities
- * \returns the input stream
- */
-std::istream &operator >> (std::istream &is, HeCapabilities &HeCapabilities)
-{
-  uint32_t c1;
-  uint8_t c2;
-  uint64_t c3;
-  uint8_t c4;
-  uint16_t c5;
-  is >> c1 >> c2 >> c3 >> c4 >> c5;
-  HeCapabilities.SetHeMacCapabilitiesInfo (c1, c2);
-  HeCapabilities.SetHePhyCapabilitiesInfo (c3, c4);
-  HeCapabilities.SetSupportedMcsAndNss (c5);
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/he-capabilities.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/he-capabilities.h	Wed Mar 28 12:44:36 2018 +0200
@@ -287,9 +287,6 @@
 };
 
 std::ostream &operator << (std::ostream &os, const HeCapabilities &HeCapabilities);
-std::istream &operator >> (std::istream &is, HeCapabilities &HeCapabilities);
-
-ATTRIBUTE_HELPER_HEADER (HeCapabilities);
 
 } //namespace ns3
 
--- a/src/wifi/model/he-operation.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/he-operation.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -150,8 +150,6 @@
   return length;
 }
 
-ATTRIBUTE_HELPER_CPP (HeOperation);
-
 /**
  * output stream output operator
  *
@@ -168,20 +166,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param HeOperation the HE operation
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is, HeOperation &HeOperation)
-{
-  uint32_t c1;
-  is >> c1;
-  HeOperation.SetHeOperationParameters (c1);
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/he-operation.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/he-operation.h	Wed Mar 28 12:44:36 2018 +0200
@@ -140,9 +140,6 @@
 };
 
 std::ostream &operator << (std::ostream &os, const HeOperation &HeOperation);
-std::istream &operator >> (std::istream &is, HeOperation &HeOperation);
-
-ATTRIBUTE_HELPER_HEADER (HeOperation);
 
 } //namespace ns3
 
--- a/src/wifi/model/ht-capabilities.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/ht-capabilities.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -592,8 +592,6 @@
   return length;
 }
 
-ATTRIBUTE_HELPER_CPP (HtCapabilities);
-
 /**
  * output stream output operator
  *
@@ -616,24 +614,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param htcapabilities the HT capabilities
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is, HtCapabilities &htcapabilities)
-{
-  bool c1, c2, c3, c4;
-  is >> c1 >> c2 >> c3 >> c4;
-  htcapabilities.SetLdpc (c1);
-  htcapabilities.SetSupportedChannelWidth (c2);
-  htcapabilities.SetGreenfield (c3);
-  htcapabilities.SetShortGuardInterval20 (c4);
-
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/ht-capabilities.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/ht-capabilities.h	Wed Mar 28 12:44:36 2018 +0200
@@ -453,9 +453,6 @@
 };
 
 std::ostream &operator << (std::ostream &os, const HtCapabilities &htcapabilities);
-std::istream &operator >> (std::istream &is, HtCapabilities &htcapabilities);
-
-ATTRIBUTE_HELPER_HEADER (HtCapabilities);
 
 } //namespace ns3
 
--- a/src/wifi/model/ht-operation.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/ht-operation.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -357,7 +357,7 @@
   val |= (m_nonGfHtStasPresent & 0x01) << 2;
   val |= (m_reservedInformationSubset2_1 & 0x01) << 3;
   val |= (m_obssNonHtStasPresent & 0x01) << 4;
-  val |= (m_reservedInformationSubset2_1 & 0x07ff) << 5;
+  val |= (m_reservedInformationSubset2_2 & 0x07ff) << 5;
   return val;
 }
 
@@ -368,7 +368,7 @@
   m_nonGfHtStasPresent = (ctrl >> 2) & 0x01;
   m_reservedInformationSubset2_1 = (ctrl >> 3) & 0x01;
   m_obssNonHtStasPresent = (ctrl >> 4) & 0x01;
-  m_reservedInformationSubset2_1 = static_cast<uint8_t>((ctrl >> 5) & 0x07ff);
+  m_reservedInformationSubset2_2 = static_cast<uint8_t> ((ctrl >> 5) & 0x07ff);
 }
 
 uint16_t
@@ -489,9 +489,6 @@
   return length;
 }
 
-/// HtOperation
-ATTRIBUTE_HELPER_CPP (HtOperation);
-
 /**
  * output stream output operator
  *
@@ -510,23 +507,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param htOperation the HT operation
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is, HtOperation &htOperation)
-{
-  bool c1, c2, c3;
-  is >> c1 >> c2 >> c3;
-  htOperation.SetStaChannelWidth (c1);
-  htOperation.SetRifsMode (c2);
-  htOperation.SetDualCtsProtection (c3);
-
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/ht-operation.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/ht-operation.h	Wed Mar 28 12:44:36 2018 +0200
@@ -443,9 +443,6 @@
 };
 
 std::ostream &operator << (std::ostream &os, const HtOperation &htOperation);
-std::istream &operator >> (std::istream &is, HtOperation &htOperation);
-
-ATTRIBUTE_HELPER_HEADER (HtOperation);
 
 } //namespace ns3
 
--- a/src/wifi/model/vht-capabilities.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/vht-capabilities.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -426,8 +426,6 @@
   return m_txHighestSupportedLongGuardIntervalDataRate;
 }
 
-ATTRIBUTE_HELPER_CPP (VhtCapabilities);
-
 /**
  * output stream output operator
  *
@@ -444,23 +442,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param VhtCapabilities the VHT capabilities
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is,VhtCapabilities &VhtCapabilities)
-{
-  uint32_t c1;
-  uint64_t c2;
-  is >>  c1 >> c2;
-  VhtCapabilities.SetVhtCapabilitiesInfo (c1);
-  VhtCapabilities.SetSupportedMcsAndNssSet (c2);
-
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/vht-capabilities.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/vht-capabilities.h	Wed Mar 28 12:44:36 2018 +0200
@@ -317,9 +317,6 @@
 };
 
 std::ostream &operator << (std::ostream &os, const VhtCapabilities &vhtcapabilities);
-std::istream &operator >> (std::istream &is, VhtCapabilities &vhtcapabilities);
-
-ATTRIBUTE_HELPER_HEADER (VhtCapabilities);
 
 } //namespace ns3
 
--- a/src/wifi/model/vht-operation.cc	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/vht-operation.cc	Wed Mar 28 12:44:36 2018 +0200
@@ -161,8 +161,6 @@
   return length;
 }
 
-ATTRIBUTE_HELPER_CPP (VhtOperation);
-
 /**
  * output stream output operator
  *
@@ -181,24 +179,4 @@
   return os;
 }
 
-/**
- * input stream input operator
- *
- * \param is input stream
- * \param VhtOperation the VHT operation
- *
- * \returns input stream
- */
-std::istream &operator >> (std::istream &is, VhtOperation &VhtOperation)
-{
-  uint8_t c1, c2, c3;
-  uint16_t c4;
-  is >> c1 >> c2 >> c3 >> c4;
-  VhtOperation.SetChannelWidth (c1);
-  VhtOperation.SetChannelCenterFrequencySegment0 (c2);
-  VhtOperation.SetChannelCenterFrequencySegment1 (c3);
-  VhtOperation.SetBasicVhtMcsAndNssSet (c4);
-  return is;
-}
-
 } //namespace ns3
--- a/src/wifi/model/vht-operation.h	Wed Mar 28 12:29:54 2018 +0200
+++ b/src/wifi/model/vht-operation.h	Wed Mar 28 12:44:36 2018 +0200
@@ -162,9 +162,6 @@
 };
 
 std::ostream &operator << (std::ostream &os, const VhtOperation &VhtOperation);
-std::istream &operator >> (std::istream &is, VhtOperation &VhtOperation);
-
-ATTRIBUTE_HELPER_HEADER (VhtOperation);
 
 } //namespace ns3