View | Details | Raw Unified | Return to bug 917
Collapse All | Expand All

(-)a/src/devices/wifi/wifi-remote-station-manager.cc (+36 lines)
 Lines 178-183    Link Here 
178
    .AddTraceSource ("MacTxFinalDataFailed", 
178
    .AddTraceSource ("MacTxFinalDataFailed", 
179
                     "The transmission of a data packet has exceeded the maximum number of attempts",
179
                     "The transmission of a data packet has exceeded the maximum number of attempts",
180
                     MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalDataFailed))
180
                     MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalDataFailed))
181
    .AddAttribute ("DefaultTxPowerLevel", "Default power level to be used for transmissions. "
182
                   "This is the power level that is used by all those WifiManagers that do not"
183
                   "implement TX power control.",
184
                   UintegerValue (0),
185
                   MakeUintegerAccessor (&WifiRemoteStationManager::m_defaultTxPowerLevel),
186
                   MakeUintegerChecker<uint8_t> ())
181
    ;
187
    ;
182
  return tid;
188
  return tid;
183
}
189
}
 Lines 842-845    Link Here 
842
{
848
{
843
  return m_failAvg;
849
  return m_failAvg;
844
}
850
}
851
852
853
uint8_t
854
WifiRemoteStationManager::GetDataTxPowerLevel (Mac48Address address, const WifiMacHeader *header,
855
                                               Ptr<const Packet> packet, uint32_t fullPacketSize)
856
{
857
  return m_defaultTxPowerLevel;
858
}
859
uint8_t
860
WifiRemoteStationManager::GetRtsTxPowerLevel (Mac48Address address, const WifiMacHeader *header,
861
                                      Ptr<const Packet> packet)
862
{
863
  return m_defaultTxPowerLevel;
864
}
865
uint8_t
866
WifiRemoteStationManager::GetCtsTxPowerLevel (Mac48Address address, const WifiMacHeader *header,
867
                                      Ptr<const Packet> packet)
868
{
869
  return m_defaultTxPowerLevel;
870
}
871
uint8_t
872
WifiRemoteStationManager::GetAckTxPowerLevel (Mac48Address address, const WifiMacHeader *header,
873
                                      Ptr<const Packet> packet)
874
{
875
  return m_defaultTxPowerLevel;
876
}
877
878
879
880
845
} // namespace ns3
881
} // namespace ns3
(-)a/src/devices/wifi/wifi-remote-station-manager.h (-2 / +37 lines)
 Lines 166-171    Link Here 
166
   */
166
   */
167
  WifiMode GetRtsMode (Mac48Address address, const WifiMacHeader *header,
167
  WifiMode GetRtsMode (Mac48Address address, const WifiMacHeader *header,
168
                       Ptr<const Packet> packet);
168
                       Ptr<const Packet> packet);
169
169
  /**
170
  /**
170
   * Should be invoked whenever the RtsTimeout associated to a transmission
171
   * Should be invoked whenever the RtsTimeout associated to a transmission
171
   * attempt expires.
172
   * attempt expires.
 Lines 276-283    Link Here 
276
277
277
  /**
278
  /**
278
   * \param address remote address
279
   * \param address remote address
279
   * \param rtsMode the transmission mode used to send an RTS we just received
280
   * \return the transmission mode to use for the CTS to complete the RTS/CTS
280
   * \returns the transmission mode to use for the CTS to complete the RTS/CTS
281
   *          handshake.
281
   *          handshake.
282
   */
282
   */
283
  WifiMode GetCtsMode (Mac48Address address, WifiMode rtsMode);
283
  WifiMode GetCtsMode (Mac48Address address, WifiMode rtsMode);
 Lines 290-295    Link Here 
290
  WifiMode GetAckMode (Mac48Address address, WifiMode dataMode);
290
  WifiMode GetAckMode (Mac48Address address, WifiMode dataMode);
291
291
292
  WifiRemoteStationInfo GetInfo (Mac48Address address);
292
  WifiRemoteStationInfo GetInfo (Mac48Address address);
293
294
  /** 
295
   * \param address remote address
296
   * \param header MAC header
297
   * \param packet the packet to send
298
   * \param fullPacketSize the size of the packet after its 802.11 MAC header has been added.
299
   * \return the transmission power level to use to send this packet
300
   */
301
  uint8_t GetDataTxPowerLevel (Mac48Address address, const WifiMacHeader *header,
302
                               Ptr<const Packet> packet, uint32_t fullPacketSize);
303
  /**
304
   * \param address remote address
305
   * \param header MAC header
306
   * \param packet the packet to send
307
   * \returns the transmission power level to use to send the RTS prior to the
308
   *          transmission of the data packet itself.
309
   */
310
  uint8_t GetRtsTxPowerLevel (Mac48Address address, const WifiMacHeader *header,
311
                               Ptr<const Packet> packet);
312
313
  /**
314
   * \param address remote address
315
   * \returns the tx power level to use for the CTS to complete the RTS/CTS
316
   *          handshake.
317
   */
318
  uint8_t GetCtsTxPowerLevel (Mac48Address address);
319
320
  /**
321
   * \param address
322
   * \param d the transmission mode used to send an ACK we just received
323
   * \return the tx power level to use for the ACK to complete the data/ACK
324
   *          handshake.
325
   */
326
  uint8_t GetAckTxPowerLevel (Mac48Address address);
327
293
protected:
328
protected:
294
  virtual void DoDispose (void);
329
  virtual void DoDispose (void);
295
  // for convenience
330
  // for convenience

Return to bug 917