src/wifi/model/wifi-phy.h
changeset 11174 780a43e4980c
parent 11159 b744c32b69bc
child 11201 ecaa43fa0263
equal deleted inserted replaced
11173:9b4c47e6c37e 11174:780a43e4980c
   207    * \param packet the packet to send
   207    * \param packet the packet to send
   208    * \param txvector the txvector that has tx parameters such as mode, the transmission mode to use to send
   208    * \param txvector the txvector that has tx parameters such as mode, the transmission mode to use to send
   209    *        this packet, and txPowerLevel, a power level to use to send this packet. The real transmission
   209    *        this packet, and txPowerLevel, a power level to use to send this packet. The real transmission
   210    *        power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels
   210    *        power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels
   211    * \param preamble the type of preamble to use to send this packet.
   211    * \param preamble the type of preamble to use to send this packet.
   212    */
   212    * \param packetType the type of the packet 0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU
   213   virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txvector, enum WifiPreamble preamble) = 0;
   213    */
       
   214   virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txvector, enum WifiPreamble preamble, uint8_t packetType) = 0;
   214 
   215 
   215   /**
   216   /**
   216    * \param listener the new listener
   217    * \param listener the new listener
   217    *
   218    *
   218    * Add the input listener to the list of objects to be notified of
   219    * Add the input listener to the list of objects to be notified of
   286   /**
   287   /**
   287    * \param size the number of bytes in the packet to send
   288    * \param size the number of bytes in the packet to send
   288    * \param txvector the transmission parameters used for this packet
   289    * \param txvector the transmission parameters used for this packet
   289    * \param preamble the type of preamble to use for this packet.
   290    * \param preamble the type of preamble to use for this packet.
   290    * \param frequency the channel center frequency (MHz)
   291    * \param frequency the channel center frequency (MHz)
       
   292    * \param packetType the type of the packet 0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU  and 2 is the last MPDU in an A-MPDU
       
   293    * \param incFlag this flag is used to indicate that the static variables need to be update or not. This function is called a couple of times for the same packet so static variables should not be increased each time. 
   291    * \return the total amount of time this PHY will stay busy for
   294    * \return the total amount of time this PHY will stay busy for
   292    *          the transmission of these bytes.
   295    *          the transmission of these bytes.
   293    */
   296    */
   294   static Time CalculateTxDuration (uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble, double frequency);
   297   Time CalculateTxDuration (uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag);
   295 
   298 
   296   /**
   299   /**
   297    * \param preamble the type of preamble
   300    * \param preamble the type of preamble
   298    * \param txvector the transmission parameters used for this packet
   301    * \param txvector the transmission parameters used for this packet
   299 
   302 
   305    * \param preamble the type of preamble
   308    * \param preamble the type of preamble
   306    * 
   309    * 
   307    * \return the WifiMode used for the transmission of the HT-SIG in Mixed Format and greenfield format PLCP header 
   310    * \return the WifiMode used for the transmission of the HT-SIG in Mixed Format and greenfield format PLCP header 
   308    */
   311    */
   309   static WifiMode GetMFPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble);
   312   static WifiMode GetMFPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble);
   310   /**
   313   /** 
   311    * \param payloadMode the WifiMode use for the transmission of the payload
   314    * \param payloadMode the WifiMode use for the transmission of the payload
   312    * \param preamble the type of preamble
   315    * \param preamble the type of preamble
   313    * 
   316    * 
   314    * \return the duration of the HT-SIG in Mixed Format and greenfield format PLCP header 
   317    * \return the duration of the HT-SIG in Mixed Format and greenfield format PLCP header 
   315    */
   318    */
   316   static Time GetPlcpHtSigHeaderDuration (WifiMode payloadMode, WifiPreamble preamble);
   319   static Time GetPlcpHtSigHeaderDuration (WifiMode payloadMode, WifiPreamble preamble);
       
   320 
   317 
   321 
   318   /** 
   322   /** 
   319    * \param payloadMode the WifiMode use for the transmission of the payload
   323    * \param payloadMode the WifiMode use for the transmission of the payload
   320    * \param preamble the type of preamble
   324    * \param preamble the type of preamble
   321    * 
   325    * 
   340   static Time GetPlcpPreambleDuration (WifiMode payloadMode, WifiPreamble preamble);
   344   static Time GetPlcpPreambleDuration (WifiMode payloadMode, WifiPreamble preamble);
   341 
   345 
   342   /** 
   346   /** 
   343    * \param size the number of bytes in the packet to send
   347    * \param size the number of bytes in the packet to send
   344    * \param txvector the transmission parameters used for this packet
   348    * \param txvector the transmission parameters used for this packet
       
   349    * \param preamble the type of preamble to use for this packet.
   345    * \param frequency the channel center frequency (MHz)
   350    * \param frequency the channel center frequency (MHz)
       
   351    * \param packetType the type of the packet 0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU  and 2 is the last MPDU in an A-MPDU
       
   352    * \param incFlag this flag is used to indicate that the static variables need to be update or not. This function is called a couple of times for the same packet so static variables should not be increased each time
   346    * 
   353    * 
   347    * \return the duration of the payload
   354    * \return the duration of the payload
   348    */
   355    */
   349   static Time GetPayloadDuration (uint32_t size, WifiTxVector txvector, double frequency);
   356   Time GetPayloadDuration (uint32_t size, WifiTxVector txvector, WifiPreamble preamble, double frequency, uint8_t packetType, uint8_t incFlag);
   350 
   357 
   351   /**
   358   /**
   352    * The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used
   359    * The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used
   353    * (e.g., by a WifiRemoteStationManager) to determine the set of
   360    * (e.g., by a WifiRemoteStationManager) to determine the set of
   354    * transmission/reception modes that this WifiPhy(-derived class)
   361    * transmission/reception modes that this WifiPhy(-derived class)
  1212    * ieee80211_input_monitor()
  1219    * ieee80211_input_monitor()
  1213    *
  1220    *
  1214    * \see class CallBackTraceSource
  1221    * \see class CallBackTraceSource
  1215    */
  1222    */
  1216   TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool,uint8_t> m_phyMonitorSniffTxTrace;
  1223   TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool,uint8_t> m_phyMonitorSniffTxTrace;
  1217 
  1224     
       
  1225   uint32_t m_totalAmpduNumSymbols; //!< Number of symbols previously transmitted for the MPDUs in an A-MPDU, used for the computation of the number of symbols needed for the last MPDU in the A-MPDU
       
  1226   uint32_t m_totalAmpduSize;       //!< Total size of the previously transmitted MPDUs in an A-MPDU, used for the computation of the number of symbols needed for the last MPDU in the A-MPDU
  1218 };
  1227 };
  1219 
  1228 
  1220 /**
  1229 /**
  1221  * \param os          output stream
  1230  * \param os          output stream
  1222  * \param state       wifi state to stringify
  1231  * \param state       wifi state to stringify