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/regular-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 RegularWifiMac
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);
137  void ConfigureEdca (uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac);
138 
139  // below six public methods are used for MAC extension defined in IEEE 1609.4
146  void EnableForWave (Ptr<WaveNetDevice> device);
151  void Suspend (void);
156  void Resume (void);
163  void MakeVirtualBusy (Time duration);
170  void CancleTx (enum AcIndex ac);
175  void Reset (void);
176 
177  // Inherited from base class
178  virtual void ConfigureStandard (enum WifiStandard standard);
179 protected:
180  virtual void DoDispose (void);
181 private:
182  virtual void Receive (Ptr<WifiMacQueueItem> mpdu);
183 
185 };
186 
187 }
188 #endif /* OCB_WIFI_MAC_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::VendorSpecificContentManager
VendorSpecificContentManager class.
Definition: vendor-specific-action.h:214
ns3::OcbWifiMac::Receive
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...
Definition: ocb-wifi-mac.cc:242
ns3::OcbWifiMac::Suspend
void Suspend(void)
To support MAC extension for multiple channel operation, Suspend the activity in current MAC entity.
Definition: ocb-wifi-mac.cc:413
ns3::OcbWifiMac::AddReceiveVscCallback
void AddReceiveVscCallback(OrganizationIdentifier oi, VscCallback cb)
Definition: ocb-wifi-mac.cc:98
ns3::Callback
Callback template class.
Definition: callback.h:1279
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::OcbWifiMac::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: ocb-wifi-mac.cc:463
ns3::OcbWifiMac::SetSsid
virtual void SetSsid(Ssid ssid)
Definition: ocb-wifi-mac.cc:112
ns3::OcbWifiMac::CancleTx
void CancleTx(enum AcIndex ac)
Definition: ocb-wifi-mac.cc:436
wave-net-device.h
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
vendor-specific-action.h
ns3::RegularWifiMac
base class for all MAC-level wifi objects.
Definition: regular-wifi-mac.h:51
ns3::Ssid
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
ns3::OcbWifiMac::OcbWifiMac
OcbWifiMac(void)
Definition: ocb-wifi-mac.cc:56
ns3::OcbWifiMac
STAs communicate with each directly outside the context of a BSS.
Definition: ocb-wifi-mac.h:50
ns3::Ptr< Packet >
ns3::OcbWifiMac::Enqueue
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)
Definition: ocb-wifi-mac.cc:160
ns3::OcbWifiMac::GetSsid
virtual Ssid GetSsid(void) const
Definition: ocb-wifi-mac.cc:118
ns3::OcbWifiMac::SetBssid
virtual void SetBssid(Mac48Address bssid)
Definition: ocb-wifi-mac.cc:127
ns3::OcbWifiMac::Reset
void Reset(void)
To support MAC extension for multiple channel operation, Reset current MAC entity and flush its inter...
Definition: ocb-wifi-mac.cc:446
ns3::OcbWifiMac::GetBssid
virtual Mac48Address GetBssid(void) const
This method shall not be used in WAVE environment and here it will overloaded to log warn message.
Definition: ocb-wifi-mac.cc:133
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::OcbWifiMac::~OcbWifiMac
virtual ~OcbWifiMac(void)
Definition: ocb-wifi-mac.cc:65
ns3::OcbWifiMac::EnableForWave
void EnableForWave(Ptr< WaveNetDevice > device)
Definition: ocb-wifi-mac.cc:455
ns3::OcbWifiMac::MakeVirtualBusy
void MakeVirtualBusy(Time duration)
Definition: ocb-wifi-mac.cc:429
ns3::OcbWifiMac::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: ocb-wifi-mac.cc:46
ns3::OcbWifiMac::RemoveReceiveVscCallback
void RemoveReceiveVscCallback(OrganizationIdentifier oi)
Definition: ocb-wifi-mac.cc:105
ns3::OcbWifiMac::SendVsc
void SendVsc(Ptr< Packet > vsc, Mac48Address peer, OrganizationIdentifier oi)
Definition: ocb-wifi-mac.cc:71
ns3::OcbWifiMac::Resume
void Resume(void)
To support MAC extension for multiple channel operation, Resume the activity of suspended MAC entity.
Definition: ocb-wifi-mac.cc:421
third.ssid
ssid
Definition: third.py:100
ns3::AcIndex
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:71
ns3::OcbWifiMac::ConfigureStandard
virtual void ConfigureStandard(enum WifiStandard standard)
Definition: ocb-wifi-mac.cc:375
ns3::OcbWifiMac::SetLinkDownCallback
virtual void SetLinkDownCallback(Callback< void > linkDown)
Definition: ocb-wifi-mac.cc:152
ns3::OcbWifiMac::SetLinkUpCallback
virtual void SetLinkUpCallback(Callback< void > linkUp)
SetLinkUpCallback and SetLinkDownCallback will be overloaded In OCB mode, stations can send packets d...
Definition: ocb-wifi-mac.cc:140
ns3::WifiStandard
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
Definition: wifi-standards.h:126
ns3::OcbWifiMac::ConfigureEdca
void ConfigureEdca(uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac)
Definition: ocb-wifi-mac.cc:332
ns3::OcbWifiMac::m_vscManager
VendorSpecificContentManager m_vscManager
VSC manager.
Definition: ocb-wifi-mac.h:184
ns3::OrganizationIdentifier
the organization identifier is a public organizationally unique identifier assigned by the IEEE.
Definition: vendor-specific-action.h:54