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

(-)a/src/wifi/model/ap-wifi-mac.h (-1 / +70 lines)
 Lines 88-94    Link Here 
88
   */
88
   */
89
  void SetBeaconInterval (Time interval);
89
  void SetBeaconInterval (Time interval);
90
  /**
90
  /**
91
   * \returns the interval between two beacon transmissions.
91
   * \return the interval between two beacon transmissions.
92
   */
92
   */
93
  Time GetBeaconInterval (void) const;
93
  Time GetBeaconInterval (void) const;
94
  /**
94
  /**
 Lines 108-114    Link Here 
108
108
109
private:
109
private:
110
  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
110
  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
111
  /**
112
   * The packet we sent was successfully received by the receiver
113
   * (i.e. we received an ACK from the receiver).  If the packet
114
   * was an association response to the receiver, we record that
115
   * the receiver is now associated with us.
116
   * 
117
   * \param hdr the header of the packet that we successfully sent
118
   */
111
  virtual void TxOk (const WifiMacHeader &hdr);
119
  virtual void TxOk (const WifiMacHeader &hdr);
120
  /**
121
   * The packet we sent was successfully received by the receiver
122
   * (i.e. we did not receive an ACK from the receiver).  If the packet
123
   * was an association response to the receiver, we record that
124
   * the receiver is not associated with us yet.
125
   *
126
   * \param hdr the header of the packet that we failed to sent
127
   */
112
  virtual void TxFailed (const WifiMacHeader &hdr);
128
  virtual void TxFailed (const WifiMacHeader &hdr);
113
129
114
  /**
130
  /**
 Lines 123-136    Link Here 
123
  virtual void DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket,
139
  virtual void DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket,
124
                                           const WifiMacHeader *hdr);
140
                                           const WifiMacHeader *hdr);
125
141
142
  /**
143
   * Forward the packet down to DCF/EDCAF (enqueue the packet). This method
144
   * is a wrapper for ForwardDown with traffic id.
145
   *
146
   * \param packet the packet we are forwarding to DCF/EDCAF
147
   * \param from the address to be used for Address 3 field in the header
148
   * \param to the address to be used for Address 1 field in the header
149
   */
126
  void ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Address to);
150
  void ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Address to);
151
  /**
152
   * Forward the packet down to DCF/EDCAF (enqueue the packet).
153
   *
154
   * \param packet the packet we are forwarding to DCF/EDCAF
155
   * \param from the address to be used for Address 3 field in the header
156
   * \param to the address to be used for Address 1 field in the header
157
   * \param tid the traffic id for the packet
158
   */
127
  void ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Address to, uint8_t tid);
159
  void ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Address to, uint8_t tid);
160
  /**
161
   * Forward a probe response packet to the DCF. The standard is not clear on the correct
162
   * queue for management frames if QoS is supported. We always use the DCF.
163
   *
164
   * \param to the address of the STA we are sending a probe response to
165
   */
128
  void SendProbeResp (Mac48Address to);
166
  void SendProbeResp (Mac48Address to);
167
  /**
168
   * Forward an association response packet to the DCF. The standard is not clear on the correct
169
   * queue for management frames if QoS is supported. We always use the DCF.
170
   *
171
   * \param to the address of the STA we are sending an association response to
172
   * \param success indicates whether the association was successful or not
173
   */
129
  void SendAssocResp (Mac48Address to, bool success);
174
  void SendAssocResp (Mac48Address to, bool success);
175
  /**
176
   * Forward a beacon packet to the beacon special DCF.
177
   */
130
  void SendOneBeacon (void);
178
  void SendOneBeacon (void);
179
  /**
180
   * Return the HT capability of the current AP.
181
   * 
182
   * \return the HT capability that we support
183
   */
131
  HtCapabilities GetHtCapabilities (void) const;
184
  HtCapabilities GetHtCapabilities (void) const;
185
  /**
186
   * Return an instance of SupportedRates that contains all rates that we support
187
   * including HT rates.
188
   *
189
   * \return SupportedRates all rates that we support
190
   */
132
  SupportedRates GetSupportedRates (void) const;
191
  SupportedRates GetSupportedRates (void) const;
192
  /**
193
   * Enable or disable beacon generation of the AP.
194
   *
195
   * \param enable enable or disable beacon generation
196
   */
133
  void SetBeaconGeneration (bool enable);
197
  void SetBeaconGeneration (bool enable);
198
  /**
199
   * Return whether the AP is generating beacons.
200
   *
201
   * \return true if beacons are periodically generated, false otherwise
202
   */
134
  bool GetBeaconGeneration (void) const;
203
  bool GetBeaconGeneration (void) const;
135
  virtual void DoDispose (void);
204
  virtual void DoDispose (void);
136
  virtual void DoInitialize (void);
205
  virtual void DoInitialize (void);
(-)a/src/wifi/model/dsss-error-rate-model.h (+36 lines)
 Lines 67-76    Link Here 
67
class DsssErrorRateModel
67
class DsssErrorRateModel
68
{
68
{
69
public:
69
public:
70
  /**
71
   * A function DQPSK
72
   *
73
   * \param x x
74
   * \return DQPSK(x)
75
   */
70
  static double DqpskFunction (double x);
76
  static double DqpskFunction (double x);
77
  /**
78
   * Return the chunk success rate of the differential BPSK.
79
   *
80
   * \param sinr the SINR of the chunk
81
   * \param nbits the size of the chunk
82
   * \return the chunk success rate of the differential BPSK
83
   */
71
  static double GetDsssDbpskSuccessRate (double sinr, uint32_t nbits);
84
  static double GetDsssDbpskSuccessRate (double sinr, uint32_t nbits);
85
  /**
86
   * Return the chunk success rate of the differential encoded QPSK.
87
   *
88
   * \param sinr the SINR of the chunk
89
   * \param nbits the size of the chunk
90
   * \return the chunk success rate of the differential encoded QPSK.
91
   */
72
  static double GetDsssDqpskSuccessRate (double sinr,uint32_t nbits);
92
  static double GetDsssDqpskSuccessRate (double sinr,uint32_t nbits);
93
  /**
94
   * Return the chunk success rate of the differential encoded QPSK for
95
   * 5.5Mbps data rate.
96
   *
97
   * \param sinr the SINR of the chunk
98
   * \param nbits the size of the chunk
99
   * \return the chunk success rate of the differential encoded QPSK for
100
   */
73
  static double GetDsssDqpskCck5_5SuccessRate (double sinr,uint32_t nbits);
101
  static double GetDsssDqpskCck5_5SuccessRate (double sinr,uint32_t nbits);
102
  /**
103
   * Return the chunk success rate of the differential encoded QPSK for
104
   * 11Mbps data rate.
105
   *
106
   * \param sinr the SINR of the chunk
107
   * \param nbits the size of the chunk
108
   * \return the chunk success rate of the differential encoded QPSK for
109
   */
74
  static double GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits);
110
  static double GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits);
75
#ifdef ENABLE_GSL
111
#ifdef ENABLE_GSL
76
  static double SymbolErrorProb16Cck (double e2);  /// equation (18) in Pursley's paper
112
  static double SymbolErrorProb16Cck (double e2);  /// equation (18) in Pursley's paper
(-)a/src/wifi/model/error-rate-model.h (+13 lines)
 Lines 43-48    Link Here 
43
   */
43
   */
44
  double CalculateSnr (WifiMode txMode, double ber) const;
44
  double CalculateSnr (WifiMode txMode, double ber) const;
45
45
46
  /**
47
   * A pure virtual method that must be implemented in the subclass.
48
   * This method returns the probability that the given 'chuck' of the
49
   * packet will be successfully received by the PHY.
50
   *
51
   * A chuck can be viewed as a part of a packet with equal SNR.
52
   * The probability of successfully receiving the chunk depends on
53
   * the mode, the SNR, and the size of the chunk.
54
   *
55
   * \param mode the Wi-Fi mode the chunk is sent
56
   * \param snr the SNR of the chunk
57
   * \param nbits the number of bits in this chunk
58
   */
46
  virtual double GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const = 0;
59
  virtual double GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const = 0;
47
};
60
};
48
61
(-)a/src/wifi/model/ideal-wifi-manager.h (-3 / +18 lines)
 Lines 68-78    Link Here 
68
  virtual WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station);
68
  virtual WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station);
69
  virtual bool IsLowLatency (void) const;
69
  virtual bool IsLowLatency (void) const;
70
70
71
  // return the min snr needed to successfully transmit
71
  /**
72
  // data with this mode at the specified ber.
72
   * Return the minimum SNR needed to successfully transmit
73
   * data with this mode at the specified BER.
74
   *
75
   * \param mode WifiMode
76
   * \return the minimum SNR for the given mode
77
   */
73
  double GetSnrThreshold (WifiMode mode) const;
78
  double GetSnrThreshold (WifiMode mode) const;
74
  void AddModeSnrThreshold (WifiMode mode, double ber);
79
  /**
80
   * Adds a pair of WifiMode and the minimum SNR for that given mode
81
   * to the list.
82
   *
83
   * \param mode WifiMode
84
   * \param snr the minimum SNR for the given mode
85
   */
86
  void AddModeSnrThreshold (WifiMode mode, double snr);
75
87
88
  /**
89
   * A vector of <snr, mode> pair that holds the minimum SNR for different mode
90
   */
76
  typedef std::vector<std::pair<double,WifiMode> > Thresholds;
91
  typedef std::vector<std::pair<double,WifiMode> > Thresholds;
77
92
78
  double m_ber;
93
  double m_ber;
(-)a/src/wifi/model/nist-error-rate-model.h (+56 lines)
 Lines 46-61    Link Here 
46
46
47
private:
47
private:
48
  double CalculatePe (double p, uint32_t bValue) const;
48
  double CalculatePe (double p, uint32_t bValue) const;
49
  /**
50
   * Return BER of BPSK at the given SNR.
51
   *
52
   * \param snr snr value
53
   * \return BER of BPSK at the given SNR
54
   */
49
  double GetBpskBer (double snr) const;
55
  double GetBpskBer (double snr) const;
56
  /**
57
   * Return BER of QPSK at the given SNR.
58
   *
59
   * \param snr snr value
60
   * \return BER of QPSK at the given SNR
61
   */
50
  double GetQpskBer (double snr) const;
62
  double GetQpskBer (double snr) const;
63
  /**
64
   * Return BER of QAM16 at the given SNR.
65
   *
66
   * \param snr snr value
67
   * \return BER of QAM16 at the given SNR
68
   */
51
  double Get16QamBer (double snr) const;
69
  double Get16QamBer (double snr) const;
70
  /**
71
   * Return BER of QAM64 at the given SNR.
72
   *
73
   * \param snr snr value
74
   * \return BER of QAM64 at the given SNR
75
   */
52
  double Get64QamBer (double snr) const;
76
  double Get64QamBer (double snr) const;
77
  /**
78
   * Return BER of BPSK at the given SNR after applying FEC.
79
   *
80
   * \param snr snr value
81
   * \param nbits the number of bits in the chunk
82
   * \param bValue
83
   * \return BER of BPSK at the given SNR after applying FEC
84
   */
53
  double GetFecBpskBer (double snr, double nbits,
85
  double GetFecBpskBer (double snr, double nbits,
54
                        uint32_t bValue) const;
86
                        uint32_t bValue) const;
87
  /**
88
   * Return BER of QPSK at the given SNR after applying FEC.
89
   *
90
   * \param snr snr value
91
   * \param nbits the number of bits in the chunk
92
   * \param bValue
93
   * \return BER of QPSK at the given SNR after applying FEC
94
   */
55
  double GetFecQpskBer (double snr, double nbits,
95
  double GetFecQpskBer (double snr, double nbits,
56
                        uint32_t bValue) const;
96
                        uint32_t bValue) const;
97
  /**
98
   * Return BER of QAM16 at the given SNR after applying FEC.
99
   *
100
   * \param snr snr value
101
   * \param nbits the number of bits in the chunk
102
   * \param bValue
103
   * \return BER of QAM16 at the given SNR after applying FEC
104
   */
57
  double GetFec16QamBer (double snr, uint32_t nbits,
105
  double GetFec16QamBer (double snr, uint32_t nbits,
58
                         uint32_t bValue) const;
106
                         uint32_t bValue) const;
107
  /**
108
   * Return BER of QAM64 at the given SNR after applying FEC.
109
   *
110
   * \param snr snr value
111
   * \param nbits the number of bits in the chunk
112
   * \param bValue
113
   * \return BER of QAM64 at the given SNR after applying FEC
114
   */
59
  double GetFec64QamBer (double snr, uint32_t nbits,
115
  double GetFec64QamBer (double snr, uint32_t nbits,
60
                         uint32_t bValue) const;
116
                         uint32_t bValue) const;
61
};
117
};
(-)a/src/wifi/model/qos-tag.h (-1 / +8 lines)
 Lines 70-76    Link Here 
70
  QosTag ();
70
  QosTag ();
71
71
72
  /**
72
  /**
73
   * Create a QosTag with the given TID
73
   * Create a QosTag with the given Traffic ID
74
   *
75
   * \param tid the given Traffic ID
74
   */
76
   */
75
  QosTag (uint8_t tid);
77
  QosTag (uint8_t tid);
76
78
 Lines 100-105    Link Here 
100
  virtual uint32_t GetSerializedSize () const;
102
  virtual uint32_t GetSerializedSize () const;
101
  virtual void Print (std::ostream &os) const;
103
  virtual void Print (std::ostream &os) const;
102
104
105
  /**
106
   * Return the Type ID.
107
   *
108
   * \return type ID
109
   */
103
  uint8_t GetTid (void) const;
110
  uint8_t GetTid (void) const;
104
111
105
private:
112
private:
(-)a/src/wifi/model/qos-utils.h (-1 / +11 lines)
 Lines 52-57    Link Here 
52
 * \ingroup wifi
52
 * \ingroup wifi
53
 * Maps TID (Traffic ID) to Access classes.
53
 * Maps TID (Traffic ID) to Access classes.
54
 * For more details see table 9-1 of IEEE802.11 standard.
54
 * For more details see table 9-1 of IEEE802.11 standard.
55
 *
56
 * \param tid the Traffic ID to be mapped to Access class
55
 */
57
 */
56
AcIndex QosUtilsMapTidToAc (uint8_t tid);
58
AcIndex QosUtilsMapTidToAc (uint8_t tid);
57
59
 Lines 59-64    Link Here 
59
 * \ingroup wifi
61
 * \ingroup wifi
60
 * If a qos tag is attached to the packet, returns a value < 8.
62
 * If a qos tag is attached to the packet, returns a value < 8.
61
 * A value >= 8 is returned otherwise.
63
 * A value >= 8 is returned otherwise.
64
 *
65
 * \param packet the packet to checked for a QoS tag
66
 * \return a value less than 8 if QoS tag was present, a value >= 8
67
 *         is returned if no QoS tag was present
62
 */
68
 */
63
uint8_t QosUtilsGetTidForPacket (Ptr<const Packet> packet);
69
uint8_t QosUtilsGetTidForPacket (Ptr<const Packet> packet);
64
70
 Lines 67-72    Link Here 
67
 * Next function is useful to correctly sort buffered packets under block ack.
73
 * Next function is useful to correctly sort buffered packets under block ack.
68
 * When an BAR is received from originator station, completed "old"
74
 * When an BAR is received from originator station, completed "old"
69
 * (see section 9.10.3 in IEEE802.11e) packets must be forwarded up before "new" packets.
75
 * (see section 9.10.3 in IEEE802.11e) packets must be forwarded up before "new" packets.
76
 *
77
 * \param seqConrol the sequence control field
78
 * \param endSequence
70
 */
79
 */
71
uint32_t QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t endSequence);
80
uint32_t QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t endSequence);
72
81
 Lines 102-108    Link Here 
102
 * if that packet (with sequence number <i>numberSeq</i>)) belongs to the section of the
111
 * if that packet (with sequence number <i>numberSeq</i>)) belongs to the section of the
103
 * sequence number space marked with '-' characters. The function returns false otherwise.
112
 * sequence number space marked with '-' characters. The function returns false otherwise.
104
 *
113
 *
105
 *
114
 * \param startingSeq the starting sequence number
115
 * \param seqNumber the sequence number to be checked
106
 */
116
 */
107
bool QosUtilsIsOldPacket (uint16_t startingSeq, uint16_t seqNumber);
117
bool QosUtilsIsOldPacket (uint16_t startingSeq, uint16_t seqNumber);
108
118
(-)a/src/wifi/model/regular-wifi-mac.h (-20 / +87 lines)
 Lines 87-125    Link Here 
87
87
88
  Time GetRifs (void) const;
88
  Time GetRifs (void) const;
89
  /**
89
  /**
90
   * \returns the current PIFS duration.
90
   * \return the current PIFS duration.
91
   */
91
   */
92
  Time GetPifs (void) const;
92
  Time GetPifs (void) const;
93
  /**
93
  /**
94
   * \returns the current SIFS duration.
94
   * \return the current SIFS duration.
95
   */
95
   */
96
  Time GetSifs (void) const;
96
  Time GetSifs (void) const;
97
  /**
97
  /**
98
   * \returns the current slot duration.
98
   * \return the current slot duration.
99
   */
99
   */
100
  Time GetSlot (void) const;
100
  Time GetSlot (void) const;
101
  /**
101
  /**
102
   * \returns the current EIFS minus DIFS duration
102
   * \return the current EIFS minus DIFS duration
103
   */
103
   */
104
  Time GetEifsNoDifs (void) const;
104
  Time GetEifsNoDifs (void) const;
105
  /**
105
  /**
106
   * \returns the current CTS timeout duration.
106
   * \return the current CTS timeout duration.
107
   */
107
   */
108
  Time GetCtsTimeout (void) const;
108
  Time GetCtsTimeout (void) const;
109
  /**
109
  /**
110
   * \returns the current ACK timeout duration.
110
   * \return the current ACK timeout duration.
111
   */
111
   */
112
  Time GetAckTimeout (void) const;
112
  Time GetAckTimeout (void) const;
113
113
114
  /**
115
   * Enable or disable CTS-to-self feature.
116
   *
117
   * \param enable true if CTS-to-self is to be supported,
118
   *        false otherwise
119
   */
114
  void SetCtsToSelfSupported (bool enable);
120
  void SetCtsToSelfSupported (bool enable);
115
 
121
 
122
  /**
123
   * Return whether the device supports CTS-to-self
124
   * capability.
125
   *
126
   * \return true if CTS-to-self is supported, false otherwise.
127
   */
116
  bool GetCtsToSelfSupported () const;
128
  bool GetCtsToSelfSupported () const;
117
  /**
129
  /**
118
   * \returns the MAC address associated to this MAC layer.
130
   * \return the MAC address associated to this MAC layer.
119
   */
131
   */
120
  virtual Mac48Address GetAddress (void) const;
132
  virtual Mac48Address GetAddress (void) const;
121
  /**
133
  /**
122
   * \returns the ssid which this MAC layer is going to try to stay in.
134
   * \return the ssid which this MAC layer is going to try to stay in.
123
   */
135
   */
124
  virtual Ssid GetSsid (void) const;
136
  virtual Ssid GetSsid (void) const;
125
  /**
137
  /**
 Lines 135-141    Link Here 
135
   */
147
   */
136
  virtual void SetBssid (Mac48Address bssid);
148
  virtual void SetBssid (Mac48Address bssid);
137
  /**
149
  /**
138
   * \returns the bssid of the network this device belongs to.
150
   * \return the bssid of the network this device belongs to.
139
   */
151
   */
140
  virtual Mac48Address GetBssid (void) const;
152
  virtual Mac48Address GetBssid (void) const;
141
  /**
153
  /**
 Lines 175-181    Link Here 
175
   */
187
   */
176
  virtual void SetWifiPhy (Ptr<WifiPhy> phy);
188
  virtual void SetWifiPhy (Ptr<WifiPhy> phy);
177
  /**
189
  /**
178
   * \returns the physical layer attached to this MAC.
190
   * \return the physical layer attached to this MAC.
179
   */
191
   */
180
  virtual Ptr<WifiPhy> GetWifiPhy () const;
192
  virtual Ptr<WifiPhy> GetWifiPhy () const;
181
  /**
193
  /**
 Lines 183-189    Link Here 
183
   */
195
   */
184
  virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager);
196
  virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager);
185
  /**
197
  /**
186
   * \returns the station manager attached to this MAC.
198
   * \return the station manager attached to this MAC.
187
   */
199
   */
188
  virtual Ptr<WifiRemoteStationManager> GetWifiRemoteStationManager () const;
200
  virtual Ptr<WifiRemoteStationManager> GetWifiRemoteStationManager () const;
189
201
 Lines 286-294    Link Here 
286
   * \param hdr a pointer to the MAC header of the received frame.
298
   * \param hdr a pointer to the MAC header of the received frame.
287
   */
299
   */
288
  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
300
  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
301
    /**
302
   * The packet we sent was successfully received by the receiver
303
   * (i.e. we received an ACK from the receiver).
304
   * 
305
   * \param hdr the header of the packet that we successfully sent
306
   */
289
  virtual void TxOk (const WifiMacHeader &hdr);
307
  virtual void TxOk (const WifiMacHeader &hdr);
308
  /**
309
   * The packet we sent was successfully received by the receiver
310
   * (i.e. we did not receive an ACK from the receiver).
311
   *
312
   * \param hdr the header of the packet that we failed to sent
313
   */
290
  virtual void TxFailed (const WifiMacHeader &hdr);
314
  virtual void TxFailed (const WifiMacHeader &hdr);
291
315
316
  /**
317
   * Forward the packet up to the device.
318
   *
319
   * \param packet the packet that we are forwarding up to the device
320
   * \param from the address of the source
321
   * \param to the address of the destination
322
   */
292
  void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to);
323
  void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to);
293
324
294
  /**
325
  /**
 Lines 325-333    Link Here 
325
   * however.
356
   * however.
326
   */
357
   */
327
  bool m_qosSupported;
358
  bool m_qosSupported;
328
  /** Set accessor for the \c m_qosSupported member */
359
  /**
360
   * Enable or disable QoS support for the device.
361
   *
362
   * \param enable whether QoS is supported
363
   */
329
  void SetQosSupported (bool enable);
364
  void SetQosSupported (bool enable);
330
  /** Get accessor for the \c m_qosSupported member */
365
  /** 
366
   * Return whether the device supports QoS.
367
   *
368
   * \return true if QoS is supported, false otherwise
369
   */
331
  bool GetQosSupported () const;
370
  bool GetQosSupported () const;
332
371
333
 /**
372
 /**
 Lines 344-352    Link Here 
344
   * however.
383
   * however.
345
   */
384
   */
346
  bool m_htSupported;
385
  bool m_htSupported;
347
  /** Set accessor for the \c m_htSupported member */
386
  /**
387
   * Enable or disable HT support for the device.
388
   *
389
   * \param enable whether HT is supported
390
   */
348
  void SetHtSupported (bool enable);
391
  void SetHtSupported (bool enable);
349
  /** Get accessor for the \c m_htSupported member */
392
  /**
393
   * Return whether the device supports QoS.
394
   *
395
   * \return true if HT is supported, false otherwise
396
   */
350
  bool GetHtSupported () const;
397
  bool GetHtSupported () const;
351
398
352
private:
399
private:
 Lines 361-376    Link Here 
361
   */
408
   */
362
  void SetupEdcaQueue (enum AcIndex ac);
409
  void SetupEdcaQueue (enum AcIndex ac);
363
410
364
  /** Accessor for the DCF object */
411
  /**
412
   * Return the DCF.
413
   *
414
   * \return a DCF instance
415
   */
365
  Ptr<DcaTxop> GetDcaTxop (void) const;
416
  Ptr<DcaTxop> GetDcaTxop (void) const;
366
417
367
  /** Accessor for the AC_VO channel access function */
418
  /**
419
   * Return the EDCAF instance for the voice access class.
420
   *
421
   * \return a AC_VO EDCAF instance
422
   */
368
  Ptr<EdcaTxopN> GetVOQueue (void) const;
423
  Ptr<EdcaTxopN> GetVOQueue (void) const;
369
  /** Accessor for the AC_VI channel access function */
424
  /**
425
   * Return the EDCAF instance for the video access class.
426
   *
427
   * \return a AC_VI EDCAF instance
428
   */
370
  Ptr<EdcaTxopN> GetVIQueue (void) const;
429
  Ptr<EdcaTxopN> GetVIQueue (void) const;
371
  /** Accessor for the AC_BE channel access function */
430
  /**
431
   * Return the EDCAF instance for the best effort access class.
432
   *
433
   * \return a AC_BE EDCAF instance
434
   */
372
  Ptr<EdcaTxopN> GetBEQueue (void) const;
435
  Ptr<EdcaTxopN> GetBEQueue (void) const;
373
  /** Accessor for the AC_BK channel access function */
436
  /**
437
   * Return the EDCAF instance for the background access class.
438
   *
439
   * \return a AC_BK EDCAF instance
440
   */
374
  Ptr<EdcaTxopN> GetBKQueue (void) const;
441
  Ptr<EdcaTxopN> GetBKQueue (void) const;
375
442
376
  TracedCallback<const WifiMacHeader &> m_txOkCallback;
443
  TracedCallback<const WifiMacHeader &> m_txOkCallback;
(-)a/src/wifi/model/snr-tag.h (-1 / +7 lines)
 Lines 44-49    Link Here 
44
44
45
  /**
45
  /**
46
   * Create a SnrTag with the given snr value
46
   * Create a SnrTag with the given snr value
47
   * \param snr the given SNR value
47
   */
48
   */
48
  SnrTag(double snr);
49
  SnrTag(double snr);
49
50
 Lines 55-63    Link Here 
55
  /**
56
  /**
56
   * Set the SNR to the given value.
57
   * Set the SNR to the given value.
57
   *
58
   *
58
   * @param snr the value of the snr to set
59
   * \param snr the value of the snr to set
59
   */
60
   */
60
  void Set (double snr);
61
  void Set (double snr);
62
  /**
63
   * Return the SNR value.
64
   *
65
   * \return the SNR value
66
   */
61
  double Get (void) const;
67
  double Get (void) const;
62
private:
68
private:
63
  double m_snr;
69
  double m_snr;
(-)a/src/wifi/model/sta-wifi-mac.h (+68 lines)
 Lines 84-89    Link Here 
84
  void StartActiveAssociation (void);
84
  void StartActiveAssociation (void);
85
85
86
private:
86
private:
87
  /**
88
   * The current MAC state of the STA.
89
   */
87
  enum MacState
90
  enum MacState
88
  {
91
  {
89
    ASSOCIATED,
92
    ASSOCIATED,
 Lines 93-113    Link Here 
93
    REFUSED
96
    REFUSED
94
  };
97
  };
95
98
99
  /**
100
   * Enable or disable active probing.
101
   *
102
   * \param enable enable or disable active probing
103
   */
96
  void SetActiveProbing (bool enable);
104
  void SetActiveProbing (bool enable);
105
  /**
106
   * Return whether active probing is enabled.
107
   *
108
   * \return true if active probing is enabled, false otherwise
109
   */
97
  bool GetActiveProbing (void) const;
110
  bool GetActiveProbing (void) const;
98
  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
111
  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr);
112
113
  /**
114
   * Forward a probe request packet to the DCF. The standard is not clear on the correct
115
   * queue for management frames if QoS is supported. We always use the DCF.
116
   */
99
  void SendProbeRequest (void);
117
  void SendProbeRequest (void);
118
  /**
119
   * Forward an association request packet to the DCF. The standard is not clear on the correct
120
   * queue for management frames if QoS is supported. We always use the DCF.
121
   */
100
  void SendAssociationRequest (void);
122
  void SendAssociationRequest (void);
123
  /**
124
   * Try to ensure that we are associated with an AP by taking an appropriate action
125
   * depending on the current association status.
126
   */
101
  void TryToEnsureAssociated (void);
127
  void TryToEnsureAssociated (void);
128
  /**
129
   * This method is called after the association timeout occurred. We switch the state to 
130
   * WAIT_ASSOC_RESP and re-send an association request.
131
   */
102
  void AssocRequestTimeout (void);
132
  void AssocRequestTimeout (void);
133
  /**
134
   * This method is called after the probe request timeout occurred. We switch the state to 
135
   * WAIT_PROBE_RESP and re-send a probe request.
136
   */
103
  void ProbeRequestTimeout (void);
137
  void ProbeRequestTimeout (void);
138
  /**
139
   * Return whether we are associated with an AP.
140
   *
141
   * \return true if we are associated with an AP, false otherwise
142
   */
104
  bool IsAssociated (void) const;
143
  bool IsAssociated (void) const;
144
  /**
145
   * Return whether we are waiting for an association response from an AP.
146
   *
147
   * \return true if we are waiting for an association response from an AP, false otherwise
148
   */
105
  bool IsWaitAssocResp (void) const;
149
  bool IsWaitAssocResp (void) const;
150
  /**
151
   * This method is called after we have not received a beacon from the AP 
152
   */
106
  void MissedBeacons (void);
153
  void MissedBeacons (void);
154
  /**
155
   * Restarts the beacon timer. 
156
   *
157
   * \param delay the delay before the watchdog fires
158
   */
107
  void RestartBeaconWatchdog (Time delay);
159
  void RestartBeaconWatchdog (Time delay);
160
  /**
161
   * Return an instance of SupportedRates that contains all rates that we support
162
   * including HT rates.
163
   *
164
   * \return SupportedRates all rates that we support
165
   */
108
  SupportedRates GetSupportedRates (void) const;
166
  SupportedRates GetSupportedRates (void) const;
167
  /**
168
   * Set the current MAC state.
169
   *
170
   * \param value the new state
171
   */
109
  void SetState (enum MacState value);
172
  void SetState (enum MacState value);
110
173
174
  /**
175
   * Return the HT capability of the current AP.
176
   * 
177
   * \return the HT capability that we support
178
   */
111
  HtCapabilities GetHtCapabilities (void) const;
179
  HtCapabilities GetHtCapabilities (void) const;
112
180
113
181
(-)a/src/wifi/model/wifi-mac-header.h (-1 / +366 lines)
 Lines 103-143    Link Here 
103
  virtual void Serialize (Buffer::Iterator start) const;
103
  virtual void Serialize (Buffer::Iterator start) const;
104
  virtual uint32_t Deserialize (Buffer::Iterator start);
104
  virtual uint32_t Deserialize (Buffer::Iterator start);
105
105
106
106
  /**
107
   * Set Type/Subtype values for an association request header.
108
   */
107
  void SetAssocReq (void);
109
  void SetAssocReq (void);
110
  /**
111
   * Set Type/Subtype values for an association response header.
112
   */
108
  void SetAssocResp (void);
113
  void SetAssocResp (void);
114
  /**
115
   * Set Type/Subtype values for a probe request header.
116
   */
109
  void SetProbeReq (void);
117
  void SetProbeReq (void);
118
  /**
119
   * Set Type/Subtype values for a probe response header.
120
   */
110
  void SetProbeResp (void);
121
  void SetProbeResp (void);
122
  /**
123
   * Set Type/Subtype values for a beacon header.
124
   */
111
  void SetBeacon (void);
125
  void SetBeacon (void);
126
  /**
127
   * Set Type/Subtype values for a data packet with
128
   * no subtype equal to 0.
129
   */
112
  void SetTypeData (void);
130
  void SetTypeData (void);
131
  /**
132
   * Set Type/Subtype values for an action header.
133
   */
113
  void SetAction ();
134
  void SetAction ();
135
  /**
136
   * Set Type/Subtype values for a Block Ack Request header.
137
   */
114
  void SetBlockAckReq (void);
138
  void SetBlockAckReq (void);
139
  /**
140
   * Set Type/Subtype values for a Block Ack header.
141
   */
115
  void SetBlockAck (void);
142
  void SetBlockAck (void);
116
  void SetMultihopAction ();
143
  void SetMultihopAction ();
144
  /**
145
   * Set the From DS bit in the Frame Control field.
146
   */
117
  void SetDsFrom (void);
147
  void SetDsFrom (void);
148
  /**
149
   * Un-set the From DS bit in the Frame Control field.
150
   */
118
  void SetDsNotFrom (void);
151
  void SetDsNotFrom (void);
152
  /**
153
   * Set the To DS bit in the Frame Control field.
154
   */
119
  void SetDsTo (void);
155
  void SetDsTo (void);
156
  /**
157
   * Un-set the To DS bit in the Frame Control field.
158
   */
120
  void SetDsNotTo (void);
159
  void SetDsNotTo (void);
160
  /**
161
   * Fill the Address 1 field with the given address.
162
   *
163
   * \param address the address to be used in the Address 1 field
164
   */
121
  void SetAddr1 (Mac48Address address);
165
  void SetAddr1 (Mac48Address address);
166
  /**
167
   * Fill the Address 2 field with the given address.
168
   *
169
   * \param address the address to be used in the Address 2 field
170
   */
122
  void SetAddr2 (Mac48Address address);
171
  void SetAddr2 (Mac48Address address);
172
  /**
173
   * Fill the Address 3 field with the given address.
174
   *
175
   * \param address the address to be used in the Address 3 field
176
   */
123
  void SetAddr3 (Mac48Address address);
177
  void SetAddr3 (Mac48Address address);
178
  /**
179
   * Fill the Address 4 field with the given address.
180
   *
181
   * \param address the address to be used in the Address 4 field
182
   */
124
  void SetAddr4 (Mac48Address address);
183
  void SetAddr4 (Mac48Address address);
184
  /**
185
   * Set Type/Subtype values with the correct values depending
186
   * on the given type.
187
   *
188
   * \param type the WifiMacType for the header
189
   */
125
  void SetType (enum WifiMacType type);
190
  void SetType (enum WifiMacType type);
191
  /**
192
   * Set the Duration/ID field with the given raw uint16_t value.
193
   *
194
   * \param duration the raw duration in uint16_t
195
   */
126
  void SetRawDuration (uint16_t duration);
196
  void SetRawDuration (uint16_t duration);
197
  /**
198
   * Set the Duration/ID field with the given duration (Time object).
199
   * The method converts the given time to microseconds.
200
   *
201
   * \param duration the duration (Time object)
202
   */
127
  void SetDuration (Time duration);
203
  void SetDuration (Time duration);
204
  /**
205
   * Set the Duration/ID field with the given ID.
206
   *
207
   * \param id the ID
208
   */
128
  void SetId (uint16_t id);
209
  void SetId (uint16_t id);
210
  /**
211
   * Set the sequence number of the header.
212
   *
213
   * \param seq the given sequence number
214
   */
129
  void SetSequenceNumber (uint16_t seq);
215
  void SetSequenceNumber (uint16_t seq);
216
  /**
217
   * Set the fragment number of the header.
218
   *
219
   * \param frag the given fragment number
220
   */
130
  void SetFragmentNumber (uint8_t frag);
221
  void SetFragmentNumber (uint8_t frag);
222
  /**
223
   * Un-set the More Fragment bit in the Frame Control Field
224
   */
131
  void SetNoMoreFragments (void);
225
  void SetNoMoreFragments (void);
226
  /**
227
   * Set the More Fragment bit in the Frame Control field
228
   */
132
  void SetMoreFragments (void);
229
  void SetMoreFragments (void);
230
  /**
231
   * Set the Retry bit in the Frame Control field.
232
   */
133
  void SetRetry (void);
233
  void SetRetry (void);
234
  /**
235
   * Un-set the Retry bit in the Frame Control field.
236
   */
134
  void SetNoRetry (void);
237
  void SetNoRetry (void);
238
  /**
239
   * Set the TID for the QoS header.
240
   *
241
   * \param tid the TID for the QoS header
242
   */
135
  void SetQosTid (uint8_t tid);
243
  void SetQosTid (uint8_t tid);
244
  /**
245
   * Set the end of service period (EOSP) bit in the QoS control field.
246
   */
136
  void SetQosEosp ();
247
  void SetQosEosp ();
248
  /**
249
   * Un-set the end of service period (EOSP) bit in the QoS control field.
250
   */
137
  void SetQosNoEosp ();
251
  void SetQosNoEosp ();
252
  /**
253
   * Set the QoS ACK policy in the QoS control field.
254
   */
138
  void SetQosAckPolicy (enum QosAckPolicy);
255
  void SetQosAckPolicy (enum QosAckPolicy);
256
  /**
257
   * Set the QoS ACK policy in the QoS control field to normal ACK.
258
   */
139
  void SetQosNormalAck (void);
259
  void SetQosNormalAck (void);
260
  /**
261
   * Set the QoS ACK policy in the QoS control field to block ACK.
262
   */
140
  void SetQosBlockAck (void);
263
  void SetQosBlockAck (void);
264
  /**
265
   * Set the QoS ACK policy in the QoS control field to no ACK.
266
   */
141
  void SetQosNoAck (void);
267
  void SetQosNoAck (void);
142
  void SetQosAmsdu (void);
268
  void SetQosAmsdu (void);
143
  void SetQosNoAmsdu (void);
269
  void SetQosNoAmsdu (void);
 Lines 145-205    Link Here 
145
  void SetOrder (void);
271
  void SetOrder (void);
146
  void SetNoOrder (void);
272
  void SetNoOrder (void);
147
273
274
  /**
275
   * Return the address in the Address 1 field.
276
   *
277
   * \return the address in the Address 1 field
278
   */
148
  Mac48Address GetAddr1 (void) const;
279
  Mac48Address GetAddr1 (void) const;
280
  /**
281
   * Return the address in the Address 2 field.
282
   *
283
   * \return the address in the Address 2 field
284
   */
149
  Mac48Address GetAddr2 (void) const;
285
  Mac48Address GetAddr2 (void) const;
286
  /**
287
   * Return the address in the Address 3 field.
288
   *
289
   * \return the address in the Address 3 field
290
   */
150
  Mac48Address GetAddr3 (void) const;
291
  Mac48Address GetAddr3 (void) const;
292
  /**
293
   * Return the address in the Address 4 field.
294
   *
295
   * \return the address in the Address 4 field
296
   */
151
  Mac48Address GetAddr4 (void) const;
297
  Mac48Address GetAddr4 (void) const;
298
  /**
299
   * Return the type (enum WifiMacType)
300
   *
301
   * \return the type (enum WifiMacType)
302
   */
152
  enum WifiMacType GetType (void) const;
303
  enum WifiMacType GetType (void) const;
304
  /**
305
   * \return true if From DS bit is set, false otherwise
306
   */
153
  bool IsFromDs (void) const;
307
  bool IsFromDs (void) const;
308
  /**
309
   * \return true if To DS bit is set, false otherwise
310
   */
154
  bool IsToDs (void) const;
311
  bool IsToDs (void) const;
312
  /**
313
   * Return true if the Type is DATA.  The method does
314
   * not check the Subtype field. (e.g. the header may be
315
   * DATA with QoS)
316
   *
317
   * \return true if Type is DATA, false otherwise
318
   */
155
  bool IsData (void) const;
319
  bool IsData (void) const;
320
  /**
321
   * Return true if the Type is DATA and Subtype is one of the
322
   * possible values for QoS DATA.
323
   *
324
   * \return true if Type is QoS DATA, false otherwise
325
   */
156
  bool IsQosData (void) const;
326
  bool IsQosData (void) const;
327
  /**
328
   * Return true if the Type is Control.
329
   *
330
   * \return true if Type is Control, false otherwise
331
   */
157
  bool IsCtl (void) const;
332
  bool IsCtl (void) const;
333
  /**
334
   * Return true if the Type is Management.
335
   *
336
   * \return true if Type is Management, false otherwise
337
   */
158
  bool IsMgt (void) const;
338
  bool IsMgt (void) const;
339
  /**
340
   * Return true if the Type/Subtype is one of the possible CF-Poll headers.
341
   *
342
   * \return true if the Type/Subtype is one of the possible CF-Poll headers, false otherwise
343
   */
159
  bool IsCfpoll (void) const;
344
  bool IsCfpoll (void) const;
345
  /**
346
   * Return true if the header is a RTS header.
347
   *
348
   * \return true if the header is a RTS header, false otherwise
349
   */
160
  bool IsRts (void) const;
350
  bool IsRts (void) const;
351
  /**
352
   * Return true if the header is a CTS header.
353
   *
354
   * \return true if the header is a CTS header, false otherwise
355
   */
161
  bool IsCts (void) const;
356
  bool IsCts (void) const;
357
  /**
358
   * Return true if the header is an ACK header.
359
   *
360
   * \return true if the header is an ACK header, false otherwise
361
   */
162
  bool IsAck (void) const;
362
  bool IsAck (void) const;
363
  /**
364
   * Return true if the header is a Block ACK Request header.
365
   *
366
   * \return true if the header is a Block ACK Request header, false otherwise
367
   */
163
  bool IsBlockAckReq (void) const;
368
  bool IsBlockAckReq (void) const;
369
  /**
370
   * Return true if the header is a Block ACK header.
371
   *
372
   * \return true if the header is a Block ACK header, false otherwise
373
   */
164
  bool IsBlockAck (void) const;
374
  bool IsBlockAck (void) const;
375
  /**
376
   * Return true if the header is an Association Request header.
377
   *
378
   * \return true if the header is an Association Request header, false otherwise
379
   */
165
  bool IsAssocReq (void) const;
380
  bool IsAssocReq (void) const;
381
  /**
382
   * Return true if the header is an Association Response header.
383
   *
384
   * \return true if the header is an Association Response header, false otherwise
385
   */
166
  bool IsAssocResp (void) const;
386
  bool IsAssocResp (void) const;
387
  /**
388
   * Return true if the header is a Reassociation Request header.
389
   *
390
   * \return true if the header is a Reassociation Request header, false otherwise
391
   */
167
  bool IsReassocReq (void) const;
392
  bool IsReassocReq (void) const;
393
  /**
394
   * Return true if the header is a Reassociation Response header.
395
   *
396
   * \return true if the header is a Reassociation Response header, false otherwise
397
   */
168
  bool IsReassocResp (void) const;
398
  bool IsReassocResp (void) const;
399
  /**
400
   * Return true if the header is a Probe Request header.
401
   *
402
   * \return true if the header is a Probe Request header, false otherwise
403
   */
169
  bool IsProbeReq (void) const;
404
  bool IsProbeReq (void) const;
405
  /**
406
   * Return true if the header is a Probe Response header.
407
   *
408
   * \return true if the header is a Probe Response header, false otherwise
409
   */
170
  bool IsProbeResp (void) const;
410
  bool IsProbeResp (void) const;
411
  /**
412
   * Return true if the header is a Beacon header.
413
   *
414
   * \return true if the header is a Beacon header, false otherwise
415
   */
171
  bool IsBeacon (void) const;
416
  bool IsBeacon (void) const;
417
  /**
418
   * Return true if the header is a Disassociation header.
419
   *
420
   * \return true if the header is a Disassociation header, false otherwise
421
   */
172
  bool IsDisassociation (void) const;
422
  bool IsDisassociation (void) const;
423
  /**
424
   * Return true if the header is an Authentication header.
425
   *
426
   * \return true if the header is an Authentication header, false otherwise
427
   */
173
  bool IsAuthentication (void) const;
428
  bool IsAuthentication (void) const;
429
  /**
430
   * Return true if the header is a Deauthentication header.
431
   *
432
   * \return true if the header is a Deauthentication header, false otherwise
433
   */
174
  bool IsDeauthentication (void) const;
434
  bool IsDeauthentication (void) const;
435
  /**
436
   * Return true if the header is an Action header.
437
   *
438
   * \return true if the header is an Action header, false otherwise
439
   */
175
  bool IsAction () const;
440
  bool IsAction () const;
176
  bool IsMultihopAction () const;
441
  bool IsMultihopAction () const;
442
  /**
443
   * Return the raw duration from the Duration/ID field.
444
   *
445
   * \return the raw duration from the Duration/ID field
446
   */
177
  uint16_t GetRawDuration (void) const;
447
  uint16_t GetRawDuration (void) const;
448
  /**
449
   * Return the duration from the Duration/ID field (Time object).
450
   *
451
   * \return the duration from the Duration/ID field (Time object)
452
   */
178
  Time GetDuration (void) const;
453
  Time GetDuration (void) const;
454
  /**
455
   * Return the raw Sequence Control field.
456
   *
457
   * \return the raw Sequence Control field
458
   */
179
  uint16_t GetSequenceControl (void) const;
459
  uint16_t GetSequenceControl (void) const;
460
  /**
461
   * Return the sequence number of the header.
462
   *
463
   * \return the sequence number of the header
464
   */
180
  uint16_t GetSequenceNumber (void) const;
465
  uint16_t GetSequenceNumber (void) const;
466
  /**
467
   * Return the fragment number of the header.
468
   *
469
   * \return the fragment number of the header
470
   */
181
  uint16_t GetFragmentNumber (void) const;
471
  uint16_t GetFragmentNumber (void) const;
472
  /**
473
   * Return if the Retry bit is set.
474
   *
475
   * \return true if the Retry bit is set, false otherwise
476
   */
182
  bool IsRetry (void) const;
477
  bool IsRetry (void) const;
478
  /**
479
   * Return if the More Fragment bit is set.
480
   *
481
   * \return true if the More Fragment bit is set, false otherwise
482
   */
183
  bool IsMoreFragments (void) const;
483
  bool IsMoreFragments (void) const;
484
  /**
485
   * Return if the QoS ACK policy is Block ACK.
486
   *
487
   * \return true if the QoS ACK policy is Block ACK, false otherwise
488
   */
184
  bool IsQosBlockAck (void) const;
489
  bool IsQosBlockAck (void) const;
490
  /**
491
   * Return if the QoS ACK policy is No ACK.
492
   *
493
   * \return true if the QoS ACK policy is No ACK, false otherwise
494
   */
185
  bool IsQosNoAck (void) const;
495
  bool IsQosNoAck (void) const;
496
  /**
497
   * Return if the QoS ACK policy is Normal ACK.
498
   *
499
   * \return true if the QoS ACK policy is No ACK, false otherwise
500
   */
186
  bool IsQosAck (void) const;
501
  bool IsQosAck (void) const;
502
  /**
503
   * Return if the end of service period (EOSP) is set.
504
   *
505
   * \return true if the end of service period (EOSP) is set, false otherwise
506
   */
187
  bool IsQosEosp (void) const;
507
  bool IsQosEosp (void) const;
188
  bool IsQosAmsdu (void) const;
508
  bool IsQosAmsdu (void) const;
509
  /**
510
   * Return the Traffic ID of a QoS header.
511
   *
512
   * \return the Traffic ID of a QoS header
513
   */
189
  uint8_t GetQosTid (void) const;
514
  uint8_t GetQosTid (void) const;
515
  /**
516
   * Return the QoS ACK Policy of a QoS header.
517
   *
518
   * \return the QoS ACK Policy of a QoS header
519
   */
190
  enum QosAckPolicy GetQosAckPolicy (void) const;
520
  enum QosAckPolicy GetQosAckPolicy (void) const;
191
  uint8_t GetQosTxopLimit (void) const;
521
  uint8_t GetQosTxopLimit (void) const;
192
522
193
  uint32_t GetSize (void) const;
523
  uint32_t GetSize (void) const;
524
  /**
525
   * Return a string corresponds to the header type.
526
   *
527
   * \returns a string corresponds to the header type.
528
   */
194
  const char * GetTypeString (void) const;
529
  const char * GetTypeString (void) const;
195
530
196
531
197
private:
532
private:
533
  /**
534
   * Return the raw Frame Control field.
535
   *
536
   * \return the raw Frame Control field
537
   */
198
  uint16_t GetFrameControl (void) const;
538
  uint16_t GetFrameControl (void) const;
539
  /**
540
   * Return the raw QoS Control field.
541
   *
542
   * \return the raw QoS Control field
543
   */
199
  uint16_t GetQosControl (void) const;
544
  uint16_t GetQosControl (void) const;
545
  /**
546
   * Set the Frame Control field with the given raw value.
547
   *
548
   * \param control the raw Frame Control field value
549
   */
200
  void SetFrameControl (uint16_t control);
550
  void SetFrameControl (uint16_t control);
551
  /**
552
   * Set the Sequence Control field with the given raw value.
553
   *
554
   * \param seq the raw Sequence Control field value
555
   */
201
  void SetSequenceControl (uint16_t seq);
556
  void SetSequenceControl (uint16_t seq);
557
  /**
558
   * Set the QoS Control field with the given raw value.
559
   *
560
   * \param qos the raw QoS Control field value
561
   */
202
  void SetQosControl (uint16_t qos);
562
  void SetQosControl (uint16_t qos);
563
  /**
564
   * Print the Frame Control field to the output stream.
565
   *
566
   * \param os the output stream to print to
567
   */
203
  void PrintFrameControl (std::ostream &os) const;
568
  void PrintFrameControl (std::ostream &os) const;
204
569
205
  uint8_t m_ctrlType;
570
  uint8_t m_ctrlType;
(-)a/src/wifi/model/wifi-mac.h (-12 / +127 lines)
 Lines 85-134    Link Here 
85
   */
85
   */
86
  void SetMaxPropagationDelay (Time delay);
86
  void SetMaxPropagationDelay (Time delay);
87
/**
87
/**
88
   * \returns the current RIFS duration.
88
   * \return the current RIFS duration.
89
   */
89
   */
90
90
91
  virtual Time GetRifs (void) const = 0;
91
  virtual Time GetRifs (void) const = 0;
92
92
93
  /**
93
  /**
94
   * \returns the current PIFS duration.
94
   * \return the current PIFS duration.
95
   */
95
   */
96
  virtual Time GetPifs (void) const = 0;
96
  virtual Time GetPifs (void) const = 0;
97
  /**
97
  /**
98
   * \returns the current SIFS duration.
98
   * \return the current SIFS duration.
99
   */
99
   */
100
  virtual Time GetSifs (void) const = 0;
100
  virtual Time GetSifs (void) const = 0;
101
  /**
101
  /**
102
   * \returns the current slot duration.
102
   * \return the current slot duration.
103
   */
103
   */
104
  virtual Time GetSlot (void) const = 0;
104
  virtual Time GetSlot (void) const = 0;
105
  /**
105
  /**
106
   * \returns the current EIFS minus DIFS duration
106
   * \return the current EIFS minus DIFS duration
107
   */
107
   */
108
  virtual Time GetEifsNoDifs (void) const = 0;
108
  virtual Time GetEifsNoDifs (void) const = 0;
109
  /**
109
  /**
110
   * \returns the current CTS timeout duration.
110
   * \return the current CTS timeout duration.
111
   */
111
   */
112
  virtual Time GetCtsTimeout (void) const = 0;
112
  virtual Time GetCtsTimeout (void) const = 0;
113
  /**
113
  /**
114
   * \returns the current ACK timeout duration.
114
   * \return the current ACK timeout duration.
115
   */
115
   */
116
  virtual Time GetAckTimeout (void) const = 0;
116
  virtual Time GetAckTimeout (void) const = 0;
117
  /**
117
  /**
118
   * \return the maximum lifetime of an MSDU.
119
   *
118
   * Unused for now.
120
   * Unused for now.
119
   */
121
   */
120
  Time GetMsduLifetime (void) const;
122
  Time GetMsduLifetime (void) const;
121
  /**
123
  /**
124
   * \return the maximum propagation delay.
125
   * 
122
   * Unused for now.
126
   * Unused for now.
123
   */
127
   */
124
  Time GetMaxPropagationDelay (void) const;
128
  Time GetMaxPropagationDelay (void) const;
125
129
126
  /**
130
  /**
127
   * \returns the MAC address associated to this MAC layer.
131
   * \return the MAC address associated to this MAC layer.
128
   */
132
   */
129
  virtual Mac48Address GetAddress (void) const = 0;
133
  virtual Mac48Address GetAddress (void) const = 0;
130
  /**
134
  /**
131
   * \returns the ssid which this MAC layer is going to try to stay in.
135
   * \return the ssid which this MAC layer is going to try to stay in.
132
   */
136
   */
133
  virtual Ssid GetSsid (void) const = 0;
137
  virtual Ssid GetSsid (void) const = 0;
134
  /**
138
  /**
 Lines 140-146    Link Here 
140
   */
144
   */
141
  virtual void SetSsid (Ssid ssid) = 0;
145
  virtual void SetSsid (Ssid ssid) = 0;
142
  /**
146
  /**
143
   * \returns the bssid of the network this device belongs to.
147
   * \return the bssid of the network this device belongs to.
144
   */
148
   */
145
  virtual Mac48Address GetBssid (void) const = 0;
149
  virtual Mac48Address GetBssid (void) const = 0;
146
  /**
150
  /**
 Lines 173-178    Link Here 
173
   * access it granted to this MAC.
177
   * access it granted to this MAC.
174
   */
178
   */
175
  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to) = 0;
179
  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to) = 0;
180
  /**
181
   * \return if this MAC supports sending from arbitrary address.
182
   *
183
   * The interface may or may not support sending from arbitrary address.
184
   * This function returns true if sending from arbitrary address is supported,
185
   * false otherwise.
186
   */
176
  virtual bool SupportsSendFrom (void) const = 0;
187
  virtual bool SupportsSendFrom (void) const = 0;
177
  /**
188
  /**
178
   * \param phy the physical layer attached to this MAC.
189
   * \param phy the physical layer attached to this MAC.
 Lines 197-232    Link Here 
197
  /* Next functions are not pure virtual so non Qos WifiMacs are not
208
  /* Next functions are not pure virtual so non Qos WifiMacs are not
198
   * forced to implement them.
209
   * forced to implement them.
199
   */
210
   */
211
212
  /**
213
   * \param blockAckTimeout the duration for basic block ACK timeout.
214
   *
215
   * Sets the timeout for basic block ACK.
216
   */
200
  virtual void SetBasicBlockAckTimeout (Time blockAckTimeout);
217
  virtual void SetBasicBlockAckTimeout (Time blockAckTimeout);
218
  /**
219
   * \return the current basic block ACK timeout duration.
220
   */
201
  virtual Time GetBasicBlockAckTimeout (void) const;
221
  virtual Time GetBasicBlockAckTimeout (void) const;
222
  /**
223
   * \param blockAckTimeout
224
   *
225
   * Sets the timeout for compressed block ACK.
226
   */
202
  virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout);
227
  virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout);
228
  /**
229
   * \return the current compressed block ACK timeout duration.
230
   */
203
  virtual Time GetCompressedBlockAckTimeout (void) const;
231
  virtual Time GetCompressedBlockAckTimeout (void) const;
204
232
205
  /**
233
  /**
234
   * \param packet the packet being enqueued
235
   *
206
   * Public method used to fire a MacTx trace.  Implemented for encapsulation
236
   * Public method used to fire a MacTx trace.  Implemented for encapsulation
207
   * purposes.
237
   * purposes.  Note this trace indicates that the packet was accepted by the
238
   * device only.  The packet may be dropped later (e.g. if the queue is full).
208
   */
239
   */
209
  void NotifyTx (Ptr<const Packet> packet);
240
  void NotifyTx (Ptr<const Packet> packet);
210
241
211
  /**
242
  /**
243
   * \param packet the packet being dropped
244
   * 
212
   * Public method used to fire a MacTxDrop trace.  Implemented for encapsulation
245
   * Public method used to fire a MacTxDrop trace.  Implemented for encapsulation
213
   * purposes.
246
   * purposes.  This trace indicates that the packet was dropped before it was
247
   * transmitted (e.g. when a STA is not associated with an AP).
214
   */
248
   */
215
  void NotifyTxDrop (Ptr<const Packet> packet);
249
  void NotifyTxDrop (Ptr<const Packet> packet);
216
250
217
  /**
251
  /**
252
   * \param packet the packet we received
253
   * 
218
   * Public method used to fire a MacRx trace.  Implemented for encapsulation
254
   * Public method used to fire a MacRx trace.  Implemented for encapsulation
219
   * purposes.
255
   * purposes.
220
   */
256
   */
221
  void NotifyRx (Ptr<const Packet> packet);
257
  void NotifyRx (Ptr<const Packet> packet);
222
258
223
  /**
259
  /**
260
   * \param packet the packet we received promiscuously
261
   *
224
   * Public method used to fire a MacPromiscRx trace.  Implemented for encapsulation
262
   * Public method used to fire a MacPromiscRx trace.  Implemented for encapsulation
225
   * purposes.
263
   * purposes.
226
   */
264
   */
227
  void NotifyPromiscRx (Ptr<const Packet> packet);
265
  void NotifyPromiscRx (Ptr<const Packet> packet);
228
266
229
  /**
267
  /**
268
   * \param packet the packet we received but is not destined for us
269
   * 
230
   * Public method used to fire a MacRxDrop trace.  Implemented for encapsulation
270
   * Public method used to fire a MacRxDrop trace.  Implemented for encapsulation
231
   * purposes.
271
   * purposes.
232
   */
272
   */
 Lines 237-254    Link Here 
237
  void ConfigureStandard (enum WifiPhyStandard standard);
277
  void ConfigureStandard (enum WifiPhyStandard standard);
238
278
239
protected:
279
protected:
280
  /**
281
   * \param dcf the DCF to be configured
282
   * \param cwmin the minimum congestion window for the DCF
283
   * \param cwmax the maximum congestion window for the DCF
284
   * \param ac the access category for the DCF
285
   *
286
   * Configure the DCF with appropriate values depending on the given access category.
287
   */
240
  void ConfigureDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac);
288
  void ConfigureDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac);
241
private:
289
private:
290
  /**
291
   * \return the default maximum propagation delay
292
   *
293
   * By default, we get the maximum propagation delay from 1000 m and speed of light
294
   * (3e8 m/s).
295
   */
242
  static Time GetDefaultMaxPropagationDelay (void);
296
  static Time GetDefaultMaxPropagationDelay (void);
297
  /**
298
   * \return the default slot duration
299
   * 
300
   * Return a default slot value for 802.11a (9 microseconds).
301
   */
243
  static Time GetDefaultSlot (void);
302
  static Time GetDefaultSlot (void);
303
  /**
304
   * \return the default short interframe space (SIFS)
305
   * 
306
   * Return a default SIFS value for 802.11a (16 microseconds).
307
   */
244
  static Time GetDefaultSifs (void);
308
  static Time GetDefaultSifs (void);
309
  /**
310
   * \return the default reduced interframe space (RIFS)
311
   * 
312
   * Return a default RIFS value for 802.11n (2 microseconds).
313
   */
245
  static Time GetDefaultRifs (void);
314
  static Time GetDefaultRifs (void);
315
  /**
316
   * \return the default extended interframe space (EIFS) without
317
   *          DCF interframe space (DIFS)
318
   * 
319
   * Return default SIFS + default CTS-ACK delay
320
   */
246
  static Time GetDefaultEifsNoDifs (void);
321
  static Time GetDefaultEifsNoDifs (void);
322
  /**
323
   * \return the default CTS-ACK delay
324
   * 
325
   * Return a default value for 802.11a at 6Mbps (44 microseconds)
326
   */
247
  static Time GetDefaultCtsAckDelay (void);
327
  static Time GetDefaultCtsAckDelay (void);
328
  /**
329
   * \return the default CTS and ACK timeout
330
   * 
331
   * Return the default CTS and ACK timeout.
332
   * Cts_Timeout and Ack_Timeout are specified in the Annex C
333
   * (Formal description of MAC operation, see details on the
334
   * Trsp timer setting at page 346)
335
   */
248
  static Time GetDefaultCtsAckTimeout (void);
336
  static Time GetDefaultCtsAckTimeout (void);
249
  static Time GetDefaultBasicBlockAckDelay (void);
337
  static Time GetDefaultBasicBlockAckDelay (void);
338
  /**
339
   * \return the default basic block ACK timeout
340
   */
250
  static Time GetDefaultBasicBlockAckTimeout (void);
341
  static Time GetDefaultBasicBlockAckTimeout (void);
251
  static Time GetDefaultCompressedBlockAckDelay (void);
342
  static Time GetDefaultCompressedBlockAckDelay (void);
343
  /**
344
   * \return the default compressed block ACK timeout
345
   */
252
  static Time GetDefaultCompressedBlockAckTimeout (void);
346
  static Time GetDefaultCompressedBlockAckTimeout (void);
253
  /**
347
  /**
254
   * \param standard the phy standard to be used
348
   * \param standard the phy standard to be used
 Lines 262-273    Link Here 
262
356
263
  Time m_maxPropagationDelay;
357
  Time m_maxPropagationDelay;
264
358
359
  /**
360
   * Configure appropriate timing parameters for 802.11a.
361
   */
265
  void Configure80211a (void);
362
  void Configure80211a (void);
363
  /**
364
   * Configure appropriate timing parameters for 802.11b.
365
   */
266
  void Configure80211b (void);
366
  void Configure80211b (void);
367
  /**
368
   * Configure appropriate timing parameters for 802.11g.
369
   */
267
  void Configure80211g (void);
370
  void Configure80211g (void);
371
  /**
372
   * Configure appropriate timing parameters for 802.11 with 10Mhz channel spacing.
373
   */
268
  void Configure80211_10Mhz (void);
374
  void Configure80211_10Mhz (void);
375
  /**
376
   * Configure appropriate timing parameters for 802.11 with 5Mhz channel spacing.
377
   */
269
  void Configure80211_5Mhz ();
378
  void Configure80211_5Mhz ();
379
  /**
380
   * Configure appropriate timing parameters for 802.11n operating at 2.4Ghz.
381
   */
270
  void Configure80211n_2_4Ghz (void);
382
  void Configure80211n_2_4Ghz (void);
383
  /**
384
   * Configure appropriate timing parameters for 802.11n operating at 5Ghz.
385
   */
271
  void Configure80211n_5Ghz (void);
386
  void Configure80211n_5Ghz (void);
272
387
273
  /**
388
  /**
(-)a/src/wifi/model/wifi-phy.cc (-15 / +12 lines)
 Lines 499-507    Link Here 
499
}
499
}
500
500
501
501
502
/**
502
// Clause 15 rates (DSSS)
503
 * Clause 15 rates (DSSS)
504
 */
505
503
506
WifiMode
504
WifiMode
507
WifiPhy::GetDsssRate1Mbps ()
505
WifiPhy::GetDsssRate1Mbps ()
 Lines 530-538    Link Here 
530
}
528
}
531
529
532
530
533
/**
531
// Clause 18 rates (HR/DSSS)
534
 * Clause 18 rates (HR/DSSS)
532
535
 */
536
WifiMode
533
WifiMode
537
WifiPhy::GetDsssRate5_5Mbps ()
534
WifiPhy::GetDsssRate5_5Mbps ()
538
{
535
{
 Lines 560-568    Link Here 
560
}
557
}
561
558
562
559
563
/**
560
// Clause 19.5 rates (ERP-OFDM)
564
 * Clause 19.5 rates (ERP-OFDM)
561
565
 */
566
WifiMode
562
WifiMode
567
WifiPhy::GetErpOfdmRate6Mbps ()
563
WifiPhy::GetErpOfdmRate6Mbps ()
568
{
564
{
 Lines 668-676    Link Here 
668
}
664
}
669
665
670
666
671
/**
667
// Clause 17 rates (OFDM)
672
 * Clause 17 rates (OFDM)
668
673
 */
674
WifiMode
669
WifiMode
675
WifiPhy::GetOfdmRate6Mbps ()
670
WifiPhy::GetOfdmRate6Mbps ()
676
{
671
{
 Lines 775-781    Link Here 
775
  return mode;
770
  return mode;
776
}
771
}
777
772
778
/* 10 MHz channel rates */
773
// 10 MHz channel rates
774
779
WifiMode
775
WifiMode
780
WifiPhy::GetOfdmRate3MbpsBW10MHz ()
776
WifiPhy::GetOfdmRate3MbpsBW10MHz ()
781
{
777
{
 Lines 880-886    Link Here 
880
  return mode;
876
  return mode;
881
}
877
}
882
878
883
/* 5 MHz channel rates */
879
// 5 MHz channel rates
880
884
WifiMode
881
WifiMode
885
WifiPhy::GetOfdmRate1_5MbpsBW5MHz ()
882
WifiPhy::GetOfdmRate1_5MbpsBW5MHz ()
886
{
883
{
 Lines 985-991    Link Here 
985
  return mode;
982
  return mode;
986
}
983
}
987
984
988
/*Clause 20*/
985
// Clause 20
989
986
990
WifiMode
987
WifiMode
991
WifiPhy::GetOfdmRate6_5MbpsBW20MHz ()
988
WifiPhy::GetOfdmRate6_5MbpsBW20MHz ()
(-)a/src/wifi/model/wifi-phy.h (-53 / +103 lines)
 Lines 162-171    Link Here 
162
  WifiPhy ();
162
  WifiPhy ();
163
  virtual ~WifiPhy ();
163
  virtual ~WifiPhy ();
164
164
165
  /**
166
   * Return the minimum available transmission power level (dBm).
167
   *
168
   * \return the minimum available transmission power level in dBm
169
   */
165
  virtual double GetTxPowerStart (void) const = 0;
170
  virtual double GetTxPowerStart (void) const = 0;
171
  /**
172
   * Return the maximum available transmission power level (dBm).
173
   *
174
   * \return the maximum available transmission power level in dBm
175
   */
166
  virtual double GetTxPowerEnd (void) const = 0;
176
  virtual double GetTxPowerEnd (void) const = 0;
167
  /**
177
  /**
168
   * \returns the number of tx power levels available for this PHY.
178
   * \return the number of tx power levels available for this PHY.
169
   */
179
   */
170
  virtual uint32_t GetNTxPower (void) const = 0;
180
  virtual uint32_t GetNTxPower (void) const = 0;
171
181
 Lines 198-238    Link Here 
198
  virtual void RegisterListener (WifiPhyListener *listener) = 0;
208
  virtual void RegisterListener (WifiPhyListener *listener) = 0;
199
209
200
  /**
210
  /**
201
   * \returns true of the current state of the PHY layer is WifiPhy::IDLE, false otherwise.
211
   * \return true of the current state of the PHY layer is WifiPhy::IDLE, false otherwise.
202
   */
212
   */
203
  virtual bool IsStateIdle (void) = 0;
213
  virtual bool IsStateIdle (void) = 0;
204
  /**
214
  /**
205
   * \returns true of the current state of the PHY layer is WifiPhy::CCA_BUSY, false otherwise.
215
   * \return true of the current state of the PHY layer is WifiPhy::CCA_BUSY, false otherwise.
206
   */
216
   */
207
  virtual bool IsStateCcaBusy (void) = 0;
217
  virtual bool IsStateCcaBusy (void) = 0;
208
  /**
218
  /**
209
   * \returns true of the current state of the PHY layer is not WifiPhy::IDLE, false otherwise.
219
   * \return true of the current state of the PHY layer is not WifiPhy::IDLE, false otherwise.
210
   */
220
   */
211
  virtual bool IsStateBusy (void) = 0;
221
  virtual bool IsStateBusy (void) = 0;
212
  /**
222
  /**
213
   * \returns true of the current state of the PHY layer is WifiPhy::RX, false otherwise.
223
   * \return true of the current state of the PHY layer is WifiPhy::RX, false otherwise.
214
   */
224
   */
215
  virtual bool IsStateRx (void) = 0;
225
  virtual bool IsStateRx (void) = 0;
216
  /**
226
  /**
217
   * \returns true of the current state of the PHY layer is WifiPhy::TX, false otherwise.
227
   * \return true of the current state of the PHY layer is WifiPhy::TX, false otherwise.
218
   */
228
   */
219
  virtual bool IsStateTx (void) = 0;
229
  virtual bool IsStateTx (void) = 0;
220
  /**
230
  /**
221
   * \returns true of the current state of the PHY layer is WifiPhy::SWITCHING, false otherwise.
231
   * \return true of the current state of the PHY layer is WifiPhy::SWITCHING, false otherwise.
222
   */
232
   */
223
  virtual bool IsStateSwitching (void) = 0;
233
  virtual bool IsStateSwitching (void) = 0;
224
  /**
234
  /**
225
   * \returns the amount of time since the current state has started.
235
   * \return the amount of time since the current state has started.
226
   */
236
   */
227
  virtual Time GetStateDuration (void) = 0;
237
  virtual Time GetStateDuration (void) = 0;
228
  /**
238
  /**
229
   * \returns the predicted delay until this PHY can become WifiPhy::IDLE.
239
   * \return the predicted delay until this PHY can become WifiPhy::IDLE.
230
   *
240
   *
231
   * The PHY will never become WifiPhy::IDLE _before_ the delay returned by
241
   * The PHY will never become WifiPhy::IDLE _before_ the delay returned by
232
   * this method but it could become really idle later.
242
   * this method but it could become really idle later.
233
   */
243
   */
234
  virtual Time GetDelayUntilIdle (void) = 0;
244
  virtual Time GetDelayUntilIdle (void) = 0;
235
245
246
  /**
247
   * Return the start time of the last received packet.
248
   *
249
   * \return the start time of the last received packet
250
   */
236
  virtual Time GetLastRxStartTime (void) const = 0;
251
  virtual Time GetLastRxStartTime (void) const = 0;
237
252
238
  /**
253
  /**
 Lines 313-319    Link Here 
313
   * WifiRemoteStationManager), which itself is a superset (again, not
328
   * WifiRemoteStationManager), which itself is a superset (again, not
314
   * necessarily proper) of the BSSBasicRateSet.
329
   * necessarily proper) of the BSSBasicRateSet.
315
   *
330
   *
316
   * \returns the number of transmission modes supported by this PHY.
331
   * \return the number of transmission modes supported by this PHY.
317
   *
332
   *
318
   * \sa WifiPhy::GetMode()
333
   * \sa WifiPhy::GetMode()
319
   */
334
   */
 Lines 332-338    Link Here 
332
   * necessarily proper) of the BSSBasicRateSet.
347
   * necessarily proper) of the BSSBasicRateSet.
333
   *
348
   *
334
   * \param mode index in array of supported modes
349
   * \param mode index in array of supported modes
335
   * \returns the mode whose index is specified.
350
   * \return the mode whose index is specified.
336
   *
351
   *
337
   * \sa WifiPhy::GetNModes()
352
   * \sa WifiPhy::GetNModes()
338
   */
353
   */
 Lines 340-346    Link Here 
340
  /**
355
  /**
341
   * \param txMode the transmission mode
356
   * \param txMode the transmission mode
342
   * \param ber the probability of bit error rate
357
   * \param ber the probability of bit error rate
343
   * \returns the minimum snr which is required to achieve
358
   * \return the minimum snr which is required to achieve
344
   *          the requested ber for the specified transmission mode. (W/W)
359
   *          the requested ber for the specified transmission mode. (W/W)
345
   */
360
   */
346
  virtual double CalculateSnr (WifiMode txMode, double ber) const = 0;
361
  virtual double CalculateSnr (WifiMode txMode, double ber) const = 0;
 Lines 354-360    Link Here 
354
   * This was introduced with 11n
369
   * This was introduced with 11n
355
   *
370
   *
356
   * \param selector index in array of supported memeberships
371
   * \param selector index in array of supported memeberships
357
   * \returns the memebership selector whose index is specified.
372
   * \return the memebership selector whose index is specified.
358
   *
373
   *
359
   * \sa WifiPhy::NBssMembershipSelectors()
374
   * \sa WifiPhy::NBssMembershipSelectors()
360
   */
375
   */
 Lines 371-377    Link Here 
371
   * This was introduced with 11n
386
   * This was introduced with 11n
372
   *
387
   *
373
   * \param selector index in array of supported memeberships
388
   * \param selector index in array of supported memeberships
374
   * \returns a WifiModeList that contains the WifiModes associrated with the selected index.
389
   * \return a WifiModeList that contains the WifiModes associrated with the selected index.
375
   *
390
   *
376
   * \sa WifiPhy::GetMembershipSelectorModes()
391
   * \sa WifiPhy::GetMembershipSelectorModes()
377
   */
392
   */
 Lines 386-392    Link Here 
386
   * This was introduced with 11n
401
   * This was introduced with 11n
387
   *
402
   *
388
   * \param Mcs index in array of supported Mcs
403
   * \param Mcs index in array of supported Mcs
389
   * \returns the Mcs index whose index is specified.
404
   * \return the Mcs index whose index is specified.
390
   *
405
   *
391
   * \sa WifiPhy::GetNMcs()
406
   * \sa WifiPhy::GetNMcs()
392
   */
407
   */
 Lines 405-417    Link Here 
405
   *
420
   *
406
   * where Starting channel frequency is standard-dependent, see SetStandard()
421
   * where Starting channel frequency is standard-dependent, see SetStandard()
407
   * as defined in IEEE 802.11-2007 17.3.8.3.2.
422
   * as defined in IEEE 802.11-2007 17.3.8.3.2.
423
   *
424
   * \param id the channel number
408
   */
425
   */
409
  virtual void SetChannelNumber (uint16_t id) = 0;
426
  virtual void SetChannelNumber (uint16_t id) = 0;
410
  /// Return current channel number, see SetChannelNumber()
427
  /**  
428
   * Return current channel number.
429
   *
430
   * \return the current channel number
431
   */
411
  virtual uint16_t GetChannelNumber () const = 0;
432
  virtual uint16_t GetChannelNumber () const = 0;
412
433
434
  /**
435
   * Configure the PHY-level parameters for different Wi-Fi standard.
436
   *
437
   * \param standard the Wi-Fi standard
438
   */
413
  virtual void ConfigureStandard (enum WifiPhyStandard standard) = 0;
439
  virtual void ConfigureStandard (enum WifiPhyStandard standard) = 0;
414
440
441
  /**
442
   * Return the WifiChannel this WifiPhy is connected to.
443
   *
444
   * \return the WifiChannel this WifiPhy is connected to
445
   */
415
  virtual Ptr<WifiChannel> GetChannel (void) const = 0;
446
  virtual Ptr<WifiChannel> GetChannel (void) const = 0;
416
447
417
  static WifiMode GetDsssRate1Mbps ();
448
  static WifiMode GetDsssRate1Mbps ();
 Lines 488-523    Link Here 
488
  /**
519
  /**
489
   * Public method used to fire a PhyTxBegin trace.  Implemented for encapsulation
520
   * Public method used to fire a PhyTxBegin trace.  Implemented for encapsulation
490
   * purposes.
521
   * purposes.
522
   *
523
   * \param packet the packet being transmitted
491
   */
524
   */
492
  void NotifyTxBegin (Ptr<const Packet> packet);
525
  void NotifyTxBegin (Ptr<const Packet> packet);
493
526
494
  /**
527
  /**
495
   * Public method used to fire a PhyTxEnd trace.  Implemented for encapsulation
528
   * Public method used to fire a PhyTxEnd trace.  Implemented for encapsulation
496
   * purposes.
529
   * purposes.
530
   *
531
   * \param packet the packet that was transmitted
497
   */
532
   */
498
  void NotifyTxEnd (Ptr<const Packet> packet);
533
  void NotifyTxEnd (Ptr<const Packet> packet);
499
534
500
  /**
535
  /**
501
   * Public method used to fire a PhyTxDrop trace.  Implemented for encapsulation
536
   * Public method used to fire a PhyTxDrop trace.  Implemented for encapsulation
502
   * purposes.
537
   * purposes.
538
   *
539
   * \param packet the packet that was failed to transmitted
503
   */
540
   */
504
  void NotifyTxDrop (Ptr<const Packet> packet);
541
  void NotifyTxDrop (Ptr<const Packet> packet);
505
542
506
  /**
543
  /**
507
   * Public method used to fire a PhyRxBegin trace.  Implemented for encapsulation
544
   * Public method used to fire a PhyRxBegin trace.  Implemented for encapsulation
508
   * purposes.
545
   * purposes.
546
   *
547
   * \param packet the packet being received
509
   */
548
   */
510
  void NotifyRxBegin (Ptr<const Packet> packet);
549
  void NotifyRxBegin (Ptr<const Packet> packet);
511
550
512
  /**
551
  /**
513
   * Public method used to fire a PhyRxEnd trace.  Implemented for encapsulation
552
   * Public method used to fire a PhyRxEnd trace.  Implemented for encapsulation
514
   * purposes.
553
   * purposes.
554
   *
555
   * \param packet the packet received
515
   */
556
   */
516
  void NotifyRxEnd (Ptr<const Packet> packet);
557
  void NotifyRxEnd (Ptr<const Packet> packet);
517
558
518
  /**
559
  /**
519
   * Public method used to fire a PhyRxDrop trace.  Implemented for encapsulation
560
   * Public method used to fire a PhyRxDrop trace.  Implemented for encapsulation
520
   * purposes.
561
   * purposes.
562
   *
563
   * \param packet the packet that was not successfully received
521
   */
564
   */
522
  void NotifyRxDrop (Ptr<const Packet> packet);
565
  void NotifyRxDrop (Ptr<const Packet> packet);
523
566
 Lines 526-545    Link Here 
526
   * Public method used to fire a MonitorSniffer trace for a wifi packet being received.  Implemented for encapsulation
569
   * Public method used to fire a MonitorSniffer trace for a wifi packet being received.  Implemented for encapsulation
527
   * purposes.
570
   * purposes.
528
   *
571
   *
529
   * @param packet the packet being received
572
   * \param packet the packet being received
530
   * @param channelFreqMhz the frequency in MHz at which the packet is
573
   * \param channelFreqMhz the frequency in MHz at which the packet is
531
   * received. Note that in real devices this is normally the
574
   *        received. Note that in real devices this is normally the
532
   * frequency to which  the receiver is tuned, and this can be
575
   *        frequency to which  the receiver is tuned, and this can be
533
   * different than the frequency at which the packet was originally
576
   *        different than the frequency at which the packet was originally
534
   * transmitted. This is because it is possible to have the receiver
577
   *        transmitted. This is because it is possible to have the receiver
535
   * tuned on a given channel and still to be able to receive packets
578
   *        tuned on a given channel and still to be able to receive packets
536
   * on a nearby channel.
579
   *        on a nearby channel.
537
   * @param channelNumber the channel on which the packet is received
580
   * \param channelNumber the channel on which the packet is received
538
   * @param rate the PHY data rate in units of 500kbps (i.e., the same
581
   * \param rate the PHY data rate in units of 500kbps (i.e., the same
539
   * units used both for the radiotap and for the prism header)
582
   *        units used both for the radiotap and for the prism header)
540
   * @param isShortPreamble true if short preamble is used, false otherwise
583
   * \param isShortPreamble true if short preamble is used, false otherwise
541
   * @param signalDbm signal power in dBm
584
   * \param signalDbm signal power in dBm
542
   * @param noiseDbm  noise power in dBm
585
   * \param noiseDbm  noise power in dBm
543
   */
586
   */
544
  void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble,
587
  void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble,
545
                             double signalDbm, double noiseDbm);
588
                             double signalDbm, double noiseDbm);
 Lines 549-561    Link Here 
549
   * Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.  Implemented for encapsulation
592
   * Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted.  Implemented for encapsulation
550
   * purposes.
593
   * purposes.
551
   *
594
   *
552
   * @param packet the packet being transmitted
595
   * \param packet the packet being transmitted
553
   * @param channelFreqMhz the frequency in MHz at which the packet is
596
   * \param channelFreqMhz the frequency in MHz at which the packet is
554
   * transmitted.
597
   *        transmitted.
555
   * @param channelNumber the channel on which the packet is transmitted
598
   * \param channelNumber the channel on which the packet is transmitted
556
   * @param rate the PHY data rate in units of 500kbps (i.e., the same
599
   * \param rate the PHY data rate in units of 500kbps (i.e., the same
557
   * units used both for the radiotap and for the prism header)
600
   *        units used both for the radiotap and for the prism header)
558
   * @param isShortPreamble true if short preamble is used, false otherwise
601
   * \param isShortPreamble true if short preamble is used, false otherwise
602
   * \param txPower the transmission power in dBm
559
   */
603
   */
560
  void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower);
604
  void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower);
561
605
 Lines 570-632    Link Here 
570
  virtual int64_t AssignStreams (int64_t stream) = 0;
614
  virtual int64_t AssignStreams (int64_t stream) = 0;
571
615
572
  /**
616
  /**
573
   * \param the operating frequency on this node.
617
   * \param freq the operating frequency on this node.
574
   */
618
   */
575
  virtual void SetFrequency (uint32_t freq)=0;
619
  virtual void SetFrequency (uint32_t freq)=0;
620
  /**
621
   * \return the operating frequency on this node
622
   */
576
  virtual uint32_t GetFrequency (void) const=0;
623
  virtual uint32_t GetFrequency (void) const=0;
577
  /**
624
  /**
578
   * \param the number of transmitters on this node.
625
   * \param tx the number of transmitters on this node.
579
   */
626
   */
580
  virtual void SetNumberOfTransmitAntennas (uint32_t tx)=0;
627
  virtual void SetNumberOfTransmitAntennas (uint32_t tx)=0;
581
628
629
  /**
630
   * \return the number of transmit antenna on this device
631
   */
582
  virtual uint32_t GetNumberOfTransmitAntennas (void) const=0;
632
  virtual uint32_t GetNumberOfTransmitAntennas (void) const=0;
583
   /**
633
   /**
584
   * \param the number of recievers on this node.
634
   * \param rx the number of recievers on this node.
585
   */
635
   */
586
  virtual void SetNumberOfReceiveAntennas (uint32_t rx)=0 ;
636
  virtual void SetNumberOfReceiveAntennas (uint32_t rx)=0 ;
587
  /**
637
  /**
588
   * \returns the number of recievers on this node.
638
   * \return the number of recievers on this node.
589
   */
639
   */
590
  virtual uint32_t GetNumberOfReceiveAntennas (void) const=0;
640
  virtual uint32_t GetNumberOfReceiveAntennas (void) const=0;
591
  /**
641
  /**
592
   * \paramif short guard interval is supported or not
642
   * \param guardInterval Enable or disable short guard interval
593
   */
643
   */
594
   virtual void SetGuardInterval (bool GuardInterval)=0;
644
   virtual void SetGuardInterval (bool guardInterval)=0;
595
   /**
645
   /**
596
   *  \returns if short guard interval is supported or not
646
   *  \return true if short guard interval is supported, false otherwise
597
   */
647
   */
598
  virtual bool GetGuardInterval (void) const = 0;
648
  virtual bool GetGuardInterval (void) const = 0;
599
  /**
649
  /**
600
   * \paramif LDPC is supported or not
650
   * \param ldpc Enable or disable LDPC
601
   */
651
   */
602
  virtual void SetLdpc (bool Ldpc)=0;
652
  virtual void SetLdpc (bool ldpc)=0;
603
  /**
653
  /**
604
   * \returns if LDPC is supported or not
654
   * \return true if LDPC is supported, false otherwise
605
   */
655
   */
606
  virtual bool GetLdpc (void) const=0;
656
  virtual bool GetLdpc (void) const=0;
607
  /**
657
  /**
608
   * \paramif STBC is supported or not
658
   * \param stbc Enable or disable STBC is supported
609
   */
659
   */
610
  virtual void SetStbc (bool stbc)=0;
660
  virtual void SetStbc (bool stbc)=0;
611
  /**
661
  /**
612
   *  \returns if STBC is supported or not
662
   *  \return true if STBC is supported, false otherwise
613
   */
663
   */
614
  virtual bool GetStbc (void) const=0;
664
  virtual bool GetStbc (void) const=0;
615
   
665
   
616
  /**
666
  /**
617
   * \paramif GreenField is supported or not
667
   * \param greenfield Enable or disable GreenField
618
   */
668
   */
619
  virtual void SetGreenfield (bool greenfield)=0;
669
  virtual void SetGreenfield (bool greenfield)=0;
620
  /**
670
  /**
621
   *  \returns if Green field is supported or not
671
   * \return true if Greenfield is supported, false otherwise
622
   */
672
   */
623
  virtual bool GetGreenfield (void) const=0;
673
  virtual bool GetGreenfield (void) const=0;
624
  /**
674
  /**
625
   * \paramif channel bonding 40 MHz is supported or not
675
   * \return true if channel bonding 40 MHz is supported, false otherwise
626
   */
676
   */
627
  virtual bool GetChannelBonding (void) const = 0;
677
  virtual bool GetChannelBonding (void) const = 0;
628
  /**
678
  /**
629
   *  \returns if channel bonding is supported or not
679
   *  \param channelbonding Enable or disable channel bonding
630
   */
680
   */
631
  virtual void SetChannelBonding (bool channelbonding) = 0 ;
681
  virtual void SetChannelBonding (bool channelbonding) = 0 ;
632
682
(-)a/src/wifi/model/wifi-remote-station-manager.cc (+10 lines)
 Lines 45-50    Link Here 
45
public:
45
public:
46
  HighLatencyDataTxVectorTag ();
46
  HighLatencyDataTxVectorTag ();
47
  HighLatencyDataTxVectorTag (WifiTxVector dataTxVector);
47
  HighLatencyDataTxVectorTag (WifiTxVector dataTxVector);
48
  /**
49
   * \returns the transmission mode to use to send this packet
50
   */
48
  WifiTxVector GetDataTxVector (void) const;
51
  WifiTxVector GetDataTxVector (void) const;
49
52
50
  static TypeId GetTypeId (void);
53
  static TypeId GetTypeId (void);
 Lines 110-115    Link Here 
110
public:
113
public:
111
  HighLatencyRtsTxVectorTag ();
114
  HighLatencyRtsTxVectorTag ();
112
  HighLatencyRtsTxVectorTag (WifiTxVector rtsTxVector);
115
  HighLatencyRtsTxVectorTag (WifiTxVector rtsTxVector);
116
  /**
117
   * \returns the transmission mode to use to send the RTS prior to the
118
   *          transmission of the data packet itself.
119
   */
113
  WifiTxVector GetRtsTxVector (void) const;
120
  WifiTxVector GetRtsTxVector (void) const;
114
121
115
  static TypeId GetTypeId (void);
122
  static TypeId GetTypeId (void);
 Lines 175-180    Link Here 
175
public:
182
public:
176
  HighLatencyCtsToSelfTxVectorTag ();
183
  HighLatencyCtsToSelfTxVectorTag ();
177
  HighLatencyCtsToSelfTxVectorTag (WifiTxVector ctsToSelfTxVector);
184
  HighLatencyCtsToSelfTxVectorTag (WifiTxVector ctsToSelfTxVector);
185
  /**
186
   * \returns the transmission mode to use for the CTS-to-self.
187
   */
178
  WifiTxVector GetCtsToSelfTxVector (void) const;
188
  WifiTxVector GetCtsToSelfTxVector (void) const;
179
189
180
  static TypeId GetTypeId (void);
190
  static TypeId GetTypeId (void);
(-)a/src/wifi/model/wifi-remote-station-manager.h (-36 / +373 lines)
 Lines 57-69    Link Here 
57
  void NotifyTxSuccess (uint32_t retryCounter);
57
  void NotifyTxSuccess (uint32_t retryCounter);
58
  /// Updates average frame error rate when final data or RTS has failed.
58
  /// Updates average frame error rate when final data or RTS has failed.
59
  void NotifyTxFailed ();
59
  void NotifyTxFailed ();
60
  /// Returns frame error rate (probability that frame is corrupted due to transmission error).
60
  /// Return frame error rate (probability that frame is corrupted due to transmission error).
61
  double GetFrameErrorRate () const;
61
  double GetFrameErrorRate () const;
62
private:
62
private:
63
  /**
63
  /**
64
   * \brief Calculate averaging coefficient for frame error rate. Depends on time of the last update.
64
   * \brief Calculate averaging coefficient for frame error rate. Depends on time of the last update.
65
   * \attention Calling this method twice gives different results,
65
   * \attention Calling this method twice gives different results,
66
   * because it resets time of last update.
66
   * because it resets time of last update.
67
   *
68
   * \return average coefficient for frame error rate
67
   */
69
   */
68
  double CalculateAveragingCoefficient ();
70
  double CalculateAveragingCoefficient ();
69
  /// averaging coefficient depends on the memory time
71
  /// averaging coefficient depends on the memory time
 Lines 88-120    Link Here 
88
  WifiRemoteStationManager ();
90
  WifiRemoteStationManager ();
89
  virtual ~WifiRemoteStationManager ();
91
  virtual ~WifiRemoteStationManager ();
90
92
93
  /**
94
   * Set up PHY associated with this device since it is the object that
95
   * knows the full set of transmit rates that are supported.
96
   *
97
   * \param phy the PHY of this device
98
   */
91
  virtual void SetupPhy (Ptr<WifiPhy> phy);
99
  virtual void SetupPhy (Ptr<WifiPhy> phy);
92
100
101
  /**
102
   * Return the maximum STA short retry count (SSRC).
103
   *
104
   * \return the maximum SSRC
105
   */
93
  uint32_t GetMaxSsrc (void) const;
106
  uint32_t GetMaxSsrc (void) const;
107
  /**
108
   * Return the maximum STA long retry count (SLRC).
109
   *
110
   * \return the maximum SLRC
111
   */
94
  uint32_t GetMaxSlrc (void) const;
112
  uint32_t GetMaxSlrc (void) const;
113
  /**
114
   * Return the RTS threshold.
115
   *
116
   * \return the RTS threshold
117
   */
95
  uint32_t GetRtsCtsThreshold (void) const;
118
  uint32_t GetRtsCtsThreshold (void) const;
119
  /**
120
   * Return the fragmentation threshold.
121
   *
122
   * \return the fragmentation threshold
123
   */
96
  uint32_t GetFragmentationThreshold (void) const;
124
  uint32_t GetFragmentationThreshold (void) const;
125
  /**
126
   * Sets the maximum STA short retry count (SSRC).
127
   *
128
   * \param the maximum SSRC
129
   */
97
  void SetMaxSsrc (uint32_t maxSsrc);
130
  void SetMaxSsrc (uint32_t maxSsrc);
131
  /**
132
   * Sets the maximum STA long retry count (SLRC).
133
   *
134
   * \param the maximum SLRC
135
   */
98
  void SetMaxSlrc (uint32_t maxSlrc);
136
  void SetMaxSlrc (uint32_t maxSlrc);
137
  /**
138
   * Sets the RTS threshold.
139
   *
140
   * \param the RTS threshold
141
   */
99
  void SetRtsCtsThreshold (uint32_t threshold);
142
  void SetRtsCtsThreshold (uint32_t threshold);
143
  /**
144
   * Sets a fragmentation threshold. The method calls a private method
145
   * DoSetFragmentationThreshold that checks the validity of the value given.
146
   *
147
   * \param threshold the fragmentation threshold
148
   */
100
  void SetFragmentationThreshold (uint32_t threshold);
149
  void SetFragmentationThreshold (uint32_t threshold);
101
  void AddStationHtCapabilities (Mac48Address from,HtCapabilities     htcapabilities);
150
  /**
151
   * Records HT capabilities of remote station.
152
   *
153
   * \param from the address of the station being recorded
154
   * \param htcapabilities the HT capabilities of the station
155
   */
156
  void AddStationHtCapabilities (Mac48Address from, HtCapabilities htcapabilities);
157
  /**
158
   * Enable or disable HT capability support.
159
   *
160
   * \param enable enable or disable HT capability support
161
   */
102
  void SetHtSupported (bool enable);
162
  void SetHtSupported (bool enable);
163
  /**
164
   * Return whether the device has HT capability support enabled.
165
   *
166
   * \return true if HT capability support is enabled, false otherwise
167
   */
103
  bool HasHtSupported (void) const;
168
  bool HasHtSupported (void) const;
104
169
105
  // Invoked in a STA upon dis-association
170
  /**
106
  // or in an AP upon reboot
171
   * Reset the station, invoked in a STA upon dis-association or in an AP upon reboot.
172
   */
107
  void Reset (void);
173
  void Reset (void);
108
  // Invoked in a STA upon association to store
174
  /**
109
  // the set of rates which belong to the
175
   * Invoked in a STA upon association to store the set of rates which belong to the
110
  // BSSBasicRateSet of the associated AP
176
   * BSSBasicRateSet of the associated AP and which are supported locally.
111
  // and which are supported locally.
177
   * Invoked in an AP to configure the BSSBasicRateSet.
112
  // Invoked in an AP to configure the BSSBasicRateSet
178
   * 
179
   * \param mode the WifiMode to be added to the basic mode set
180
   */
113
  void AddBasicMode (WifiMode mode);
181
  void AddBasicMode (WifiMode mode);
114
182
183
  /**
184
   * Return the default transmission mode.
185
   *
186
   * \return WifiMode the default transmission mode
187
   */
115
  WifiMode GetDefaultMode (void) const;
188
  WifiMode GetDefaultMode (void) const;
189
  /**
190
   * Return the number of basic modes we support.
191
   *
192
   * \return the number of basic modes we support
193
   */
116
  uint32_t GetNBasicModes (void) const;
194
  uint32_t GetNBasicModes (void) const;
195
  /**
196
   * Return a basic mode from the set of basic modes.
197
   *
198
   * \param i index of the basic mode in the basic mode set
199
   * \return the basic mode at the given index
200
   */
117
  WifiMode GetBasicMode (uint32_t i) const;
201
  WifiMode GetBasicMode (uint32_t i) const;
202
  /**
203
   * Return whether the station supports Greenfield or not.
204
   *
205
   * \param address the address of the station
206
   * \return true if Greenfield is supported by the station,
207
   *          false otherwise
208
   */
118
  bool GetGreenfieldSupported (Mac48Address address) const;
209
  bool GetGreenfieldSupported (Mac48Address address) const;
119
  void AddBasicMcs (uint8_t mcs);
210
  void AddBasicMcs (uint8_t mcs);
120
211
 Lines 123-134    Link Here 
123
  uint8_t GetBasicMcs (uint32_t i) const;
214
  uint8_t GetBasicMcs (uint32_t i) const;
124
  void AddSupportedMcs (Mac48Address address, uint8_t mcs);
215
  void AddSupportedMcs (Mac48Address address, uint8_t mcs);
125
216
217
  /**
218
   * Return a mode for non-unicast packets.
219
   *
220
   * \return WifiMode for non-unicast packets
221
   */
126
  WifiMode GetNonUnicastMode (void) const;
222
  WifiMode GetNonUnicastMode (void) const;
127
223
128
224
129
  /**
225
  /**
130
   * Invoked in an AP upon disassociation of a
226
   * Invoked in an AP upon disassociation of a
131
   * specific STA.
227
   * specific STA.
228
   *
229
   * \param address the address of the STA
132
   */
230
   */
133
  void Reset (Mac48Address address);
231
  void Reset (Mac48Address address);
134
  /**
232
  /**
 Lines 137-152    Link Here 
137
   * also supported locally.
235
   * also supported locally.
138
   * The set of supported modes includes
236
   * The set of supported modes includes
139
   * the BSSBasicRateSet.
237
   * the BSSBasicRateSet.
238
   *
239
   * \param address the address of the station being recorded
240
   * \param mode the WifiMode supports by the station
140
   */
241
   */
141
  void AddSupportedMode (Mac48Address address, WifiMode mode);
242
  void AddSupportedMode (Mac48Address address, WifiMode mode);
142
  //void  AddBssMembershipParameters(Mac48Address address, uint32_t selector);
243
  //void  AddBssMembershipParameters(Mac48Address address, uint32_t selector);
143
244
245
  /**
246
   * Return whether the station state is brand new.
247
   *
248
   * \param address the address of the station
249
   * \return true if the state of the station is brand new,
250
   *          false otherwise
251
   */
144
  bool IsBrandNew (Mac48Address address) const;
252
  bool IsBrandNew (Mac48Address address) const;
253
  /**
254
   * Return whether the station associated.
255
   *
256
   * \param address the address of the station
257
   * \return true if the station is associated,
258
   *          false otherwise
259
   */
145
  bool IsAssociated (Mac48Address address) const;
260
  bool IsAssociated (Mac48Address address) const;
261
  /**
262
   * Return whether we are waiting for an ACK for
263
   * the association response we sent.
264
   *
265
   * \param address the address of the station
266
   * \return true if the station is associated,
267
   *          false otherwise
268
   */
146
  bool IsWaitAssocTxOk (Mac48Address address) const;
269
  bool IsWaitAssocTxOk (Mac48Address address) const;
270
  /**
271
   * Records that we are waiting for an ACK for
272
   * the association response we sent.
273
   *
274
   * \param address the address of the station
275
   */
147
  void RecordWaitAssocTxOk (Mac48Address address);
276
  void RecordWaitAssocTxOk (Mac48Address address);
277
  /**
278
   * Records that we got an ACK for
279
   * the association response we sent.
280
   *
281
   * \param address the address of the station
282
   */
148
  void RecordGotAssocTxOk (Mac48Address address);
283
  void RecordGotAssocTxOk (Mac48Address address);
284
  /**
285
   * Records that we missed an ACK for
286
   * the association response we sent.
287
   *
288
   * \param address the address of the station
289
   */
149
  void RecordGotAssocTxFailed (Mac48Address address);
290
  void RecordGotAssocTxFailed (Mac48Address address);
291
  /**
292
   * Records that the STA was disassociated.
293
   *
294
   * \param address the address of the station
295
   */
150
  void RecordDisassociated (Mac48Address address);
296
  void RecordDisassociated (Mac48Address address);
151
297
152
  /**
298
  /**
 Lines 168-174    Link Here 
168
   * \param header MAC header
314
   * \param header MAC header
169
   * \param packet the packet to send
315
   * \param packet the packet to send
170
   * \param fullPacketSize the size of the packet after its 802.11 MAC header has been added.
316
   * \param fullPacketSize the size of the packet after its 802.11 MAC header has been added.
171
   * \returns the transmission mode to use to send this packet
317
   * \return the transmission mode to use to send this packet
172
   */
318
   */
173
  WifiTxVector GetDataTxVector (Mac48Address address, const WifiMacHeader *header,
319
  WifiTxVector GetDataTxVector (Mac48Address address, const WifiMacHeader *header,
174
                        Ptr<const Packet> packet, uint32_t fullPacketSize);
320
                        Ptr<const Packet> packet, uint32_t fullPacketSize);
 Lines 176-224    Link Here 
176
   * \param address remote address
322
   * \param address remote address
177
   * \param header MAC header
323
   * \param header MAC header
178
   * \param packet the packet to send
324
   * \param packet the packet to send
179
   * \returns the transmission mode to use to send the RTS prior to the
325
   *
326
   * \return the transmission mode to use to send the RTS prior to the
180
   *          transmission of the data packet itself.
327
   *          transmission of the data packet itself.
181
   */
328
   */
182
  WifiTxVector GetRtsTxVector (Mac48Address address, const WifiMacHeader *header,
329
  WifiTxVector GetRtsTxVector (Mac48Address address, const WifiMacHeader *header,
183
                       Ptr<const Packet> packet);
330
                       Ptr<const Packet> packet);
184
331
332
  /**
333
   * \param header MAC header
334
   * \param packet the packet to send
335
   *
336
   * \return the transmission mode to use to send the CTS-to-self prior to the
337
   *          transmission of the data packet itself.
338
   */
185
  WifiTxVector GetCtsToSelfTxVector (const WifiMacHeader *header,
339
  WifiTxVector GetCtsToSelfTxVector (const WifiMacHeader *header,
186
                       Ptr<const Packet> packet);
340
                       Ptr<const Packet> packet);
187
341
188
  //Since CTS to Self parameters don't depened on the station it is implemented in wifiremote station manager
342
  /**
343
   * Since CTS-to-self parameters are not dependent on the station,
344
   * it is implemented in wifiremote station manager
345
   */
189
  WifiTxVector DoGetCtsToSelfTxVector (void);
346
  WifiTxVector DoGetCtsToSelfTxVector (void);
190
347
191
348
192
  /**
349
  /**
193
   * Should be invoked whenever the RtsTimeout associated to a transmission
350
   * Should be invoked whenever the RtsTimeout associated to a transmission
194
   * attempt expires.
351
   * attempt expires.
352
   *
353
   * \param address the address of the receiver
354
   * \param header MAC header of the DATA packet
195
   */
355
   */
196
  void ReportRtsFailed (Mac48Address address, const WifiMacHeader *header);
356
  void ReportRtsFailed (Mac48Address address, const WifiMacHeader *header);
197
  /**
357
  /**
198
   * Should be invoked whenever the AckTimeout associated to a transmission
358
   * Should be invoked whenever the AckTimeout associated to a transmission
199
   * attempt expires.
359
   * attempt expires.
360
   *
361
   * \param address the address of the receiver
362
   * \param header MAC header of the DATA packet
200
   */
363
   */
201
  void ReportDataFailed (Mac48Address address, const WifiMacHeader *header);
364
  void ReportDataFailed (Mac48Address address, const WifiMacHeader *header);
202
  /**
365
  /**
203
   * Should be invoked whenever we receive the Cts associated to an RTS
366
   * Should be invoked whenever we receive the Cts associated to an RTS
204
   * we just sent.
367
   * we just sent. Note that we also get the SNR of the RTS we sent since
368
   * the receiver put a SnrTag in the CTS.
369
   * 
370
   * \param address the address of the receiver
371
   * \param header MAC header of the DATA packet
372
   * \param ctsSnr the SNR of the CTS we received
373
   * \param ctsMode the WifiMode the receiver used to send the CTS
374
   * \param rtsSnr the SNR of the RTS we sent
205
   */
375
   */
206
  void ReportRtsOk (Mac48Address address, const WifiMacHeader *header,
376
  void ReportRtsOk (Mac48Address address, const WifiMacHeader *header,
207
                    double ctsSnr, WifiMode ctsMode, double rtsSnr);
377
                    double ctsSnr, WifiMode ctsMode, double rtsSnr);
208
  /**
378
  /**
209
   * Should be invoked whenever we receive the Ack associated to a data packet
379
   * Should be invoked whenever we receive the Ack associated to a data packet
210
   * we just sent.
380
   * we just sent.
381
   *
382
   * \param address the address of the receiver
383
   * \param header MAC header of the DATA packet
384
   * \param ackSnr the SNR of the ACK we received
385
   * \param ackMode the WifiMode the receiver used to send the ACK
386
   * \param dataSnr the SNR of the DATA we sent
211
   */
387
   */
212
  void ReportDataOk (Mac48Address address, const WifiMacHeader *header,
388
  void ReportDataOk (Mac48Address address, const WifiMacHeader *header,
213
                     double ackSnr, WifiMode ackMode, double dataSnr);
389
                     double ackSnr, WifiMode ackMode, double dataSnr);
214
  /**
390
  /**
215
   * Should be invoked after calling ReportRtsFailed if
391
   * Should be invoked after calling ReportRtsFailed if
216
   * NeedRtsRetransmission returns false
392
   * NeedRtsRetransmission returns false
393
   *
394
   * \param address the address of the receiver
395
   * \param header MAC header of the DATA packet
217
   */
396
   */
218
  void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header);
397
  void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header);
219
  /**
398
  /**
220
   * Should be invoked after calling ReportDataFailed if
399
   * Should be invoked after calling ReportDataFailed if
221
   * NeedDataRetransmission returns false
400
   * NeedDataRetransmission returns false
401
   *
402
   * \param address the address of the receiver
403
   * \param header MAC header of the DATA packet
222
   */
404
   */
223
  void ReportFinalDataFailed (Mac48Address address, const WifiMacHeader *header);
405
  void ReportFinalDataFailed (Mac48Address address, const WifiMacHeader *header);
224
406
 Lines 237-254    Link Here 
237
   * \param address remote address
419
   * \param address remote address
238
   * \param header MAC header
420
   * \param header MAC header
239
   * \param packet the packet to send
421
   * \param packet the packet to send
240
   * \returns true if we want to use an RTS/CTS handshake for this
422
   * \return true if we want to use an RTS/CTS handshake for this
241
   *          packet before sending it, false otherwise.
423
   *          packet before sending it, false otherwise.
242
   */
424
   */
243
  bool NeedRts (Mac48Address address, const WifiMacHeader *header,
425
  bool NeedRts (Mac48Address address, const WifiMacHeader *header,
244
                Ptr<const Packet> packet);
426
                Ptr<const Packet> packet);
427
  /**
428
   * Return if we need to do Cts-to-self before sending a DATA.
429
   *
430
   * \return true if Cts-to-self is needed, false otherwise
431
   */
245
  bool NeedCtsToSelf (WifiTxVector txVector);
432
  bool NeedCtsToSelf (WifiTxVector txVector);
246
433
247
  /**
434
  /**
248
   * \param address remote address
435
   * \param address remote address
249
   * \param header MAC header
436
   * \param header MAC header
250
   * \param packet the packet to send
437
   * \param packet the packet to send
251
   * \returns true if we want to restart a failed RTS/CTS
438
   * \return true if we want to restart a failed RTS/CTS
252
   *          handshake, false otherwise.
439
   *          handshake, false otherwise.
253
   */
440
   */
254
  bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header,
441
  bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header,
 Lines 257-263    Link Here 
257
   * \param address remote address
444
   * \param address remote address
258
   * \param header MAC header
445
   * \param header MAC header
259
   * \param packet the packet to send
446
   * \param packet the packet to send
260
   * \returns true if we want to resend a packet
447
   * \return true if we want to resend a packet
261
   *          after a failed transmission attempt, false otherwise.
448
   *          after a failed transmission attempt, false otherwise.
262
   */
449
   */
263
  bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header,
450
  bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header,
 Lines 267-273    Link Here 
267
   * \param address remote address
454
   * \param address remote address
268
   * \param header MAC header
455
   * \param header MAC header
269
   * \param packet the packet to send
456
   * \param packet the packet to send
270
   * \returns true if this packet should be fragmented, false otherwise.
457
   * \return true if this packet should be fragmented, false otherwise.
271
   */
458
   */
272
  bool NeedFragmentation (Mac48Address address, const WifiMacHeader *header,
459
  bool NeedFragmentation (Mac48Address address, const WifiMacHeader *header,
273
                          Ptr<const Packet> packet);
460
                          Ptr<const Packet> packet);
 Lines 276-282    Link Here 
276
   * \param header MAC header
463
   * \param header MAC header
277
   * \param packet the packet to send
464
   * \param packet the packet to send
278
   * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
465
   * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
279
   * \returns the size of the corresponding fragment.
466
   * \return the size of the corresponding fragment.
280
   */
467
   */
281
  uint32_t GetFragmentSize (Mac48Address address, const WifiMacHeader *header,
468
  uint32_t GetFragmentSize (Mac48Address address, const WifiMacHeader *header,
282
                            Ptr<const Packet> packet, uint32_t fragmentNumber);
469
                            Ptr<const Packet> packet, uint32_t fragmentNumber);
 Lines 285-291    Link Here 
285
   * \param header MAC header
472
   * \param header MAC header
286
   * \param packet the packet to send
473
   * \param packet the packet to send
287
   * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
474
   * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
288
   * \returns the offset within the original packet where this fragment starts.
475
   * \return the offset within the original packet where this fragment starts.
289
   */
476
   */
290
  uint32_t GetFragmentOffset (Mac48Address address, const WifiMacHeader *header,
477
  uint32_t GetFragmentOffset (Mac48Address address, const WifiMacHeader *header,
291
                              Ptr<const Packet> packet, uint32_t fragmentNumber);
478
                              Ptr<const Packet> packet, uint32_t fragmentNumber);
 Lines 294-300    Link Here 
294
   * \param header MAC header
481
   * \param header MAC header
295
   * \param packet the packet to send
482
   * \param packet the packet to send
296
   * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
483
   * \param fragmentNumber the fragment index of the next fragment to send (starts at zero).
297
   * \returns true if this is the last fragment, false otherwise.
484
   * \return true if this is the last fragment, false otherwise.
298
   */
485
   */
299
  bool IsLastFragment (Mac48Address address, const WifiMacHeader *header,
486
  bool IsLastFragment (Mac48Address address, const WifiMacHeader *header,
300
                       Ptr<const Packet> packet, uint32_t fragmentNumber);
487
                       Ptr<const Packet> packet, uint32_t fragmentNumber);
 Lines 302-357    Link Here 
302
  /**
489
  /**
303
   * \param address remote address
490
   * \param address remote address
304
   * \param rtsMode the transmission mode used to send an RTS we just received
491
   * \param rtsMode the transmission mode used to send an RTS we just received
305
   * \returns the transmission mode to use for the CTS to complete the RTS/CTS
492
   * \return the transmission mode to use for the CTS to complete the RTS/CTS
306
   *          handshake.
493
   *          handshake.
307
   */
494
   */
308
  WifiTxVector GetCtsTxVector (Mac48Address address, WifiMode rtsMode);
495
  WifiTxVector GetCtsTxVector (Mac48Address address, WifiMode rtsMode);
309
  /**
496
  /**
310
   * \param address
497
   * \param address
311
   * \param dataMode the transmission mode used to send an ACK we just received
498
   * \param dataMode the transmission mode used to send an ACK we just received
312
   * \returns the transmission mode to use for the ACK to complete the data/ACK
499
   * \return the transmission mode to use for the ACK to complete the data/ACK
313
   *          handshake.
500
   *          handshake.
314
   */
501
   */
315
  WifiTxVector GetAckTxVector (Mac48Address address, WifiMode dataMode);
502
  WifiTxVector GetAckTxVector (Mac48Address address, WifiMode dataMode);
316
  /**
503
  /**
317
   * \param address
504
   * \param address
318
   * \param dataMode the transmission mode used to send an ACK we just received
505
   * \param dataMode the transmission mode used to send an ACK we just received
319
   * \returns the transmission mode to use for the ACK to complete the data/ACK
506
   * \return the transmission mode to use for the ACK to complete the data/ACK
320
   *          handshake.
507
   *          handshake.
321
   */
508
   */
322
  WifiTxVector GetBlockAckTxVector (Mac48Address address, WifiMode dataMode);
509
  WifiTxVector GetBlockAckTxVector (Mac48Address address, WifiMode dataMode);
323
  /**
510
  /**
324
   * \returns the default transmission power
511
   * \return the default transmission power
325
   */ 
512
   */ 
326
  uint8_t GetDefaultTxPowerLevel (void) const;
513
  uint8_t GetDefaultTxPowerLevel (void) const;
327
  /**
514
  /**
328
   * \param address of the remote station
515
   * \param address of the remote station
329
   * \returns information regarding the remote station associated with the given address
516
   * \return information regarding the remote station associated with the given address
330
   */
517
   */
331
  WifiRemoteStationInfo GetInfo (Mac48Address address);
518
  WifiRemoteStationInfo GetInfo (Mac48Address address);
332
  /**
519
  /**
333
   * Set the default transmission power level
520
   * Set the default transmission power level
521
   *
522
   * \param the default transmission power level
334
   */
523
   */
335
  void SetDefaultTxPowerLevel (uint8_t txPower);
524
  void SetDefaultTxPowerLevel (uint8_t txPower);
336
 /**
525
 /**
337
  * \returns the number of transmit antennas supported by the phy layer
526
  * \return the number of transmit antennas supported by the phy layer
338
  */
527
  */
339
 uint32_t GetNumberOfTransmitAntennas (void);
528
 uint32_t GetNumberOfTransmitAntennas (void);
340
529
341
 protected:
530
 protected:
342
  virtual void DoDispose (void);
531
  virtual void DoDispose (void);
343
  // for convenience
532
  /**
533
   * Return whether mode associated with the specified station at the specified index.
534
   *
535
   * \param station the station being queried
536
   * \param i the index
537
   * \return WifiMode at the given index of the specified station
538
   */
344
  WifiMode GetSupported (const WifiRemoteStation *station, uint32_t i) const;
539
  WifiMode GetSupported (const WifiRemoteStation *station, uint32_t i) const;
540
  /**
541
   * Return the number of modes supported by the given station.
542
   *
543
   * \param station the station being queried
544
   * \return the number of modes supported by the given station
545
   */
345
  uint32_t GetNSupported (const WifiRemoteStation *station) const;
546
  uint32_t GetNSupported (const WifiRemoteStation *station) const;
346
  uint8_t GetMcsSupported (const WifiRemoteStation *station, uint32_t i) const;
547
  uint8_t GetMcsSupported (const WifiRemoteStation *station, uint32_t i) const;
347
  uint32_t GetNMcsSupported (const WifiRemoteStation *station) const;
548
  uint32_t GetNMcsSupported (const WifiRemoteStation *station) const;
348
549
550
  /**
551
   * Return whether the given station supports short guard interval.
552
   *
553
   * \param station the station being queried
554
   * \return true if the station supports short guard interval,
555
   *          false otherwise
556
   */
349
  bool GetShortGuardInterval (const WifiRemoteStation *station) const;
557
  bool GetShortGuardInterval (const WifiRemoteStation *station) const;
350
  bool GetStbc (const WifiRemoteStation *station) const;
558
  bool GetStbc (const WifiRemoteStation *station) const;
559
  /**
560
   * Return whether the station supports Greenfield or not.
561
   *
562
   * \param station the station being queried
563
   * \return true if Greenfield is supported by the station,
564
   *          false otherwise
565
   */
351
  bool GetGreenfield (const WifiRemoteStation *station) const;
566
  bool GetGreenfield (const WifiRemoteStation *station) const;
567
  /**
568
   * Return the number of receive antenna the station has.
569
   *
570
   * \param station the station being queried
571
   * \return the number of receive antenna the station has
572
   */
352
  uint32_t GetNumberOfReceiveAntennas (const WifiRemoteStation *station) const;
573
  uint32_t GetNumberOfReceiveAntennas (const WifiRemoteStation *station) const;
574
  /**
575
   * Return the number of transmit antenna the station has.
576
   *
577
   * \param station the station being queried
578
   * \return the number of transmit antenna the station has
579
   */
353
  uint32_t GetNumberOfTransmitAntennas (const WifiRemoteStation *station) const;
580
  uint32_t GetNumberOfTransmitAntennas (const WifiRemoteStation *station) const;
581
  /**
582
   * Return the long retry limit of the given station.
583
   *
584
   * \param station the station being queried
585
   * \return the long retry limit of the the station
586
   */
354
  uint32_t GetLongRetryCount (const WifiRemoteStation *station) const;
587
  uint32_t GetLongRetryCount (const WifiRemoteStation *station) const;
588
  /**
589
   * Return the short retry limit of the given station.
590
   *
591
   * \param station the station being queried
592
   * \return the short retry limit of the the station
593
   */
355
  uint32_t GetShortRetryCount (const WifiRemoteStation *station) const;
594
  uint32_t GetShortRetryCount (const WifiRemoteStation *station) const;
356
private:
595
private:
357
  /**
596
  /**
 Lines 359-365    Link Here 
359
   * \param packet the packet to send
598
   * \param packet the packet to send
360
   * \param normally indicates whether the normal 802.11 rts enable mechanism would
599
   * \param normally indicates whether the normal 802.11 rts enable mechanism would
361
   *        request that the rts is sent or not.
600
   *        request that the rts is sent or not.
362
   * \returns true if we want to use an RTS/CTS handshake for this
601
   * \return true if we want to use an RTS/CTS handshake for this
363
   *          packet before sending it, false otherwise.
602
   *          packet before sending it, false otherwise.
364
   *
603
   *
365
   * Note: This method is called before a unicast packet is sent on the medium.
604
   * Note: This method is called before a unicast packet is sent on the medium.
 Lines 371-377    Link Here 
371
   * \param packet the packet to send
610
   * \param packet the packet to send
372
   * \param normally indicates whether the normal 802.11 rts enable mechanism would
611
   * \param normally indicates whether the normal 802.11 rts enable mechanism would
373
   *        request that the rts is retransmitted or not.
612
   *        request that the rts is retransmitted or not.
374
   * \returns true if we want to restart a failed RTS/CTS
613
   * \return true if we want to restart a failed RTS/CTS
375
   *          handshake, false otherwise.
614
   *          handshake, false otherwise.
376
   *
615
   *
377
   * Note: This method is called after an rts/cts handshake has been attempted
616
   * Note: This method is called after an rts/cts handshake has been attempted
 Lines 384-390    Link Here 
384
   * \param packet the packet to send
623
   * \param packet the packet to send
385
   * \param normally indicates whether the normal 802.11 data retransmission mechanism
624
   * \param normally indicates whether the normal 802.11 data retransmission mechanism
386
   *        would request that the data is retransmitted or not.
625
   *        would request that the data is retransmitted or not.
387
   * \returns true if we want to resend a packet
626
   * \return true if we want to resend a packet
388
   *          after a failed transmission attempt, false otherwise.
627
   *          after a failed transmission attempt, false otherwise.
389
   *
628
   *
390
   * Note: This method is called after a unicast packet transmission has been attempted
629
   * Note: This method is called after a unicast packet transmission has been attempted
 Lines 398-411    Link Here 
398
   * \param packet the packet to send
637
   * \param packet the packet to send
399
   * \param normally indicates whether the normal 802.11 data fragmentation mechanism
638
   * \param normally indicates whether the normal 802.11 data fragmentation mechanism
400
   *        would request that the data packet is fragmented or not.
639
   *        would request that the data packet is fragmented or not.
401
   * \returns true if this packet should be fragmented, false otherwise.
640
   * \return true if this packet should be fragmented, false otherwise.
402
   *
641
   *
403
   * Note: This method is called before sending a unicast packet.
642
   * Note: This method is called before sending a unicast packet.
404
   */
643
   */
405
  virtual bool DoNeedFragmentation (WifiRemoteStation *station,
644
  virtual bool DoNeedFragmentation (WifiRemoteStation *station,
406
                                    Ptr<const Packet> packet, bool normally);
645
                                    Ptr<const Packet> packet, bool normally);
407
  /**
646
  /**
408
   * \returns whether this manager is a manager designed to work in low-latency
647
   * \return whether this manager is a manager designed to work in low-latency
409
   *          environments.
648
   *          environments.
410
   *
649
   *
411
   * Note: In this context, low vs high latency is defined in <i>IEEE 802.11 Rate Adaptation:
650
   * Note: In this context, low vs high latency is defined in <i>IEEE 802.11 Rate Adaptation:
 Lines 419-425    Link Here 
419
 /**
658
 /**
420
   * \param station the station with which we need to communicate
659
   * \param station the station with which we need to communicate
421
   * \param size size of the packet or fragment we want to send
660
   * \param size size of the packet or fragment we want to send
422
   * \returns the transmission mode to use to send a packet to the station
661
   * \return the transmission mode to use to send a packet to the station
423
   *
662
   *
424
   * Note: This method is called before sending a unicast packet or a fragment
663
   * Note: This method is called before sending a unicast packet or a fragment
425
   *       of a unicast packet to decide which transmission mode to use.
664
   *       of a unicast packet to decide which transmission mode to use.
 Lines 428-434    Link Here 
428
                                  uint32_t size) = 0;
667
                                  uint32_t size) = 0;
429
  /**
668
  /**
430
   * \param station the station with which we need to communicate
669
   * \param station the station with which we need to communicate
431
   * \returns the transmission mode to use to send an rts to the station
670
   * \return the transmission mode to use to send an rts to the station
432
   *
671
   *
433
   * Note: This method is called before sending an rts to a station
672
   * Note: This method is called before sending an rts to a station
434
   *       to decide which transmission mode to use for the rts.
673
   *       to decide which transmission mode to use for the rts.
 Lines 446-452    Link Here 
446
685
447
  /** 
686
  /** 
448
   * \param address the address of the recipient of the ACK
687
   * \param address the address of the recipient of the ACK
449
   * \param ctsMode the mode to be used for the ACK 
688
   * \param ackMode the mode to be used for the ACK 
450
   * 
689
   * 
451
   * \return the power level to be used to send the ACK
690
   * \return the power level to be used to send the ACK
452
   */  
691
   */  
 Lines 454-460    Link Here 
454
693
455
  /** 
694
  /** 
456
   * \param address the address of the recipient of the Block ACK
695
   * \param address the address of the recipient of the Block ACK
457
   * \param ctsMode the mode to be used for the Block ACK 
696
   * \param blockAckMode the mode to be used for the Block ACK 
458
   * 
697
   * 
459
   * \return the power level to be used to send the Block ACK
698
   * \return the power level to be used to send the Block ACK
460
   */  
699
   */  
 Lines 474-501    Link Here 
474
  virtual uint8_t DoGetBlockAckTxNess(Mac48Address address, WifiMode blockAckMode);
713
  virtual uint8_t DoGetBlockAckTxNess(Mac48Address address, WifiMode blockAckMode);
475
  virtual bool DoGetBlockAckTxStbc(Mac48Address address, WifiMode blockAckMode);
714
  virtual bool DoGetBlockAckTxStbc(Mac48Address address, WifiMode blockAckMode);
476
715
716
  /**
717
   * This method is a pure virtual method that must be implemented by the sub-class.
718
   * This allows different types of WifiRemoteStationManager to respond differently,
719
   *
720
   * \param station the station with which we failed to send RTS
721
   */
477
  virtual void DoReportRtsFailed (WifiRemoteStation *station) = 0;
722
  virtual void DoReportRtsFailed (WifiRemoteStation *station) = 0;
723
  /**
724
   * This method is a pure virtual method that must be implemented by the sub-class.
725
   * This allows different types of WifiRemoteStationManager to respond differently,
726
   *
727
   * \param station the station with which we failed to send DATA
728
   */
478
  virtual void DoReportDataFailed (WifiRemoteStation *station) = 0;
729
  virtual void DoReportDataFailed (WifiRemoteStation *station) = 0;
730
  /**
731
   * This method is a pure virtual method that must be implemented by the sub-class.
732
   * This allows different types of WifiRemoteStationManager to respond differently,
733
   *
734
   * \param station the station with which we successfully sent RTS
735
   * \param ctsSnr the SNR of the CTS we received
736
   * \param ctsMode the WifiMode the receiver used to send the CTS
737
   * \param rtsSnr the SNR of the RTS we sent
738
   */
479
  virtual void DoReportRtsOk (WifiRemoteStation *station,
739
  virtual void DoReportRtsOk (WifiRemoteStation *station,
480
                              double ctsSnr, WifiMode ctsMode, double rtsSnr) = 0;
740
                              double ctsSnr, WifiMode ctsMode, double rtsSnr) = 0;
741
  /**
742
   * This method is a pure virtual method that must be implemented by the sub-class.
743
   * This allows different types of WifiRemoteStationManager to respond differently,
744
   *
745
   * \param station the station with which we successfully sent RTS
746
   * \param ackSnr the SNR of the ACK we received
747
   * \param ackMode the WifiMode the receiver used to send the ACK
748
   * \param dataSnr the SNR of the DATA we sent
749
   */
481
  virtual void DoReportDataOk (WifiRemoteStation *station,
750
  virtual void DoReportDataOk (WifiRemoteStation *station,
482
                               double ackSnr, WifiMode ackMode, double dataSnr) = 0;
751
                               double ackSnr, WifiMode ackMode, double dataSnr) = 0;
752
  /**
753
   * This method is a pure virtual method that must be implemented by the sub-class.
754
   * This allows different types of WifiRemoteStationManager to respond differently,
755
   *
756
   * \param station the station with which we failed to send RTS
757
   */
483
  virtual void DoReportFinalRtsFailed (WifiRemoteStation *station) = 0;
758
  virtual void DoReportFinalRtsFailed (WifiRemoteStation *station) = 0;
759
  /**
760
   * This method is a pure virtual method that must be implemented by the sub-class.
761
   * This allows different types of WifiRemoteStationManager to respond differently,
762
   *
763
   * \param station the station with which we failed to send DATA
764
   */
484
  virtual void DoReportFinalDataFailed (WifiRemoteStation *station) = 0;
765
  virtual void DoReportFinalDataFailed (WifiRemoteStation *station) = 0;
766
  /**
767
   * This method is a pure virtual method that must be implemented by the sub-class.
768
   * This allows different types of WifiRemoteStationManager to respond differently,
769
   *
770
   * \param station the station that sent the DATA to us
771
   * \param rxSnr the SNR of the DATA we received
772
   * \param txMode the WifiMode the sender used to send the DATA
773
   */
485
  virtual void DoReportRxOk (WifiRemoteStation *station,
774
  virtual void DoReportRxOk (WifiRemoteStation *station,
486
                             double rxSnr, WifiMode txMode) = 0;
775
                             double rxSnr, WifiMode txMode) = 0;
487
776
777
  /**
778
   * Return the state of the station associated with the given address.
779
   *
780
   * \param address the address of the station
781
   * \return WifiRemoteStationState corresponding to the address
782
   */
488
  WifiRemoteStationState* LookupState (Mac48Address address) const;
783
  WifiRemoteStationState* LookupState (Mac48Address address) const;
784
  /**
785
   * Return the station associated with the given address and TID.
786
   *
787
   * \param address the address of the station
788
   * \param tid the TID
789
   * \return WifiRemoteStation corresponding to the address
790
   */
489
  WifiRemoteStation* Lookup (Mac48Address address, uint8_t tid) const;
791
  WifiRemoteStation* Lookup (Mac48Address address, uint8_t tid) const;
490
  /// Find a remote station by its remote address and TID taken from MAC header
792
  /// Find a remote station by its remote address and TID taken from MAC header
793
  /**
794
   * Return the station associated with the given address and MAC header.
795
   * It simply gets TID from the MAC header and calls Lookup with tid.
796
   *
797
   * \param address the address of the station
798
   * \param header MAC header
799
   * \return WifiRemoteStation corresponding to the address
800
   */
491
  WifiRemoteStation* Lookup (Mac48Address address, const WifiMacHeader *header) const;
801
  WifiRemoteStation* Lookup (Mac48Address address, const WifiMacHeader *header) const;
492
  WifiMode GetControlAnswerMode (Mac48Address address, WifiMode reqMode);
802
  WifiMode GetControlAnswerMode (Mac48Address address, WifiMode reqMode);
493
803
804
  /**
805
   * Actually sets the fragmentation threshold, it also checks the validity of
806
   * the given threshold.
807
   *
808
   * \param threshold the fragmentation threshold
809
   */
494
  void DoSetFragmentationThreshold (uint32_t threshold);
810
  void DoSetFragmentationThreshold (uint32_t threshold);
811
  /**
812
   * Return the current fragmentation threshold
813
   * 
814
   * \return the fragmentation threshold
815
   */
495
  uint32_t DoGetFragmentationThreshold (void) const;
816
  uint32_t DoGetFragmentationThreshold (void) const;
817
  /**
818
   * Return the number of fragments needed for the given packet.
819
   *
820
   * \param header MAC header
821
   * \param packet the packet to be fragmented
822
   * \return the number of fragments needed
823
   */
496
  uint32_t GetNFragments (const WifiMacHeader *header, Ptr<const Packet> packet);
824
  uint32_t GetNFragments (const WifiMacHeader *header, Ptr<const Packet> packet);
497
825
826
  /**
827
   * A vector of WifiRemoteStations
828
   */
498
  typedef std::vector <WifiRemoteStation *> Stations;
829
  typedef std::vector <WifiRemoteStation *> Stations;
830
  /**
831
   * A vector of WifiRemoteStationStates
832
   */
499
  typedef std::vector <WifiRemoteStationState *> StationStates;
833
  typedef std::vector <WifiRemoteStationState *> StationStates;
500
834
501
  StationStates m_states;
835
  StationStates m_states;
 Lines 552-557    Link Here 
552
886
553
};
887
};
554
888
889
/**
890
 * A struct that holds information about each remote station.
891
 */
555
struct WifiRemoteStationState
892
struct WifiRemoteStationState
556
{
893
{
557
  enum
894
  enum
(-)a/src/wifi/model/yans-error-rate-model.h (+36 lines)
 Lines 62-71    Link Here 
62
  virtual double GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const;
62
  virtual double GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const;
63
63
64
private:
64
private:
65
  /**
66
   * Return the logarithm of the given value to base 2.
67
   *
68
   * \param val
69
   * \return the logarithm of val to base 2.
70
   */
65
  double Log2 (double val) const;
71
  double Log2 (double val) const;
72
  /**
73
   * Return BER of BPSK with the given parameters.
74
   *
75
   * \param snr snr value
76
   * \param signalSpread
77
   * \param phyRate
78
   * \return BER of BPSK at the given SNR
79
   */
66
  double GetBpskBer (double snr, uint32_t signalSpread, uint32_t phyRate) const;
80
  double GetBpskBer (double snr, uint32_t signalSpread, uint32_t phyRate) const;
81
  /**
82
   * Return BER of QAM-m with the given parameters.
83
   *
84
   * \param snr snr value
85
   * \param m
86
   * \param signalSpread
87
   * \param phyRate
88
   * \return BER of BPSK at the given SNR
89
   */
67
  double GetQamBer (double snr, unsigned int m, uint32_t signalSpread, uint32_t phyRate) const;
90
  double GetQamBer (double snr, unsigned int m, uint32_t signalSpread, uint32_t phyRate) const;
91
  /**
92
   * Return k!
93
   *
94
   * \return k!
95
   */
68
  uint32_t Factorial (uint32_t k) const;
96
  uint32_t Factorial (uint32_t k) const;
97
  /**
98
   * Return Binomial distribution for a given k, p, and n
99
   * 
100
   * \param k
101
   * \param p
102
   * \param n
103
   * \return a Binomial distribution
104
   */
69
  double Binomial (uint32_t k, double p, uint32_t n) const;
105
  double Binomial (uint32_t k, double p, uint32_t n) const;
70
  double CalculatePdOdd (double ber, unsigned int d) const;
106
  double CalculatePdOdd (double ber, unsigned int d) const;
71
  double CalculatePdEven (double ber, unsigned int d) const;
107
  double CalculatePdEven (double ber, unsigned int d) const;
(-)a/src/wifi/model/yans-wifi-channel.h (-1 / +20 lines)
 Lines 59-64    Link Here 
59
  virtual uint32_t GetNDevices (void) const;
59
  virtual uint32_t GetNDevices (void) const;
60
  virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
60
  virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
61
61
62
  /**
63
   * Adds the given YansWifiPhy to the PHY list
64
   *
65
   * \param phy the YansWifiPhy to be added to the PHY list
66
   */
62
  void Add (Ptr<YansWifiPhy> phy);
67
  void Add (Ptr<YansWifiPhy> phy);
63
68
64
  /**
69
  /**
 Lines 74-80    Link Here 
74
   * \param sender the device from which the packet is originating.
79
   * \param sender the device from which the packet is originating.
75
   * \param packet the packet to send
80
   * \param packet the packet to send
76
   * \param txPowerDbm the tx power associated to the packet
81
   * \param txPowerDbm the tx power associated to the packet
77
   * \param wifiMode the tx mode associated to the packet
82
   * \param txVector the TXVECTOR associated to the packet
78
   * \param preamble the preamble associated to the packet
83
   * \param preamble the preamble associated to the packet
79
   *
84
   *
80
   * This method should not be invoked by normal users. It is
85
   * This method should not be invoked by normal users. It is
 Lines 99-105    Link Here 
99
  YansWifiChannel& operator = (const YansWifiChannel &);
104
  YansWifiChannel& operator = (const YansWifiChannel &);
100
  YansWifiChannel (const YansWifiChannel &);
105
  YansWifiChannel (const YansWifiChannel &);
101
106
107
  /**
108
   * A vector of pointers to YansWifiPhy.
109
   */
102
  typedef std::vector<Ptr<YansWifiPhy> > PhyList;
110
  typedef std::vector<Ptr<YansWifiPhy> > PhyList;
111
  /**
112
   * This method is scheduled by Send for each associated YansWifiPhy.
113
   * The method then calls the corresponding YansWifiPhy that the first
114
   * bit of the packet has arrived.
115
   *
116
   * \param i index of the corresponding YansWifiPhy in the PHY list
117
   * \param packet the packet being sent
118
   * \param rxPowerDbm the received power of the packet
119
   * \param txVector the TXVECTOR of the packet
120
   * \param preamble the type of preamble being used to send the packet
121
   */
103
  void Receive (uint32_t i, Ptr<Packet> packet, double rxPowerDbm,
122
  void Receive (uint32_t i, Ptr<Packet> packet, double rxPowerDbm,
104
                WifiTxVector txVector, WifiPreamble preamble) const;
123
                WifiTxVector txVector, WifiPreamble preamble) const;
105
124
(-)a/src/wifi/model/yans-wifi-phy.cc (-2 / +2 lines)
 Lines 863-871    Link Here 
863
  return m_guardInterval;
863
  return m_guardInterval;
864
}
864
}
865
void
865
void
866
YansWifiPhy::SetGuardInterval (bool GuardInterval)
866
YansWifiPhy::SetGuardInterval (bool guardInterval)
867
{
867
{
868
  m_guardInterval = GuardInterval;
868
  m_guardInterval = guardInterval;
869
}
869
}
870
870
871
uint32_t
871
uint32_t
(-)a/src/wifi/model/yans-wifi-phy.h (-41 / +155 lines)
 Lines 71-95    Link Here 
71
71
72
  void SetChannel (Ptr<YansWifiChannel> channel);
72
  void SetChannel (Ptr<YansWifiChannel> channel);
73
73
74
  void SetChannelNumber (uint16_t id);
75
  uint16_t GetChannelNumber () const;
74
  /**
76
  /**
75
   * \brief Set channel number.
77
   * Return current center channel frequency in MHz.
76
   *
78
   *
77
   * Channel center frequency = Channel starting frequency + 5 MHz * nch
79
   * \return the current center channel frequency in MHz
78
   *
80
   */  
79
   * where Starting channel frequency is standard-dependent, see SetStandard()
80
   * as defined in IEEE 802.11-2007 17.3.8.3.2.
81
   *
82
   * YansWifiPhy can switch among different channels. Basically, YansWifiPhy
83
   * has a private attribute m_channelNumber that identifies the channel the
84
   * PHY operates on. Channel switching cannot interrupt an ongoing transmission.
85
   * When PHY is in TX state, the channel switching is postponed until the end
86
   * of the current transmission. When the PHY is in RX state, the channel
87
   * switching causes the drop of the synchronized packet.
88
   */
89
  void SetChannelNumber (uint16_t id);
90
  /// Return current channel number, see SetChannelNumber()
91
  uint16_t GetChannelNumber () const;
92
  /// Return current center channel frequency in MHz, see SetChannelNumber()
93
  double GetChannelFrequencyMhz () const;
81
  double GetChannelFrequencyMhz () const;
94
82
95
  void StartReceivePacket (Ptr<Packet> packet,
83
  void StartReceivePacket (Ptr<Packet> packet,
 Lines 97-127    Link Here 
97
                           WifiTxVector txVector,
85
                           WifiTxVector txVector,
98
                           WifiPreamble preamble);
86
                           WifiPreamble preamble);
99
87
88
  /**
89
   * Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
90
   *
91
   * \param noiseFigureDb noise figure in dB
92
   */
100
  void SetRxNoiseFigure (double noiseFigureDb);
93
  void SetRxNoiseFigure (double noiseFigureDb);
94
  /**
95
   * Sets the minimum available transmission power level (dBm).
96
   *
97
   * \param start the minimum transmission power level (dBm)
98
   */
101
  void SetTxPowerStart (double start);
99
  void SetTxPowerStart (double start);
100
  /**
101
   * Sets the maximum available transmission power level (dBm).
102
   *
103
   * \param end the maximum transmission power level (dBm)
104
   */
102
  void SetTxPowerEnd (double end);
105
  void SetTxPowerEnd (double end);
106
  /**
107
   * Sets the number of transmission power levels available between the
108
   * minimum level and the maximum level.  Transmission power levels are
109
   * equally separated (in dBm) with the minimum and the maximum included.
110
   *
111
   * \param n the number of available levels
112
   */
103
  void SetNTxPower (uint32_t n);
113
  void SetNTxPower (uint32_t n);
114
  /**
115
   * Sets the transmission gain (dB).
116
   *
117
   * \param gain the transmission gain in dB
118
   */
104
  void SetTxGain (double gain);
119
  void SetTxGain (double gain);
120
  /**
121
   * Sets the reception gain (dB).
122
   *
123
   * \param gain the reception gain in dB
124
   */
105
  void SetRxGain (double gain);
125
  void SetRxGain (double gain);
126
  /**
127
   * Sets the energy detection threshold (dBm).
128
   * The energy of a received signal should be higher than
129
   * this threshold (dbm) to allow the PHY layer to detect the signal.
130
   *
131
   * \param threshold the energy detction threshold in dBm
132
   */
106
  void SetEdThreshold (double threshold);
133
  void SetEdThreshold (double threshold);
134
  /**
135
   * Sets the CCA threshold (dBm).  The energy of a received signal
136
   * should be higher than this threshold to allow the PHY
137
   * layer to declare CCA BUSY state.
138
   *
139
   * \param threshold the CCA threshold in dBm
140
   */
107
  void SetCcaMode1Threshold (double threshold);
141
  void SetCcaMode1Threshold (double threshold);
142
  /**
143
   * Sets the error rate model.
144
   *
145
   * \param rate the error rate model
146
   */
108
  void SetErrorRateModel (Ptr<ErrorRateModel> rate);
147
  void SetErrorRateModel (Ptr<ErrorRateModel> rate);
148
  /**
149
   * Sets the device this PHY is associated with.
150
   *
151
   * \param device the device this PHY is associated with
152
   */
109
  void SetDevice (Ptr<Object> device);
153
  void SetDevice (Ptr<Object> device);
154
  /**
155
   * Sets the mobility model.
156
   *
157
   * \param mobility the mobility model this PHY is associated with
158
   */
110
  void SetMobility (Ptr<Object> mobility);
159
  void SetMobility (Ptr<Object> mobility);
160
  /**
161
   * Return the RX noise figure (dBm).
162
   *
163
   * \return the RX noise figure in dBm
164
   */
111
  double GetRxNoiseFigure (void) const;
165
  double GetRxNoiseFigure (void) const;
166
  /**
167
   * Return the transmission gain (dB).
168
   *
169
   * \return the transmission gain in dB
170
   */
112
  double GetTxGain (void) const;
171
  double GetTxGain (void) const;
172
  /**
173
   * Return the reception gain (dB).
174
   *
175
   * \return the reception gain in dB
176
   */
113
  double GetRxGain (void) const;
177
  double GetRxGain (void) const;
178
  /**
179
   * Return the energy detection threshold (dBm).
180
   *
181
   * \return the energy detection threshold in dBm
182
   */
114
  double GetEdThreshold (void) const;
183
  double GetEdThreshold (void) const;
184
  /**
185
   * Return the CCA threshold (dBm).
186
   *
187
   * \return the CCA threshold in dBm
188
   */
115
  double GetCcaMode1Threshold (void) const;
189
  double GetCcaMode1Threshold (void) const;
190
  /**
191
   * Return the error rate model this PHY is using.
192
   *
193
   * \return the error rate model this PHY is using
194
   */
116
  Ptr<ErrorRateModel> GetErrorRateModel (void) const;
195
  Ptr<ErrorRateModel> GetErrorRateModel (void) const;
196
  /**
197
   * Return the device this PHY is associated with
198
   *
199
   * \return the device this PHY is associated with
200
   */
117
  Ptr<Object> GetDevice (void) const;
201
  Ptr<Object> GetDevice (void) const;
202
  /**
203
   * Return the mobility model this PHY is associated with.
204
   *
205
   * \return the mobility model this PHY is associated with
206
   */
118
  Ptr<Object> GetMobility (void);
207
  Ptr<Object> GetMobility (void);
119
208
120
121
122
123
  virtual double GetTxPowerStart (void) const;
209
  virtual double GetTxPowerStart (void) const;
124
  virtual double GetTxPowerEnd (void) const;
210
  virtual double GetTxPowerEnd (void) const;
211
  /**
212
   * Return the number of available transmission power levels.
213
   *
214
   * \return the number of available transmission power levels
215
   */
125
  virtual uint32_t GetNTxPower (void) const;
216
  virtual uint32_t GetNTxPower (void) const;
126
  virtual void SetReceiveOkCallback (WifiPhy::RxOkCallback callback);
217
  virtual void SetReceiveOkCallback (WifiPhy::RxOkCallback callback);
127
  virtual void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback);
218
  virtual void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback);
 Lines 140-145    Link Here 
140
  virtual WifiMode GetMode (uint32_t mode) const;
231
  virtual WifiMode GetMode (uint32_t mode) const;
141
  virtual double CalculateSnr (WifiMode txMode, double ber) const;
232
  virtual double CalculateSnr (WifiMode txMode, double ber) const;
142
  virtual Ptr<WifiChannel> GetChannel (void) const;
233
  virtual Ptr<WifiChannel> GetChannel (void) const;
234
  
143
  virtual void ConfigureStandard (enum WifiPhyStandard standard);
235
  virtual void ConfigureStandard (enum WifiPhyStandard standard);
144
236
145
 /**
237
 /**
 Lines 153-213    Link Here 
153
  int64_t AssignStreams (int64_t stream);
245
  int64_t AssignStreams (int64_t stream);
154
246
155
  /**
247
  /**
156
   * \param the operating frequency on this node (2.4 GHz or 5GHz).
248
   * \param freq the operating frequency on this node (2.4 GHz or 5GHz).
157
   */
249
   */
158
  virtual void SetFrequency (uint32_t freq);
250
  virtual void SetFrequency (uint32_t freq);
159
  /**
251
  /**
160
   * \returns the operating frequency on this node
252
   * \return the operating frequency on this node
161
   */
253
   */
162
  virtual uint32_t GetFrequency (void) const;
254
  virtual uint32_t GetFrequency (void) const;
163
  /**
255
  /**
164
   * \param the number of transmitters on this node.
256
   * \param tx the number of transmitters on this node.
165
   */
257
   */
166
  virtual void SetNumberOfTransmitAntennas (uint32_t tx);
258
  virtual void SetNumberOfTransmitAntennas (uint32_t tx);
167
  virtual uint32_t GetNumberOfTransmitAntennas (void) const;
259
  virtual uint32_t GetNumberOfTransmitAntennas (void) const;
168
  /**
260
  /**
169
   * \param the number of receivers on this node.
261
   * \param rx the number of receivers on this node.
170
   */
262
   */
171
  virtual void SetNumberOfReceiveAntennas (uint32_t rx) ;
263
  virtual void SetNumberOfReceiveAntennas (uint32_t rx) ;
172
  /**
264
  /**
173
   * \returns the number of receivers on this node.
265
   * \return the number of receivers on this node.
174
   */
266
   */
175
  virtual uint32_t GetNumberOfReceiveAntennas (void) const;
267
  virtual uint32_t GetNumberOfReceiveAntennas (void) const;
176
  /**
268
  /**
177
   * \param set short/long guard interval.
269
   * Enable or disable short/long guard interval.
270
   *
271
   * \param guardInterval Enable or disable guard interval
178
   */
272
   */
179
  virtual void SetGuardInterval (bool GuardInterval);
273
  virtual void SetGuardInterval (bool guardInterval);
180
   virtual bool GetGuardInterval (void) const;
181
  /**
274
  /**
182
   * \param sets LDPC is supported or not
275
   * Return whether guard interval is being used.
276
   *
277
   * \return true if guard interval is being used, false otherwise
183
   */
278
   */
184
  virtual void SetLdpc (bool Ldpc);
279
  virtual bool GetGuardInterval (void) const;
185
  /**
280
  /**
186
   * \returns if LDPC is supported or not
281
   * Enable or disable LDPC.
282
   * \param ldpc Enable or disable LDPC
283
   */
284
  virtual void SetLdpc (bool ldpc);
285
  /**
286
   * Return if LDPC is supported.
287
   *
288
   * \return true if LDPC is supported, false otherwise
187
   */
289
   */
188
  virtual bool GetLdpc (void) const;
290
  virtual bool GetLdpc (void) const;
189
  /**
291
  /**
190
   * \param sets STBC is supported or not
292
   * Enable or disable STBC.
293
   *
294
   * \param stbc Enable or disable STBC
191
   */
295
   */
192
  virtual void SetStbc (bool stbc);
296
  virtual void SetStbc (bool stbc);
193
 /**
297
  /**
194
   * \returns if STBC is supported or not
298
   * Return whether STBC is supported. 
299
   *
300
   * \return true if STBC is supported, false otherwise
195
   */
301
   */
196
  virtual bool GetStbc (void) const;
302
  virtual bool GetStbc (void) const;
197
  /**
303
  /**
198
   * \param sets Greenfield is supported or not
304
   * Enable or disable Greenfield support.
305
   *
306
   * \param greenfield Enable or disable Greenfield
199
   */
307
   */
200
  virtual void SetGreenfield (bool greenfield);
308
  virtual void SetGreenfield (bool greenfield);
201
  /**
309
  /**
202
   * \returns if Greenfield is supported or not
310
   * Return whether Greenfield is supported.
311
   *
312
   * \return true if Greenfield is supported, false otherwise
203
   */
313
   */
204
  virtual bool GetGreenfield (void) const;
314
  virtual bool GetGreenfield (void) const;
205
  /**
315
  /**
206
   * \param sets channel bonding is supported or not
316
   * Return whether channel bonding is supported.
317
   * 
318
   * \return true if channel bonding is supported, false otherwise
207
   */
319
   */
208
  virtual bool GetChannelBonding (void) const ;
320
  virtual bool GetChannelBonding (void) const ;
209
  /**
321
  /**
210
   * \returns if channel bonding is supported or not
322
   * Enable or disable channel bonding support.
323
   * 
324
   * \param channelBonding Enable or disable channel bonding
211
   */
325
   */
212
  virtual void SetChannelBonding (bool channelbonding) ;
326
  virtual void SetChannelBonding (bool channelbonding) ;
213
327
 Lines 215-221    Link Here 
215
  virtual uint32_t GetBssMembershipSelector (uint32_t selector) const;
329
  virtual uint32_t GetBssMembershipSelector (uint32_t selector) const;
216
  virtual WifiModeList GetMembershipSelectorModes(uint32_t selector);
330
  virtual WifiModeList GetMembershipSelectorModes(uint32_t selector);
217
  /**
331
  /**
218
   * \returns the number of MCS supported by this phy
332
   * \return the number of MCS supported by this phy
219
   */
333
   */
220
  virtual uint8_t GetNMcs (void) const;
334
  virtual uint8_t GetNMcs (void) const;
221
  virtual uint8_t GetMcs (uint8_t mcs) const;
335
  virtual uint8_t GetMcs (uint8_t mcs) const;
 Lines 224-230    Link Here 
224
  * as defined in the IEEE 802.11n standard 
338
  * as defined in the IEEE 802.11n standard 
225
  *
339
  *
226
  * \param mode the WifiMode
340
  * \param mode the WifiMode
227
  * \returns the MCS number that corresponds to the given WifiMode
341
  * \return the MCS number that corresponds to the given WifiMode
228
  */
342
  */
229
  virtual uint32_t WifiModeToMcs (WifiMode mode);
343
  virtual uint32_t WifiModeToMcs (WifiMode mode);
230
 /**
344
 /**
 Lines 232-238    Link Here 
232
  * as defined in the IEEE 802.11n standard. 
346
  * as defined in the IEEE 802.11n standard. 
233
  * 
347
  * 
234
  * \param mcs the MCS number 
348
  * \param mcs the MCS number 
235
  * \returns the WifiMode that corresponds to the given mcs number
349
  * \return the WifiMode that corresponds to the given mcs number
236
  */
350
  */
237
  virtual WifiMode McsToWifiMode (uint8_t mcs);
351
  virtual WifiMode McsToWifiMode (uint8_t mcs);
238
352

Return to bug 938