A Discrete-Event Network Simulator
API
ocb-wifi-mac.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
4  * Copyright (c) 2013 Dalian University of Technology
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Junling Bu <linlinjavaer@gmail.com>
21  */
22 #ifndef OCB_WIFI_MAC_H
23 #define OCB_WIFI_MAC_H
24 
25 #include "ns3/object-factory.h"
26 #include "ns3/wifi-mac.h"
27 #include "ns3/wifi-mac-queue.h"
28 #include "vendor-specific-action.h"
29 #include "wave-net-device.h"
30 
31 namespace ns3 {
32 
33 class OrganizationIdentifier;
34 class WaveNetDevice;
35 
49 class OcbWifiMac : public WifiMac
50 {
51 public:
56  static TypeId GetTypeId (void);
57  OcbWifiMac (void);
58  virtual ~OcbWifiMac (void);
80 
87  virtual Ssid GetSsid (void) const;
94  virtual void SetSsid (Ssid ssid);
100  virtual void SetBssid (Mac48Address bssid);
106  virtual Mac48Address GetBssid (void) const;
115  virtual void SetLinkUpCallback (Callback<void> linkUp);
119  virtual void SetLinkDownCallback (Callback<void> linkDown);
128  virtual void Enqueue (Ptr<Packet> packet, Mac48Address to);
129  virtual bool CanForwardPacketsTo (Mac48Address to) const;
138  void ConfigureEdca (uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac);
139 
140  // below six public methods are used for MAC extension defined in IEEE 1609.4
147  void EnableForWave (Ptr<WaveNetDevice> device);
152  void Suspend (void);
157  void Resume (void);
164  void MakeVirtualBusy (Time duration);
171  void CancleTx (enum AcIndex ac);
176  void Reset (void);
177 
178  // Inherited from base class
179  virtual void ConfigureStandard (enum WifiStandard standard);
180 protected:
181  virtual void DoDispose (void);
182 private:
183  virtual void Receive (Ptr<WifiMacQueueItem> mpdu);
184 
186 };
187 
188 }
189 #endif /* OCB_WIFI_MAC_H */
Callback template class.
Definition: callback.h:1279
an EUI-48 address
Definition: mac48-address.h:44
STAs communicate with each directly outside the context of a BSS.
Definition: ocb-wifi-mac.h:50
virtual Ssid GetSsid(void) const
static TypeId GetTypeId(void)
Get the type ID.
Definition: ocb-wifi-mac.cc:46
virtual void SetBssid(Mac48Address bssid)
void CancleTx(enum AcIndex ac)
virtual void SetLinkUpCallback(Callback< void > linkUp)
SetLinkUpCallback and SetLinkDownCallback will be overloaded In OCB mode, stations can send packets d...
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
VendorSpecificContentManager m_vscManager
VSC manager.
Definition: ocb-wifi-mac.h:185
virtual ~OcbWifiMac(void)
Definition: ocb-wifi-mac.cc:65
void AddReceiveVscCallback(OrganizationIdentifier oi, VscCallback cb)
Definition: ocb-wifi-mac.cc:98
virtual void SetSsid(Ssid ssid)
void EnableForWave(Ptr< WaveNetDevice > device)
void SendVsc(Ptr< Packet > vsc, Mac48Address peer, OrganizationIdentifier oi)
Definition: ocb-wifi-mac.cc:71
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)
virtual void SetLinkDownCallback(Callback< void > linkDown)
void Suspend(void)
To support MAC extension for multiple channel operation, Suspend the activity in current MAC entity.
virtual Mac48Address GetBssid(void) const
This method shall not be used in WAVE environment and here it will overloaded to log warn message.
virtual void DoDispose(void)
Destructor implementation.
void MakeVirtualBusy(Time duration)
void ConfigureEdca(uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac)
void RemoveReceiveVscCallback(OrganizationIdentifier oi)
virtual bool CanForwardPacketsTo(Mac48Address to) const
Return true if packets can be forwarded to the given destination, false otherwise.
void Resume(void)
To support MAC extension for multiple channel operation, Resume the activity of suspended MAC entity.
virtual void ConfigureStandard(enum WifiStandard standard)
void Reset(void)
To support MAC extension for multiple channel operation, Reset current MAC entity and flush its inter...
the organization identifier is a public organizationally unique identifier assigned by the IEEE.
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
VendorSpecificContentManager class.
base class for all MAC-level wifi objects.
Definition: wifi-mac.h:85
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:71
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ssid
Definition: third.py:100