equal
deleted
inserted
replaced
24 #include <vector> |
24 #include <vector> |
25 #include <stdint.h> |
25 #include <stdint.h> |
26 |
26 |
27 #include "wifi-mac-header.h" |
27 #include "wifi-mac-header.h" |
28 #include "wifi-mode.h" |
28 #include "wifi-mode.h" |
|
29 #include "wifi-preamble.h" |
29 #include "ns3/mac48-address.h" |
30 #include "ns3/mac48-address.h" |
30 #include "ns3/callback.h" |
31 #include "ns3/callback.h" |
31 #include "ns3/callback-trace-source.h" |
32 #include "ns3/callback-trace-source.h" |
32 #include "ns3/event-id.h" |
33 #include "ns3/event-id.h" |
33 #include "ns3/packet.h" |
34 #include "ns3/packet.h" |
149 typedef Callback<void, Packet , WifiMacHeader const*> MacLowRxCallback; |
150 typedef Callback<void, Packet , WifiMacHeader const*> MacLowRxCallback; |
150 |
151 |
151 MacLow (); |
152 MacLow (); |
152 ~MacLow (); |
153 ~MacLow (); |
153 |
154 |
154 void SetInterface (Ptr<WifiNetDevice> interface); |
155 void SetDevice (Ptr<WifiNetDevice> device); |
155 void SetPhy (WifiPhy *phy); |
156 void SetPhy (WifiPhy *phy); |
156 void SetStations (MacStations *stations); |
157 void SetStations (MacStations *stations); |
157 void SetParameters (MacParameters *parameters); |
158 void SetParameters (MacParameters *parameters); |
158 void SetRxCallback (MacLowRxCallback callback); |
159 void SetRxCallback (MacLowRxCallback callback); |
159 void RegisterNavListener (MacLowNavListener *listener); |
160 void RegisterNavListener (MacLowNavListener *listener); |
169 void StartTransmission (Packet packet, |
170 void StartTransmission (Packet packet, |
170 WifiMacHeader const*hdr, |
171 WifiMacHeader const*hdr, |
171 MacLowTransmissionParameters parameters, |
172 MacLowTransmissionParameters parameters, |
172 MacLowTransmissionListener *listener); |
173 MacLowTransmissionListener *listener); |
173 |
174 |
174 void ReceiveOk (Packet const packet, double rxSnr, WifiMode txMode, WifiMode headerMode); |
175 void ReceiveOk (Packet packet, double rxSnr, WifiMode txMode, WifiPreamble preamble); |
175 void ReceiveError (Packet const packet, double rxSnr); |
176 void ReceiveError (Packet packet, double rxSnr); |
176 private: |
177 private: |
177 void CancelAllEvents (void); |
178 void CancelAllEvents (void); |
178 uint32_t GetAckSize (void) const; |
179 uint32_t GetAckSize (void) const; |
179 uint32_t GetRtsSize (void) const; |
180 uint32_t GetRtsSize (void) const; |
180 uint32_t GetCtsSize (void) const; |
181 uint32_t GetCtsSize (void) const; |
211 void SendRtsForPacket (void); |
212 void SendRtsForPacket (void); |
212 void SendDataPacket (void); |
213 void SendDataPacket (void); |
213 void SendCurrentTxPacket (void); |
214 void SendCurrentTxPacket (void); |
214 void StartDataTxTimers (void); |
215 void StartDataTxTimers (void); |
215 |
216 |
216 Ptr<WifiNetDevice> m_interface; |
217 Ptr<WifiNetDevice> m_device; |
217 WifiPhy *m_phy; |
218 WifiPhy *m_phy; |
218 MacStations *m_stations; |
219 MacStations *m_stations; |
219 MacParameters *m_parameters; |
220 MacParameters *m_parameters; |
220 MacLowRxCallback m_rxCallback; |
221 MacLowRxCallback m_rxCallback; |
221 typedef std::vector<MacLowNavListener *>::const_iterator NavListenersCI; |
222 typedef std::vector<MacLowNavListener *>::const_iterator NavListenersCI; |