Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(22)

Side by Side Diff: src/devices/wifi/mac-low.h

Issue 96109: channel switching support for wifi
Patch Set: Created 6 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /* 2 /*
3 * Copyright (c) 2005, 2006 INRIA 3 * Copyright (c) 2005, 2006 INRIA
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as 6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation; 7 * published by the Free Software Foundation;
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 /** 274 /**
275 * \brief handle RTS/CTS/DATA/ACK transactions. 275 * \brief handle RTS/CTS/DATA/ACK transactions.
276 */ 276 */
277 class MacLow : public Object { 277 class MacLow : public Object {
278 public: 278 public:
279 typedef Callback<void, Ptr<Packet> , WifiMacHeader const*> MacLowRxCallback; 279 typedef Callback<void, Ptr<Packet> , WifiMacHeader const*> MacLowRxCallback;
280 280
281 MacLow (); 281 MacLow ();
282 virtual ~MacLow (); 282 virtual ~MacLow ();
283
284 void SetupPhyMacLowListener (Ptr<WifiPhy> phy);
Mathieu Lacage 2009/08/19 08:19:12 make this private
Ramon Bauza 2009/09/08 11:36:08 On 2009/08/19 08:19:12, Mathieu Lacage wrote: > ma
283 285
284 void SetPhy (Ptr<WifiPhy> phy); 286 void SetPhy (Ptr<WifiPhy> phy);
285 void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> manager); 287 void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> manager);
286 288
287 void SetAddress (Mac48Address ad); 289 void SetAddress (Mac48Address ad);
288 void SetAckTimeout (Time ackTimeout); 290 void SetAckTimeout (Time ackTimeout);
289 void SetCtsTimeout (Time ctsTimeout); 291 void SetCtsTimeout (Time ctsTimeout);
290 void SetSifs (Time sifs); 292 void SetSifs (Time sifs);
291 void SetSlotTime (Time slotTime); 293 void SetSlotTime (Time slotTime);
292 void SetPifs (Time pifs); 294 void SetPifs (Time pifs);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 */ 351 */
350 void ReceiveOk (Ptr<Packet> packet, double rxSnr, WifiMode txMode, WifiPreambl e preamble); 352 void ReceiveOk (Ptr<Packet> packet, double rxSnr, WifiMode txMode, WifiPreambl e preamble);
351 /** 353 /**
352 * \param packet packet received. 354 * \param packet packet received.
353 * \param rxSnr snr of packet received. 355 * \param rxSnr snr of packet received.
354 * 356 *
355 * This method is typically invoked by the lower PHY layer to notify 357 * This method is typically invoked by the lower PHY layer to notify
356 * the MAC layer that a packet was unsuccessfully received. 358 * the MAC layer that a packet was unsuccessfully received.
357 */ 359 */
358 void ReceiveError (Ptr<const Packet> packet, double rxSnr); 360 void ReceiveError (Ptr<const Packet> packet, double rxSnr);
361 /**
362 * \param duration switching delay duration.
363 *
364 * This method is typically invoked by the PhyMacLowListener to notify
365 * the MAC layer that a channel switching occured.
366 */
367 void NotifySwitchingStartNow (Time duration);
359 private: 368 private:
360 void CancelAllEvents (void); 369 void CancelAllEvents (void);
361 uint32_t GetAckSize (void) const; 370 uint32_t GetAckSize (void) const;
362 uint32_t GetRtsSize (void) const; 371 uint32_t GetRtsSize (void) const;
363 uint32_t GetCtsSize (void) const; 372 uint32_t GetCtsSize (void) const;
364 uint32_t GetSize (Ptr<const Packet> packet, const WifiMacHeader *hdr) const; 373 uint32_t GetSize (Ptr<const Packet> packet, const WifiMacHeader *hdr) const;
365 Time NowUs (void) const; 374 Time NowUs (void) const;
366 WifiRemoteStation *GetStation (Mac48Address to) const; 375 WifiRemoteStation *GetStation (Mac48Address to) const;
367 void ForwardDown (Ptr<const Packet> packet, WifiMacHeader const *hdr, 376 void ForwardDown (Ptr<const Packet> packet, WifiMacHeader const *hdr,
368 WifiMode txMode); 377 WifiMode txMode);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 Mac48Address m_self; 436 Mac48Address m_self;
428 Mac48Address m_bssid; 437 Mac48Address m_bssid;
429 Time m_ackTimeout; 438 Time m_ackTimeout;
430 Time m_ctsTimeout; 439 Time m_ctsTimeout;
431 Time m_sifs; 440 Time m_sifs;
432 Time m_slotTime; 441 Time m_slotTime;
433 Time m_pifs; 442 Time m_pifs;
434 443
435 Time m_lastNavStart; 444 Time m_lastNavStart;
436 Time m_lastNavDuration; 445 Time m_lastNavDuration;
446
447 // Listerner needed to monitor when a channel switching occurs.
448 class PhyMacLowListener *m_phyMacLowListener;
437 }; 449 };
438 450
439 } // namespace ns3 451 } // namespace ns3
440 452
441 #endif /* MAC_LOW_H */ 453 #endif /* MAC_LOW_H */
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r511